donate-cpu-server.py: Fix wrong detection of invalid messageIds.

Packages now can contain something like:
```
    head results:
    Checking temp/openvdb/Platform.cc: __GNUC__=1...
    [New Thread 7892.0x91c]
```
"New Thread 7892.0x91c" was wrongly identified as messageId in the HEAD
report.
This commit adds code to skip lines that start with `[` or where the
messageId contains at least one space.
This commit is contained in:
versat 2019-04-03 11:39:03 +02:00
parent 8c26d4ee6a
commit 20814d37d0
1 changed files with 8 additions and 2 deletions

View File

@ -17,7 +17,7 @@ import operator
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
# changes)
SERVER_VERSION = "1.1.1"
SERVER_VERSION = "1.1.2"
OLD_VERSION = '1.87'
@ -394,7 +394,13 @@ def headReport(resultsPath):
if ': note: ' in line:
# notes normally do not contain message ids but can end with ']'
continue
messageId = line[line.rfind('[')+1:len(line)-1]
message_id_start_pos = line.rfind('[')
if message_id_start_pos <= 0:
continue
messageId = line[message_id_start_pos+1:len(line)-1]
if ' ' in messageId:
# skip invalid messageIds
continue
if messageId not in out:
out[messageId] = 0