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

Unified Diff: mojo/tools/mopy/gtest_list_tests.py

Issue 741323002: Handle and surface application test failures. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Address comments. Created 6 years, 1 month 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 | « mojo/tools/apptest_runner.py ('k') | mojo/tools/mopy/gtest_list_tests_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0d5a66e9dce16f5f1ecc6eb60a2b0a816f02fff7 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" %
+ gtest_list_tests_output)
+
output_lines = gtest_list_tests_output.split('\n')
test_list = []
« no previous file with comments | « mojo/tools/apptest_runner.py ('k') | mojo/tools/mopy/gtest_list_tests_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698