diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-12 15:02:09 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-12 15:05:29 +0200 |
| commit | c4ec1304c5302eefa909f81f0d6ace677bf5448f (patch) | |
| tree | de40827c88c16c130a72033bc40ac18ab090090b /scripts/generic/parse_build_log.py | |
| parent | 9ebbac76e9e3141df8acee48f4a60cdceb614244 (diff) | |
Fix parse_build_log.py to pass the Coin tests
Add a missing check for make errors.
Task-number: COIN-28
Change-Id: I057c90c9d693f22b2acc6f505b7c27f8bf2195a0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'scripts/generic/parse_build_log.py')
| -rw-r--r-- | scripts/generic/parse_build_log.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/generic/parse_build_log.py b/scripts/generic/parse_build_log.py index 57cd0850..127f27a4 100644 --- a/scripts/generic/parse_build_log.py +++ b/scripts/generic/parse_build_log.py @@ -45,9 +45,7 @@ prefix_re = re.compile(r'^agent:[\d :/]+\w+\.go:\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') - -# Patterns for errors of common (g++, MSVC, Python) -compiler_errors = (": error: ", ": error C", 'ERROR') +make_error_re = re.compile(r'make\[.*Error \d+$') def read_file(file_name): """ @@ -77,6 +75,16 @@ def zcat(file_name): return lines +def is_compile_error(line): + """ + Return whether a line is an error from one of the common compilers + (g++, MSVC, Python) or from make + """ + if any(e in line for e in (": error: ", ": error C", 'ERROR')): + return True + return make_error_re.match(line) + + def print_failed_test(lines, start, end): """ For a failed test, print 3 lines following the FAIL!/XPASS and @@ -115,7 +123,7 @@ def parse(lines): within_configure_tests = True elif start_test_re.match(line): test_start_line = i - elif any(e in line for e in compiler_errors): + elif is_compile_error(line): start = max(0, i - 10) sys.stdout.write('\n{}: '.format(start)) for e in range(start, i + 1): |
