From 1aa43a4a975373c032c2fe00a566c2a618d24dbd Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Mon, 17 Dec 2012 19:51:00 +0300 Subject: runtest.py: Exit with an error if no tests were found --- runtest.py | 9 +++++++-- src/CHANGES.txt | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/runtest.py b/runtest.py index 382f10a..d193978 100644 --- a/runtest.py +++ b/runtest.py @@ -712,6 +712,12 @@ elif options.all and not qmtest: tests.extend(find_py('test')) tests.sort() +if not tests: + sys.stderr.write("""\ +runtest.py: No tests were found. +""") + sys.exit(1) + if qmtest: if baseline: aegis_result_stream = 'scons_tdb.AegisBaselineStream' @@ -876,8 +882,7 @@ else: for t in tests: run_test(t, None, False) -# all tests are complete by the time we get here - +# --- all tests are complete by the time we get here --- if len(tests) > 0: tests[0].total_time = time_func() - total_start_time print_time_func("Total execution time for all tests: %.1f seconds\n", tests[0].total_time) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 6aad0ea..9f67f3b 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -12,7 +12,9 @@ RELEASE 2.X.X - - Error messages from option parser now include hints about valid choices - Cleaned up some Python 1.5 and pre-2.3 code, so don't expect SCons to run on anything less than Python 2.4 anymore - - runtest.py: Removed --noqmtest option - this behavior is by default. + - Several fixes for runtest.py: + * now exits with an error if no tests were found + * removed --noqmtest option - this behavior is by default From Juan Lang: - Fix WiX Tool to use .wixobj rather than .wxiobj for compiler output -- cgit v0.12