Support running tests from different build directories
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 23 Apr 2018 13:29:15 +0000 (14:29 +0100)
committerSimon Ser <contact@emersion.fr>
Fri, 10 Jan 2020 22:42:59 +0000 (23:42 +0100)
commita77f6bf6c41f83520261cdf67c9819f8e36f8a3d
tree4eed1f2f7a9e981cceec8b394e2daa51b02ea3e5
parent8497144faae61844af2fc9ba4a29256aed0dd402
Support running tests from different build directories

The tests that run exec-fd-leak-checker expect the binary to be located
in the current directory. This is not always the case; for instance, the
binaries could be built under `tests`, but be invoked under the
top-level build directory.

We can use an environment variable to control what's the location of the
test binaries, and fall back to the current directory if the variable is
unset.

Reviewed-by: Daniel Stone <daniels@collabora.com>
tests/test-helpers.c