diff --git a/validate/launcher/baseclasses.py b/validate/launcher/baseclasses.py index 670557f731..6d26aef9a1 100644 --- a/validate/launcher/baseclasses.py +++ b/validate/launcher/baseclasses.py @@ -1527,6 +1527,12 @@ class _TestsLauncher(Loggable): self.tests.extend(tests) return sorted(list(self.tests), key=lambda t: t.classname) + def _tester_needed(self, tester): + for testsuite in self.options.testsuites: + if tester.name in testsuite.TEST_MANAGER: + return True + return False + def _run_tests(self): cur_test_num = 0 @@ -1534,11 +1540,14 @@ class _TestsLauncher(Loggable): total_num_tests = 1 self.all_tests = [] for tester in self.testers: - self.all_tests.extend(tester.list_tests()) + if self._tester_needed(tester): + self.all_tests.extend(tester.list_tests()) total_num_tests = len(self.all_tests) self.reporter.init_timer() for tester in self.testers: + if not self._tester_needed(tester): + continue res = tester.run_tests(cur_test_num, total_num_tests) cur_test_num += len(tester.list_tests()) if res != Result.PASSED and (self.options.forever or diff --git a/validate/launcher/main.py b/validate/launcher/main.py index a5ae42e4e6..3f269c2f77 100644 --- a/validate/launcher/main.py +++ b/validate/launcher/main.py @@ -536,12 +536,12 @@ Note that all testsuite should be inside python modules, so the directory should ScenarioManager().config = options if not tests_launcher.set_settings(options, []): exit(1) - if tests_launcher.list_tests() == -1: - printc("\nFailling as tests have been removed/added " - " (--fail-on-testlist-change)", Colors.FAIL) - exit(1) - if options.list_tests: + if tests_launcher.list_tests() == -1: + printc("\nFailling as tests have been removed/added " + " (--fail-on-testlist-change)", Colors.FAIL) + exit(1) + l = tests_launcher.tests for test in l: printc(test)