From b718f4d567c089d843c450b96de0bdca4dd26e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 28 Sep 2022 01:23:58 +0200 Subject: [PATCH] tests/meson: Avoid searching for programs multiple times --- tests/meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index 11942fa6..96db6260 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -57,12 +57,13 @@ if get_option('introspection') 'virtual-device', ] + python3 = find_program('python3') unittest_inspector = find_program('unittest_inspector.py') + umockdev_test = find_program('umockdev-test.py') foreach vdtest: virtual_devices_tests driver_name = '_'.join(vdtest.split('-')) if driver_name in drivers - python3 = find_program('python3') base_args = files(vdtest + '.py') suite = ['virtual-driver'] @@ -106,8 +107,11 @@ if get_option('introspection') if (driver_name in supported_drivers and gusb_dep.version().version_compare('>= 0.3.0')) test(driver_test, - find_program('umockdev-test.py'), - args: join_paths(meson.current_source_dir(), driver_test), + python3, + args: [ + umockdev_test.full_path(), + meson.current_source_dir() / driver_test, + ], env: driver_envs, suite: ['drivers'], timeout: 15,