summaryrefslogtreecommitdiffstats
path: root/scripts/generic/parse_build_log.py
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-03-12 23:32:42 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-03-13 10:15:14 +0100
commitf5137f61b78eaf6640b43fee01df783fdbbf67cc (patch)
tree648067980d87cb3275a63d9b27d35eb56bb9357a /scripts/generic/parse_build_log.py
parentbfcc8320098e1dd94b70f43310b2ec57f325a551 (diff)
Detect crashed tests and print output
Reference log output: 68657: ********* Start testing of tst_QReadWriteLock ********* Config: Using QtTest library 6.2.0, Qt 6.2.0 (arm64-little_endian-lp64 shared (dynamic) release build; by GCC 10.2.0), b2qt 3.2 PASS : tst_QReadWriteLock::initTestCase() PASS : tst_QReadWriteLock::constructDestruct() PASS : tst_QReadWriteLock::readLockUnlock() PASS : tst_QReadWriteLock::writeLockUnlock() PASS : tst_QReadWriteLock::readLockUnlockLoop() PASS : tst_QReadWriteLock::writeLockUnlockLoop() PASS : tst_QReadWriteLock::readLockLoop() PASS : tst_QReadWriteLock::writeLockLoop() PASS : tst_QReadWriteLock::readWriteLockUnlockLoop() PASS : tst_QReadWriteLock::tryReadLock() PASS : tst_QReadWriteLock::tryWriteLock() PASS : tst_QReadWriteLock::readLockBlockRelease() PASS : tst_QReadWriteLock::writeLockBlockRelease() PASS : tst_QReadWriteLock::multipleReadersBlockRelease() double free or corruption (!prev) CMake Error at tst_qreadwritelockWrapperRelWithDebInfo.cmake:17 (message): 164: /home/qt/work/qt/qtbase_standalone_tests/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock execution failed. 164: 164: 164/570 Test #164: tst_qreadwritelock ...................................***Failed 6.92 sec Change-Id: Ic9ed3e2045d72331337c58bab509730949ec8dab Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'scripts/generic/parse_build_log.py')
-rw-r--r--scripts/generic/parse_build_log.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/generic/parse_build_log.py b/scripts/generic/parse_build_log.py
index 3d3de950..dc87fb2a 100644
--- a/scripts/generic/parse_build_log.py
+++ b/scripts/generic/parse_build_log.py
@@ -47,6 +47,7 @@ prefix_re = re.compile(r'^agent:[\d :/]+\w+\.go:\d+: (\d+: )?')
# Match QTestlib output
start_test_re = re.compile(r'^\*{9} Start testing of \w+ \*{9}$')
end_test_re = re.compile(r'Totals: \d+ passed, (\d+) failed, \d+ skipped, \d+ blacklisted, \d+ms')
+end_test_crash_re = re.compile(r'\d+/\d+\sTest\s#\d+:.*\*\*\*Failed.*')
make_error_re = re.compile(r'make\[.*Error \d+$')
@@ -87,7 +88,7 @@ def print_failed_test(lines, start, end):
print('\n{}: {}'.format(start, lines[start]))
for i in range(start + 1, end):
line = lines[i]
- if 'FAIL!' in line or 'XPASS' in line:
+ if 'FAIL!' in line or 'XPASS' or '***Failed' in line:
last_fail = i
if i - last_fail < 4:
print(line)
@@ -117,6 +118,10 @@ def parse(lines):
if fails:
print_failed_test(lines, test_start_line, i)
test_start_line = -1
+ elif end_test_crash_re.match(line):
+ logging.debug(f"===> test crashed {line} {test_start_line} {i}")
+ print_failed_test(lines, test_start_line, i)
+ test_start_line = -1
# Do not report errors within configuration tests
elif line == 'Running configuration tests...':
within_configure_tests = True