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

Unified Diff: mojo/tools/gtest.py

Issue 892933002: Filter out log lines when parsing output of --gtest_list_tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/gtest.py
diff --git a/mojo/tools/gtest.py b/mojo/tools/gtest.py
index a731115ae5e777424932a1f33d793b94289ae654..c03b62f49cc4b922022761bc756c35dc3ca45d1e 100644
--- a/mojo/tools/gtest.py
+++ b/mojo/tools/gtest.py
@@ -87,6 +87,10 @@ 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."""
+ # Remove log lines.
+ gtest_list_tests_output = (
+ re.sub("^\[.*\n", "", gtest_list_tests_output, flags=re.MULTILINE))
+
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698