mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
validate:launcher: Do not list tests on unneeded testers
This commit is contained in:
parent
6504b9152c
commit
d5de0b702c
2 changed files with 15 additions and 6 deletions
|
@ -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:
|
||||
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
|
||||
|
|
|
@ -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 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)
|
||||
|
||||
if options.list_tests:
|
||||
l = tests_launcher.tests
|
||||
for test in l:
|
||||
printc(test)
|
||||
|
|
Loading…
Reference in a new issue