Skip to content

Commit 143c83f

Browse files
author
Bernhard Reutner-Fischer
committed
validate_failures.py: Fix performance regression
2013-02-06 Bernhard Reutner-Fischer <[email protected]> * testsuite-management/validate_failures.py (IsInterestingResult): Fix performance regression From-SVN: r195811
1 parent 4762585 commit 143c83f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

contrib/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2013-02-06 Bernhard Reutner-Fischer <[email protected]>
2+
3+
* testsuite-management/validate_failures.py
4+
(IsInterestingResult): Fix performance regression
5+
16
2013-02-04 Richard Sandiford <[email protected]>
27

38
* update-copyright.py: New file.

contrib/testsuite-management/validate_failures.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262

6363
# Handled test results.
6464
_VALID_TEST_RESULTS = [ 'FAIL', 'UNRESOLVED', 'XPASS', 'ERROR' ]
65+
_VALID_TEST_RESULTS_REX = re.compile("%s" % "|".join(_VALID_TEST_RESULTS))
6566

6667
# Subdirectory of srcdir in which to find the manifest file.
6768
_MANIFEST_SUBDIR = 'contrib/testsuite-management'
@@ -210,7 +211,7 @@ def IsInterestingResult(line):
210211
if '|' in line:
211212
(_, line) = line.split('|', 1)
212213
line = line.strip()
213-
return any(line.startswith(result) for result in _VALID_TEST_RESULTS)
214+
return bool(_VALID_TEST_RESULTS_REX.match(line))
214215

215216

216217
def IsInclude(line):

0 commit comments

Comments
 (0)