summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2024-02-27 12:00:08 -0500
committerXavier Claessens <xclaesse@gmail.com>2025-10-23 16:53:21 +0100
commit1d12e526c478846d3112087e998349f7b968cf38 (patch)
tree2695098f9bcfb690368e0d00d2247273476ba564 /unittests
parent59a46da49a9653caf589669eefef1b39c7a8bdd8 (diff)
downloadmeson-1d12e526c478846d3112087e998349f7b968cf38.tar.gz
mtest: Display test name in format expected by "meson test" argument
This makes easier to run a single test after running them all. For example the test "test_accsadubl" in the suite "default" of project "orc" used to be displayed "orc:default / test_accsadubl". To run that test specifically the command line is `meson test -C builddir orc:test_accsadubl --suite default`. To make this more consistent the test is now displayed as "default - orc:test_accsadubl".
Diffstat (limited to 'unittests')
-rw-r--r--unittests/allplatformstests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index 023b8c2ad..5e4739ce3 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -954,7 +954,7 @@ class AllPlatformTests(BasePlatformTests):
self.utime(os.path.join(testdir, 'meson.build'))
o = self._run(self.mtest_command + ['--list'])
self.assertIn('Regenerating build files', o)
- self.assertIn('test_features / xfail', o)
+ self.assertIn('test_features:xfail', o)
o = self._run(self.mtest_command + ['--list'])
self.assertNotIn('Regenerating build files', o)
# no real targets should have been built
@@ -5437,7 +5437,7 @@ class AllPlatformTests(BasePlatformTests):
'10/10': [10],
}.items():
output = self._run(self.mtest_command + ['--slice=' + arg])
- tests = sorted([ int(x) for x in re.findall(r'\n[ 0-9]+/[0-9]+ test-([0-9]*)', output) ])
+ tests = sorted([ int(x) for x in re.findall(r'\n[ 0-9]+/[0-9]+ test_slice:test-([0-9]*)', output) ])
self.assertEqual(tests, expectation)
for arg, expectation in {'': 'error: argument --slice: value does not conform to format \'SLICE/NUM_SLICES\'',