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

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

Issue 689293002: Add option to push files to device using isolate for instrumentation tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 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 """Base class for running tests on a single device.""" 5 """Base class for running tests on a single device."""
6 6
7 # TODO(jbudorick) Deprecate and remove this class and all subclasses after 7 # TODO(jbudorick) Deprecate and remove this class and all subclasses after
8 # any relevant parts have been ported to the new environment + test instance 8 # any relevant parts have been ported to the new environment + test instance
9 # model. 9 # model.
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 Returns: 66 Returns:
67 Tuple containing: 67 Tuple containing:
68 (base_test_result.TestRunResults, tests to rerun or None) 68 (base_test_result.TestRunResults, tests to rerun or None)
69 """ 69 """
70 raise NotImplementedError 70 raise NotImplementedError
71 71
72 def InstallTestPackage(self): 72 def InstallTestPackage(self):
73 """Installs the test package once before all tests are run.""" 73 """Installs the test package once before all tests are run."""
74 pass 74 pass
75 75
76 def PushDataDeps(self):
77 """Push all data deps to device once before all tests are run."""
78 pass
79
80 def SetUp(self): 76 def SetUp(self):
81 """Run once before all tests are run.""" 77 """Run once before all tests are run."""
82 self.InstallTestPackage() 78 self.InstallTestPackage()
83 self.PushDataDeps()
84 79
85 def TearDown(self): 80 def TearDown(self):
86 """Run once after all tests are run.""" 81 """Run once after all tests are run."""
87 self.ShutdownHelperToolsForTestSuite() 82 self.ShutdownHelperToolsForTestSuite()
88 if self._cleanup_test_files: 83 if self._cleanup_test_files:
89 self.device.old_interface.RemovePushedFiles() 84 self.device.old_interface.RemovePushedFiles()
90 85
91 def LaunchTestHttpServer(self, document_root, port=None, 86 def LaunchTestHttpServer(self, document_root, port=None,
92 extra_config_contents=None): 87 extra_config_contents=None):
93 """Launches an HTTP server to serve HTTP tests. 88 """Launches an HTTP server to serve HTTP tests.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 break 176 break
182 else: 177 else:
183 error_msgs.append(error_msg) 178 error_msgs.append(error_msg)
184 self._spawning_server.Stop() 179 self._spawning_server.Stop()
185 # Wait for 2 seconds then restart. 180 # Wait for 2 seconds then restart.
186 time.sleep(2) 181 time.sleep(2)
187 if not server_ready: 182 if not server_ready:
188 logging.error(';'.join(error_msgs)) 183 logging.error(';'.join(error_msgs))
189 raise Exception('Can not start the test spawner server.') 184 raise Exception('Can not start the test spawner server.')
190 self._PushTestServerPortInfoToDevice() 185 self._PushTestServerPortInfoToDevice()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698