diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-06-20 14:50:34 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-06-20 14:50:34 +0100 |
commit | 96b74fd31bc83836feb1006f25673b91729a1f13 (patch) | |
tree | 0cf79dc4e2b914d1eebe4a8275a637d4eb01de5f /tests/SConscript | |
parent | ddfc4c459358956cb02790626478835572839c2e (diff) | |
download | gem5-96b74fd31bc83836feb1006f25673b91729a1f13.tar.xz |
tests: Split test results into running and verification
The test base class already assumes that test cases consists of a run
stage and a verification stage. Reflect this in the results class to
make it possible to detect cases where a run was successful, but
didn't verify.
Change-Id: I31ef393e496671221c5408aca41649cd8dda74ca
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Diffstat (limited to 'tests/SConscript')
-rw-r--r-- | tests/SConscript | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/SConscript b/tests/SConscript index e47d394f2..d1fee7ad1 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -120,19 +120,16 @@ def print_test(target, source, env): assert len(result) == 1 result = result[0] - run = result.results[0] - assert run.name == "gem5" - formatter = None - if not run: - status = color_message(termcap.Red, "FAILED!") - formatter = results.Text() - elif run.skipped(): + if result.skipped(): status = color_message(termcap.Cyan, "skipped.") + elif result.changed(): + status = color_message(termcap.Yellow, "CHANGED!") + formatter = results.Text() elif result: status = color_message(termcap.Green, "passed.") else: - status = color_message(termcap.Yellow, "CHANGED!") + status = color_message(termcap.Red, "FAILED!") formatter = results.Text() if formatter: @@ -164,10 +161,7 @@ def update_test(target, source, env): assert len(result) == 1 result = result[0] - run = result.results[0] - assert run.name == "gem5" - - if run.skipped(): + if result.skipped(): print "*** %s: %s: Test skipped, not updating." % ( source[0].dir, color_message(termcap.Yellow, "WARNING"), ) return 0 @@ -175,7 +169,7 @@ def update_test(target, source, env): print "*** %s: %s: Test successful, not updating." % ( source[0].dir, color_message(termcap.Green, "skipped"), ) return 0 - elif not run.success(): + elif result.failed_run(): print "*** %s: %s: Test failed, not updating." % ( source[0].dir, color_message(termcap.Red, "ERROR"), ) return 1 |