Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Unified Diff: test/test262/testcfg.py

Issue 2386103010: [test] Fix exception parsing in test262. (Closed)
Patch Set: Deal with --stress-opt output. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/test262/test262.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test262/testcfg.py
diff --git a/test/test262/testcfg.py b/test/test262/testcfg.py
index 391b0e8c4f8119b3156240d09e3947aa054bd4b8..93d891530e07f1af43d64fbb4b96e23e46cf7472 100644
--- a/test/test262/testcfg.py
+++ b/test/test262/testcfg.py
@@ -28,6 +28,7 @@
import imp
import os
+import re
import sys
import tarfile
@@ -184,10 +185,9 @@ class Test262TestSuite(testsuite.TestSuite):
return f.read()
def _ParseException(self, str):
- for line in str.split("\n")[::-1]:
- if line and not line[0].isspace() and ":" in line:
- return line.split(":")[0]
-
+ # somefile:somelinenumber: someerror[: sometext]
+ match = re.search('^[^: ]*:[0-9]+: ([^ ]+?)($|: )', str, re.MULTILINE)
+ return match.group(1)
def IsFailureOutput(self, testcase):
output = testcase.output
« no previous file with comments | « test/test262/test262.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698