Make fuzz-natives test generator more robust.
authormachenbach@chromium.org <machenbach@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 9 Jul 2014 11:39:22 +0000 (11:39 +0000)
committermachenbach@chromium.org <machenbach@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 9 Jul 2014 11:39:22 +0000 (11:39 +0000)
BUG=
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/379803003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/fuzz-natives/testcfg.py

index df6bc5b..5e00b40 100644 (file)
@@ -31,11 +31,16 @@ class FuzzNativesTestSuite(testsuite.TestSuite):
       assert False, "Failed to get natives list."
     tests = []
     for line in output.stdout.strip().split():
-      (name, argc) = line.split(",")
-      flags = ["--allow-natives-syntax",
-               "-e", "var NAME = '%s', ARGC = %s;" % (name, argc)]
-      test = testcase.TestCase(self, name, flags)
-      tests.append(test)
+      try:
+        (name, argc) = line.split(",")
+        flags = ["--allow-natives-syntax",
+                 "-e", "var NAME = '%s', ARGC = %s;" % (name, argc)]
+        test = testcase.TestCase(self, name, flags)
+        tests.append(test)
+      except:
+        # Work-around: If parsing didn't work, it might have been due to output
+        # caused by other d8 flags.
+        pass
     return tests
 
   def GetFlagsForTestCase(self, testcase, context):