Reviewers: Michael Achenbach,

Description:
Fix parsing of --gtest_list_tests output.

[email protected]

Please review this at https://codereview.chromium.org/485273004/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+12, -8 lines):
  M test/base-unittests/testcfg.py
  M test/compiler-unittests/testcfg.py
  M test/heap-unittests/testcfg.py
  M test/runtime-unittests/testcfg.py


Index: test/base-unittests/testcfg.py
diff --git a/test/base-unittests/testcfg.py b/test/base-unittests/testcfg.py
index 0ed46dcdb117b5060fae8e8502cf6b18de525002..8791793c0a88d55caa3f7c22f5f091a7a2099589 100644
--- a/test/base-unittests/testcfg.py
+++ b/test/base-unittests/testcfg.py
@@ -28,10 +28,11 @@ class BaseUnitTestsSuite(testsuite.TestSuite):
       return []
     tests = []
     test_case = ''
-    for test_desc in output.stdout.strip().split():
+    for line in output.stdout.splitlines():
+      test_desc = line.strip().split()[0]
       if test_desc.endswith('.'):
         test_case = test_desc
-      else:
+      elif test_case:
test = testcase.TestCase(self, test_case + test_desc, dependency=None)
         tests.append(test)
     tests.sort()
Index: test/compiler-unittests/testcfg.py
diff --git a/test/compiler-unittests/testcfg.py b/test/compiler-unittests/testcfg.py index 4eec956f7e3cca07d0cbccb4724e8884e62e355f..dec21f6e6e1fd89ccf12afce0c40d279831d7357 100644
--- a/test/compiler-unittests/testcfg.py
+++ b/test/compiler-unittests/testcfg.py
@@ -28,10 +28,11 @@ class CompilerUnitTestsSuite(testsuite.TestSuite):
       return []
     tests = []
     test_case = ''
-    for test_desc in output.stdout.strip().split():
+    for line in output.stdout.splitlines():
+      test_desc = line.strip().split()[0]
       if test_desc.endswith('.'):
         test_case = test_desc
-      else:
+      elif test_case:
test = testcase.TestCase(self, test_case + test_desc, dependency=None)
         tests.append(test)
     tests.sort()
Index: test/heap-unittests/testcfg.py
diff --git a/test/heap-unittests/testcfg.py b/test/heap-unittests/testcfg.py
index 7c80a75ea2f82a23e62813b143104d96aecd4911..f6e4177626fdf68b943b6d6135cc771a7dc2e3c9 100644
--- a/test/heap-unittests/testcfg.py
+++ b/test/heap-unittests/testcfg.py
@@ -28,10 +28,11 @@ class HeapUnitTestsSuite(testsuite.TestSuite):
       return []
     tests = []
     test_case = ''
-    for test_desc in output.stdout.strip().split():
+    for line in output.stdout.splitlines():
+      test_desc = line.strip().split()[0]
       if test_desc.endswith('.'):
         test_case = test_desc
-      else:
+      elif test_case:
test = testcase.TestCase(self, test_case + test_desc, dependency=None)
         tests.append(test)
     tests.sort()
Index: test/runtime-unittests/testcfg.py
diff --git a/test/runtime-unittests/testcfg.py b/test/runtime-unittests/testcfg.py index f89fadcf5feb66d418f0fbe502586bfb7e548823..aa2ba4657bccdda18e358ed0edb23556b79f5204 100644
--- a/test/runtime-unittests/testcfg.py
+++ b/test/runtime-unittests/testcfg.py
@@ -28,10 +28,11 @@ class RuntimeUnitTestsSuite(testsuite.TestSuite):
       return []
     tests = []
     test_case = ''
-    for test_desc in output.stdout.strip().split():
+    for line in output.stdout.splitlines():
+      test_desc = line.strip().split()[0]
       if test_desc.endswith('.'):
         test_case = test_desc
-      else:
+      elif test_case:
test = testcase.TestCase(self, test_case + test_desc, dependency=None)
         tests.append(test)
     tests.sort()


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to