diff options
author | Diego Novillo <dnovillo@gcc.gnu.org> | 2012-03-02 15:43:29 -0500 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2012-03-02 15:43:29 -0500 |
commit | 9c23e8b86dc81b30484e93ae2ab88fe0015ebf46 (patch) | |
tree | c65fd9c27f000abf9a2a529ade16da05eb84d385 | |
parent | 290d87ebe636d7f40fb29f260ec56313e57a8ee6 (diff) | |
download | gcc-9c23e8b86dc81b30484e93ae2ab88fe0015ebf46.zip gcc-9c23e8b86dc81b30484e93ae2ab88fe0015ebf46.tar.gz gcc-9c23e8b86dc81b30484e93ae2ab88fe0015ebf46.tar.bz2 |
This fixes an edge case in parsing summary lines.
This fixes an edge case in parsing summary lines. Some times, the
description field is missing (e.g., 'FAIL: libstdc++/abi_check'), so
the space that the pattern was looking for does not exist.
I've changed it to match any whitespace, which includes '\n'. I also
made it print the line that it fails to parse, in case there are other
problems like this in the future.
2012-03-02 Diego Novillo <dnovillo@google.com>
* testsuite-management/validate_failures.py (class TestResult): Fix
match pattern for the summary line. If there is a parsing failure,
show the line we failed to parse.
From-SVN: r184822
-rwxr-xr-x | contrib/testsuite-management/validate_failures.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 072de79..7bc5089 100755 --- a/contrib/testsuite-management/validate_failures.py +++ b/contrib/testsuite-management/validate_failures.py @@ -97,10 +97,14 @@ class TestResult(object): self.attrs = '' if '|' in summary_line: (self.attrs, summary_line) = summary_line.split('|', 1) - (self.state, - self.name, - self.description) = re.match(r' *([A-Z]+): ([^ ]+) (.*)', - summary_line).groups() + try: + (self.state, + self.name, + self.description) = re.match(r' *([A-Z]+): (\S+)\s(.*)', + summary_line).groups() + except: + print 'Failed to parse summary line: "%s"' % summary_line + raise self.attrs = self.attrs.strip() self.state = self.state.strip() self.description = self.description.strip() |