diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2018-05-15 14:40:45 -0400 |
---|---|---|
committer | Thibault Saunier <tsaunier@igalia.com> | 2018-05-15 14:43:06 -0400 |
commit | b89b4dcb2c7517e12520cf11def97ec1c6f5a1b6 (patch) | |
tree | ec8822e6de264f63f6c83467dee6dd41af07182f | |
parent | e30c154a2db188f90e348063635e2e49f988a1b4 (diff) |
validate:launcher: Error out loudly if the testlist changes
When --fail-on-testlist-change is set.
-rw-r--r-- | validate/launcher/baseclasses.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/validate/launcher/baseclasses.py b/validate/launcher/baseclasses.py index d35d002..a2921b1 100644 --- a/validate/launcher/baseclasses.py +++ b/validate/launcher/baseclasses.py @@ -1530,7 +1530,8 @@ class _TestsLauncher(Loggable): testlist_file.write("%s\n" % (tname)) if tname and tname not in know_tests: printc("Test %s is NEW in testsuite %s" - % (tname, testsuite.__file__), Colors.OKGREEN) + % (tname, testsuite.__file__), + Colors.FAIL if self.options.fail_on_testlist_change else Colors.OKGREEN) testlist_changed = True testlist_file.close() @@ -1546,7 +1547,7 @@ class _TestsLauncher(Loggable): tests = tester.list_tests() if self._check_defined_tests(tester, tests) and \ self.options.fail_on_testlist_change: - return -1 + raise RuntimeError("Unexpected new test in testsuite.") self.tests.extend(tests) return sorted(list(self.tests), key=lambda t: t.classname) @@ -1630,8 +1631,6 @@ class _TestsLauncher(Loggable): if not self.all_tests: all_tests = self.list_tests() - if all_tests == -1: - return False self.all_tests = all_tests self.total_num_tests = len(self.all_tests) |