summaryrefslogtreecommitdiff
path: root/tests/testing
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-06-30 10:38:48 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-07-17 15:41:48 +0000
commiteeb8ade6c25feacbccc6bfce3ad07077b668bd89 (patch)
tree61e4229b79fbd96d3edf7c00f025b4bacc089078 /tests/testing
parent352c1ad7147bfb84a9c7aea57152e41c63d22397 (diff)
downloadgem5-eeb8ade6c25feacbccc6bfce3ad07077b668bd89.tar.xz
tests: Don't treat new stats as a cause for failures
We currently fail the stat diff stage of tests if there are new stats. This is usually undesirable since this would require any change that adds a stat to also update the regressions. Change-Id: Ieadebac6fd17534e1b49b6b9a1d56f037a423325 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3962 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'tests/testing')
-rw-r--r--tests/testing/units.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/testing/units.py b/tests/testing/units.py
index e8b87a0b2..220cf61f6 100644
--- a/tests/testing/units.py
+++ b/tests/testing/units.py
@@ -270,6 +270,10 @@ class DiffStatFile(TestUnit):
self.stat_diff = os.path.join(_test_base, "diff-out")
def _run(self):
+ STATUS_OK = 0
+ STATUS_NEW_STATS = 1
+ STATUS_FAILED = 2
+
stats = "stats.txt"
cmd = [
@@ -281,9 +285,9 @@ class DiffStatFile(TestUnit):
stderr=subprocess.PIPE) as p:
status, stdout, stderr = p.call()
- if status == 0:
+ if status in (STATUS_OK, STATUS_NEW_STATS):
return self.ok(stdout=stdout, stderr=stderr)
- if status == 1:
+ elif status == STATUS_FAILED:
return self.failure("Statistics mismatch",
stdout=stdout, stderr=stderr)
else: