Chromium Code Reviews| Index: mojo/tools/mopy/gtest_list_tests.py |
| diff --git a/mojo/tools/mopy/gtest_list_tests.py b/mojo/tools/mopy/gtest_list_tests.py |
| index 8b3369d20451ed5b41b728a770849e595564ff9b..8209280c9144d2da538d20b31287b29c1cea334e 100644 |
| --- a/mojo/tools/mopy/gtest_list_tests.py |
| +++ b/mojo/tools/mopy/gtest_list_tests.py |
| @@ -2,10 +2,17 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +import re |
| + |
| + |
| def gtest_list_tests(gtest_list_tests_output): |
| """Returns a list of strings formatted as TestSuite.TestFixture from the |
| output of running --gtest_list_tests on a GTEST application.""" |
| + if not re.match("^(\w*\.\r?\n( \w*\r?\n)+)+", gtest_list_tests_output): |
| + raise Exception ("Unrecognized --gtest_list_tests output:\n%s" % |
|
viettrungluu
2014/11/24 20:22:58
nit: No space before '('.
msw
2014/11/24 20:47:31
Done.
|
| + gtest_list_tests_output) |
| + |
| output_lines = gtest_list_tests_output.split('\n') |
| test_list = [] |