mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
290d87ebe6
commit
9c23e8b86d
|
@ -97,10 +97,14 @@ class TestResult(object):
|
||||||
self.attrs = ''
|
self.attrs = ''
|
||||||
if '|' in summary_line:
|
if '|' in summary_line:
|
||||||
(self.attrs, summary_line) = summary_line.split('|', 1)
|
(self.attrs, summary_line) = summary_line.split('|', 1)
|
||||||
(self.state,
|
try:
|
||||||
self.name,
|
(self.state,
|
||||||
self.description) = re.match(r' *([A-Z]+): ([^ ]+) (.*)',
|
self.name,
|
||||||
summary_line).groups()
|
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.attrs = self.attrs.strip()
|
||||||
self.state = self.state.strip()
|
self.state = self.state.strip()
|
||||||
self.description = self.description.strip()
|
self.description = self.description.strip()
|
||||||
|
|
Loading…
Reference in New Issue