Commit 554d1a97 authored by ppi's avatar ppi Committed by Commit bot

Filter out log lines when parsing output of --gtest_list_tests.

This patch makes the Chromium apptest runner resilient to missing apps
(e.g. tracing.mojo) polluting the output of mojo_shell that it tries to
parse.

BUG=450356
TBR=jamesr@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#314134}
parent fc83ea8f
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment