summaryrefslogtreecommitdiff
path: root/testsuite/driver/testutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/driver/testutil.py')
-rw-r--r--testsuite/driver/testutil.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/testsuite/driver/testutil.py b/testsuite/driver/testutil.py
index 074214639e..064fd8086f 100644
--- a/testsuite/driver/testutil.py
+++ b/testsuite/driver/testutil.py
@@ -9,8 +9,9 @@ import threading
from my_typing import *
+
PassFail = NamedTuple('PassFail',
- [('passFail', str),
+ [('passed', bool),
('reason', str),
('tag', Optional[str]),
('stderr', Optional[str]),
@@ -18,8 +19,11 @@ PassFail = NamedTuple('PassFail',
('hc_opts', Optional[str]),
])
+def badResult(result: PassFail) -> bool:
+ return not result.passed
+
def passed(hc_opts=None) -> PassFail:
- return PassFail(passFail='pass',
+ return PassFail(passed=True,
reason='',
tag=None,
stderr=None,
@@ -31,7 +35,7 @@ def failBecause(reason: str,
stderr: str=None,
stdout: str=None
) -> PassFail:
- return PassFail(passFail='fail', reason=reason, tag=tag,
+ return PassFail(passed=False, reason=reason, tag=tag,
stderr=stderr, stdout=stdout, hc_opts=None)
def strip_quotes(s: str) -> str: