]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/functional/meson.build: Allow tests to reside in subfolders
authorThomas Huth <thuth@redhat.com>
Tue, 19 Aug 2025 11:23:41 +0000 (13:23 +0200)
committerThomas Huth <thuth@redhat.com>
Wed, 27 Aug 2025 07:46:55 +0000 (09:46 +0200)
We are going to move target-specific tests to subfolders that are
named after the target (and generic tests will be put into a "generic"
folder), so prepare the meson.build file to allow such locations, too.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-5-thuth@redhat.com>

tests/functional/meson.build

index 356aad12deebeee021c01e21eb88ed5271123ab8..8c24ac1cc2da5615b5a9cb0de5422dddf0d412d5 100644 (file)
@@ -423,7 +423,13 @@ foreach speed : ['quick', 'thorough']
 
     foreach test : target_tests
       testname = '@0@-@1@'.format(target_base, test)
-      testfile = 'test_' + test + '.py'
+      if fs.exists('test_' + test + '.py')
+        testfile = 'test_' + test + '.py'
+      elif fs.exists('generic' / 'test_' + test + '.py')
+        testfile = 'generic' / 'test_' + test + '.py'
+      else
+        testfile = target_base / 'test_' + test + '.py'
+      endif
       testpath = meson.current_source_dir() / testfile
       teststamp = testname + '.tstamp'
       test_precache_env = environment()