pacman/build-aux/print-failed-test-output
Andrew Gregory 1fdf8c0076 gitlab-ci: print output and logs for failed tests
Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-21 17:18:24 +10:00

17 lines
482 B
Python
Executable file

#!/usr/bin/python
import json
import sys
def print_result(result):
print('==================================================================')
print(result['name'])
print(' '.join(result['command']))
print('==================================================================')
print(result['stdout'])
with open(sys.argv[1], 'r') as f:
for line in f:
result = json.loads(line)
if result['result'] == 'FAIL':
print_result(result)