From 476700d2d80933d331a9d016240c77e38d8a1ba1 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 28 Oct 2014 09:03:00 -0400 Subject: [PATCH] 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 --- tools/subunit-trace.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/subunit-trace.py b/tools/subunit-trace.py index 9501b1e1ab..73f2f1051c 100755 --- a/tools/subunit-trace.py +++ b/tools/subunit-trace.py @@ -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)