diff options
-rw-r--r-- | interpreter.py | 7 | ||||
-rwxr-xr-x | meson_test.py | 6 | ||||
-rw-r--r-- | ninjabackend.py | 3 | ||||
-rw-r--r-- | test cases/common/101 suites/meson.build | 2 |
4 files changed, 11 insertions, 7 deletions
diff --git a/interpreter.py b/interpreter.py index 8ba2b78..1a5c6b2 100644 --- a/interpreter.py +++ b/interpreter.py @@ -1735,9 +1735,12 @@ class Interpreter(): workdir = None if not isinstance(timeout, int): raise InterpreterException('Timeout must be an integer.') - suite = kwargs.get('suite', '') + suite = mesonlib.stringlistify(kwargs.get('suite', '')) if self.is_subproject(): - suite = self.subproject.replace(' ', '_') + ':' + suite + newsuite = [] + for s in suite: + newsuite.append(self.subproject.replace(' ', '_') + ':' + s) + suite = newsuite t = Test(args[0], suite, args[1].held_object, par, cmd_args, env, should_fail, valgrind_args, timeout, workdir) if is_base_test: self.build.tests.append(t) diff --git a/meson_test.py b/meson_test.py index 5771fa3..53dc6ea 100755 --- a/meson_test.py +++ b/meson_test.py @@ -149,7 +149,7 @@ def drain_futures(futures): def filter_tests(suite, tests): if suite is None: return tests - return [x for x in tests if x.suite == suite] + return [x for x in tests if suite in x.suite] def run_tests(options, datafilename): logfile_base = 'meson-logs/testlog' @@ -182,10 +182,10 @@ def run_tests(options, datafilename): futures = [] filtered_tests = filter_tests(options.suite, tests) for i, test in enumerate(filtered_tests): - if test.suite == '': + if test.suite[0] == '': visible_name = test.name else: - visible_name = test.suite + ' / ' + test.name + visible_name = test.suite[0] + ' / ' + test.name if not test.is_parallel: drain_futures(futures) futures = [] diff --git a/ninjabackend.py b/ninjabackend.py index f614923..d837074 100644 --- a/ninjabackend.py +++ b/ninjabackend.py @@ -531,7 +531,8 @@ class NinjaBackend(backends.Backend): def write_test_suite_targets(self, cmd, outfile): suites = {} for t in self.build.get_tests(): - suites[t.suite] = True + for s in t.suite: + suites[s] = True suites = list(suites.keys()) suites.sort() for s in suites: diff --git a/test cases/common/101 suites/meson.build b/test cases/common/101 suites/meson.build index 098c95f..057e059 100644 --- a/test cases/common/101 suites/meson.build +++ b/test cases/common/101 suites/meson.build @@ -6,4 +6,4 @@ exe1 = executable('exe1', 'exe1.c') exe2 = executable('exe2', 'exe2.c') test('exe1', exe1) -test('exe2', exe2, suite : 'suite2') +test('exe2', exe2, suite : ['suite2', 'super-special']) |