error if we don't run any tests

This makes subunit-trace error out if it finds that there were no test
results in the subunit stream. This guards against the case where
something breaks the test toolchain and we stop running tests
entirely. Copied over from equivalent code in Tempest where this has
served us well.

Change-Id: I765395335a68dfc7eb754317f8c45c3dfdd85949
This commit is contained in:
Sean Dague
2014-10-28 09:03:00 -04:00
parent cef1fea688
commit 476700d2d8
+3
View File
@@ -294,6 +294,9 @@ def main():
stream.run(result)
finally:
result.stopTestRun()
if count_tests('status', '.*') == 0:
print("The test run didn't actually run any tests")
return 1
if args.post_fails:
print_fails(sys.stdout)
print_summary(sys.stdout)