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

Side by Side Diff: build/android/pylib/base/base_test_runner.py

Issue 12544033: [Android] Rewrite base test result classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 contextlib 5 import contextlib
6 import httplib 6 import httplib
7 import logging 7 import logging
8 import os 8 import os
9 import tempfile 9 import tempfile
10 import time 10 import time
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 '%d:%d' % (self.test_server_spawner_port, 65 '%d:%d' % (self.test_server_spawner_port,
66 self.test_server_port)) 66 self.test_server_port))
67 67
68 def RunTest(self, test): 68 def RunTest(self, test):
69 """Runs a test. Needs to be overridden. 69 """Runs a test. Needs to be overridden.
70 70
71 Args: 71 Args:
72 test: A test to run. 72 test: A test to run.
73 73
74 Returns: 74 Returns:
75 Tuple containing: (test_result.TestResults, tests to rerun or None) 75 Tuple containing:
76 (base_test_result.TestRunResults, tests to rerun or None)
76 """ 77 """
77 raise NotImplementedError 78 raise NotImplementedError
78 79
79 def SetUp(self): 80 def SetUp(self):
80 """Run once before all tests are run.""" 81 """Run once before all tests are run."""
81 Forwarder.KillDevice(self.adb, self.tool) 82 Forwarder.KillDevice(self.adb, self.tool)
82 83
83 def TearDown(self): 84 def TearDown(self):
84 """Run once after all tests are run.""" 85 """Run once after all tests are run."""
85 self.ShutdownHelperToolsForTestSuite() 86 self.ShutdownHelperToolsForTestSuite()
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 # Wait for 2 seconds then restart. 201 # Wait for 2 seconds then restart.
201 time.sleep(2) 202 time.sleep(2)
202 if not server_ready: 203 if not server_ready:
203 logging.error(';'.join(error_msgs)) 204 logging.error(';'.join(error_msgs))
204 raise Exception('Can not start the test spawner server.') 205 raise Exception('Can not start the test spawner server.')
205 self._PushTestServerPortInfoToDevice() 206 self._PushTestServerPortInfoToDevice()
206 self._spawner_forwarder = self._CreateAndRunForwarder( 207 self._spawner_forwarder = self._CreateAndRunForwarder(
207 self.adb, 208 self.adb,
208 [(self.test_server_spawner_port, self.test_server_spawner_port)], 209 [(self.test_server_spawner_port, self.test_server_spawner_port)],
209 self.tool, '127.0.0.1', self.build_type) 210 self.tool, '127.0.0.1', self.build_type)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698