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

Side by Side Diff: build/android/pylib/gtest/test_runner.py

Issue 1075783002: Enable components_browsertests on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DistillerPageWebContentsTest and DomDistillerDistillablePageUtilsTest Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 import re 7 import re
8 8
9 from pylib import pexpect 9 from pylib import pexpect
10 from pylib import ports 10 from pylib import ports
(...skipping 12 matching lines...) Expand all
23 RE_PASSED = re.compile('\\[ PASSED \\] ?(.*)\r\n') 23 RE_PASSED = re.compile('\\[ PASSED \\] ?(.*)\r\n')
24 RE_RUNNER_FAIL = re.compile('\\[ RUNNER_FAILED \\] ?(.*)\r\n') 24 RE_RUNNER_FAIL = re.compile('\\[ RUNNER_FAILED \\] ?(.*)\r\n')
25 # Signal handlers are installed before starting tests 25 # Signal handlers are installed before starting tests
26 # to output the CRASHED marker when a crash happens. 26 # to output the CRASHED marker when a crash happens.
27 RE_CRASH = re.compile('\\[ CRASHED \\](.*)\r\n') 27 RE_CRASH = re.compile('\\[ CRASHED \\](.*)\r\n')
28 28
29 29
30 def _TestSuiteRequiresMockTestServer(suite_name): 30 def _TestSuiteRequiresMockTestServer(suite_name):
31 """Returns True if the test suite requires mock test server.""" 31 """Returns True if the test suite requires mock test server."""
32 tests_require_net_test_server = ['unit_tests', 'net_unittests', 32 tests_require_net_test_server = ['unit_tests', 'net_unittests',
33 'components_browsertests',
33 'content_unittests', 34 'content_unittests',
34 'content_browsertests'] 35 'content_browsertests']
35 return (suite_name in 36 return (suite_name in
36 tests_require_net_test_server) 37 tests_require_net_test_server)
37 38
38 def _TestSuiteRequiresHighPerfMode(suite_name): 39 def _TestSuiteRequiresHighPerfMode(suite_name):
39 """Returns True if the test suite requires high performance mode.""" 40 """Returns True if the test suite requires high performance mode."""
40 return 'perftests' in suite_name 41 return 'perftests' in suite_name
41 42
42 class TestRunner(base_test_runner.BaseTestRunner): 43 class TestRunner(base_test_runner.BaseTestRunner):
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 #override 188 #override
188 def TearDown(self): 189 def TearDown(self):
189 """Cleans up the test enviroment for the test suite.""" 190 """Cleans up the test enviroment for the test suite."""
190 for s in self._servers: 191 for s in self._servers:
191 s.TearDown() 192 s.TearDown()
192 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): 193 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name):
193 self._perf_controller.SetDefaultPerfMode() 194 self._perf_controller.SetDefaultPerfMode()
194 self.test_package.ClearApplicationState(self.device) 195 self.test_package.ClearApplicationState(self.device)
195 self.tool.CleanUpEnvironment() 196 self.tool.CleanUpEnvironment()
196 super(TestRunner, self).TearDown() 197 super(TestRunner, self).TearDown()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698