From 9d0305ea0528ed85918a292149365702dc18940c Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Tue, 1 Dec 2020 11:40:03 +0100 Subject: [PATCH] tests: Use system utils outside of the test environment The code to pick up the utilities from the test environment would fail if the environment variables are not set. In that case, we can just use the binary name and rely on PATH though. --- tests/fprintd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/fprintd.py b/tests/fprintd.py index 1ff5c4f..2a6511c 100644 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -1424,6 +1424,10 @@ class FPrintdUtilsTest(FPrintdVirtualDeviceBaseTest): print('Testing JHBuild version') jhbuild_prefix = os.environ['JHBUILD_PREFIX'] path = os.path.join(jhbuild_prefix, 'bin', util_bin) + else: + # Assume it is in path + utils[util] = util_bin + continue assert os.path.exists(path), 'failed to find {} in {}'.format(util, path) utils[util] = path