summaryrefslogtreecommitdiff
path: root/tests/testing
diff options
context:
space:
mode:
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: