mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 14:38:48 +00:00
validate:launcher: Report error and exit when a testsuite could not load
Otherwise the user might end up seeing a lot of meaningless logs about 'removed' tests.
This commit is contained in:
parent
f7f600e730
commit
8973fa04eb
2 changed files with 6 additions and 2 deletions
|
@ -1210,6 +1210,7 @@ class _TestsLauncher(Loggable):
|
||||||
printc("Could not load testsuite: %s"
|
printc("Could not load testsuite: %s"
|
||||||
" maybe because of missing TestManager"
|
" maybe because of missing TestManager"
|
||||||
% (testsuite), Colors.FAIL)
|
% (testsuite), Colors.FAIL)
|
||||||
|
return False
|
||||||
|
|
||||||
def _load_config(self, options):
|
def _load_config(self, options):
|
||||||
printc("Loading config files is DEPRECATED"
|
printc("Loading config files is DEPRECATED"
|
||||||
|
@ -1250,7 +1251,9 @@ class _TestsLauncher(Loggable):
|
||||||
tester.set_settings(options, args, self.reporter)
|
tester.set_settings(options, args, self.reporter)
|
||||||
|
|
||||||
if not options.config and options.testsuites:
|
if not options.config and options.testsuites:
|
||||||
self._setup_testsuites()
|
if self._setup_testsuites() is False:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def _check_tester_has_other_testsuite(self, testsuite, tester):
|
def _check_tester_has_other_testsuite(self, testsuite, tester):
|
||||||
if tester.name != testsuite.TEST_MANAGER[0]:
|
if tester.name != testsuite.TEST_MANAGER[0]:
|
||||||
|
|
|
@ -525,7 +525,8 @@ Note that all testsuite should be inside python modules, so the directory should
|
||||||
|
|
||||||
# Ensure that the scenario manager singleton is ready to be used
|
# Ensure that the scenario manager singleton is ready to be used
|
||||||
ScenarioManager().config = options
|
ScenarioManager().config = options
|
||||||
tests_launcher.set_settings(options, [])
|
if not tests_launcher.set_settings(options, []):
|
||||||
|
exit(1)
|
||||||
if tests_launcher.list_tests() == -1:
|
if tests_launcher.list_tests() == -1:
|
||||||
printc("\nFailling as tests have been removed/added "
|
printc("\nFailling as tests have been removed/added "
|
||||||
" (--fail-on-testlist-change)", Colors.FAIL)
|
" (--fail-on-testlist-change)", Colors.FAIL)
|
||||||
|
|
Loading…
Reference in a new issue