diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-01-24 14:20:11 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-02-10 08:37:59 -0500 |
commit | 224fec6983e16ecfc44a80d47e591a2425468eaf (patch) | |
tree | 08cf0a5b5352c48d99c9783fb657d18e938ba461 /testsuite/driver/testutil.py | |
parent | a48753bdbc99cda36890e851950f5b79e1c3b2b2 (diff) | |
download | haskell-224fec6983e16ecfc44a80d47e591a2425468eaf.tar.gz |
testsuite: Report stdout and stderr in JUnit output
This patch makes the JUnit output more useful as now we also report the
stdout/stderr in the message which can be used to quickly identify why a
test is failing without downloading the log.
This also introduces TestResult,
previously we were simply passing around tuples, making things the
implementation rather difficult to follow and harder to extend.
Diffstat (limited to 'testsuite/driver/testutil.py')
-rw-r--r-- | testsuite/driver/testutil.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/testsuite/driver/testutil.py b/testsuite/driver/testutil.py index 6e0c2684d7..d5bd2f33c3 100644 --- a/testsuite/driver/testutil.py +++ b/testsuite/driver/testutil.py @@ -8,8 +8,11 @@ import threading def passed(): return {'passFail': 'pass'} -def failBecause(reason, tag=None): - return {'passFail': 'fail', 'reason': reason, 'tag': tag} +def failBecauseStderr(reason, stderr, tag=None): + return failBecause(reason, tag, stderr=stderr) + +def failBecause(reason, tag=None, **kwargs): + return (dict ({'passFail': 'fail', 'reason': reason, 'tag': tag}, **kwargs)) def strip_quotes(s): # Don't wrap commands to subprocess.call/Popen in quotes. |