Indicate errors interleaved with test suite output
Indicate whether a success or failure is unexpected, or expected and ignored as they happen. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
ca9236b0c5
commit
d2ea2c0df3
1 changed files with 6 additions and 2 deletions
|
@ -52,7 +52,7 @@ def main():
|
||||||
proc = subprocess.Popen(['./psa-arch-tests-crypto'],
|
proc = subprocess.Popen(['./psa-arch-tests-crypto'],
|
||||||
bufsize=1, stdout=subprocess.PIPE, universal_newlines=True)
|
bufsize=1, stdout=subprocess.PIPE, universal_newlines=True)
|
||||||
|
|
||||||
test_re = re.compile('^TEST(?:: ([0-9]*)| RESULT: FAILED)')
|
test_re = re.compile('^TEST(?:: ([0-9]*)| RESULT: (FAILED|PASSED))')
|
||||||
test = -1
|
test = -1
|
||||||
unexpected_successes = set(EXPECTED_FAILURES)
|
unexpected_successes = set(EXPECTED_FAILURES)
|
||||||
expected_failures = []
|
expected_failures = []
|
||||||
|
@ -63,12 +63,16 @@ def main():
|
||||||
if match is not None:
|
if match is not None:
|
||||||
if match.group(1) is not None:
|
if match.group(1) is not None:
|
||||||
test = int(match.group(1))
|
test = int(match.group(1))
|
||||||
else:
|
elif match.group(2) == 'FAILED':
|
||||||
try:
|
try:
|
||||||
unexpected_successes.remove(test)
|
unexpected_successes.remove(test)
|
||||||
expected_failures.append(test)
|
expected_failures.append(test)
|
||||||
|
print('Expected failure, ignoring')
|
||||||
except KeyError:
|
except KeyError:
|
||||||
unexpected_failures.append(test)
|
unexpected_failures.append(test)
|
||||||
|
print('ERROR: Unexpected failure')
|
||||||
|
elif test in unexpected_successes:
|
||||||
|
print('ERROR: Unexpected success')
|
||||||
proc.wait()
|
proc.wait()
|
||||||
|
|
||||||
print()
|
print()
|
||||||
|
|
Loading…
Reference in a new issue