mirror of
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
synced 2026-10-25 12:39:18 +03:00
Currently we only support running the test cases for gpio-tools from the top-level source directory. Some users want to install the test executable and run the tests from other locations (/bin, /usr/bin or custom path). This patch makes the test suite look in the source tree path first, then check the directory in which the program resides and last iterate over all directories in $PATH. We only do that once at the beginning and then reuse the path later. Cc: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Tested-by: Anders Roxell <anders.roxell@linaro.org>