OLD | NEW |
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 | 5 |
6 import os | 6 import os |
7 import shlex | 7 import shlex |
8 import sys | 8 import sys |
9 import tempfile | 9 import tempfile |
10 import time | 10 import time |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 self.adb.RunShellCommand( | 105 self.adb.RunShellCommand( |
106 'am start -n ' | 106 'am start -n ' |
107 'org.chromium.native_test/' | 107 'org.chromium.native_test/' |
108 'org.chromium.native_test.ChromeNativeTestActivity') | 108 'org.chromium.native_test.ChromeNativeTestActivity') |
109 finally: | 109 finally: |
110 self.tool.CleanUpEnvironment() | 110 self.tool.CleanUpEnvironment() |
111 logfile = android_commands.NewLineNormalizer(sys.stdout) | 111 logfile = android_commands.NewLineNormalizer(sys.stdout) |
112 return self._WatchTestOutput(self._WatchFifo(timeout=10, logfile=logfile)) | 112 return self._WatchTestOutput(self._WatchFifo(timeout=10, logfile=logfile)) |
113 | 113 |
114 def StripAndCopyExecutable(self): | 114 def StripAndCopyExecutable(self): |
| 115 self.tool.CopyFiles() |
115 # Always uninstall the previous one (by activity name); we don't | 116 # Always uninstall the previous one (by activity name); we don't |
116 # know what was embedded in it. | 117 # know what was embedded in it. |
117 self.adb.ManagedInstall(self.test_suite_full, False, | 118 self.adb.ManagedInstall(self.test_suite_full, False, |
118 package_name='org.chromium.native_test') | 119 package_name='org.chromium.native_test') |
119 | 120 |
120 def _GetTestSuiteBaseName(self): | 121 def _GetTestSuiteBaseName(self): |
121 """Returns the base name of the test suite.""" | 122 """Returns the base name of the test suite.""" |
122 # APK test suite names end with '-debug.apk' | 123 # APK test suite names end with '-debug.apk' |
123 return os.path.basename(self.test_suite).rsplit('-debug', 1)[0] | 124 return os.path.basename(self.test_suite).rsplit('-debug', 1)[0] |
OLD | NEW |