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

Side by Side Diff: build/android/pylib/test_package_apk.py

Issue 10824227: Organize adb install cmds and reboot on failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5
6 import os 6 import os
7 import re 7 import re
8 import sys 8 import sys
9 9
10 import cmd_helper 10 import cmd_helper
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 'am start -n ' 90 'am start -n '
91 'org.chromium.native_test/' 91 'org.chromium.native_test/'
92 'org.chromium.native_test.ChromeNativeTestActivity') 92 'org.chromium.native_test.ChromeNativeTestActivity')
93 finally: 93 finally:
94 self.tool.CleanUpEnvironment() 94 self.tool.CleanUpEnvironment()
95 return self._WatchTestOutput(self.adb.GetMonitoredLogCat()) 95 return self._WatchTestOutput(self.adb.GetMonitoredLogCat())
96 96
97 def StripAndCopyExecutable(self): 97 def StripAndCopyExecutable(self):
98 # Always uninstall the previous one (by activity name); we don't 98 # Always uninstall the previous one (by activity name); we don't
99 # know what was embedded in it. 99 # know what was embedded in it.
100 logging.info('Uninstalling any activity with the test name') 100 self.adb.ManagedInstall(self.test_suite_full, False,
101 self.adb.Adb().SendCommand('uninstall org.chromium.native_test', 101 package_name='org.chromium.native_test')
102 timeout_time=60*5)
103 logging.info('Installing new apk')
104 self.adb.Adb().SendCommand('install -r ' + self.test_suite_full,
105 timeout_time=60*5)
106 logging.info('Install has completed.')
107 102
108 def _GetTestSuiteBaseName(self): 103 def _GetTestSuiteBaseName(self):
109 """Returns the base name of the test suite.""" 104 """Returns the base name of the test suite."""
110 # APK test suite names end with '-debug.apk' 105 # APK test suite names end with '-debug.apk'
111 return os.path.basename(self.test_suite).rsplit('-debug', 1)[0] 106 return os.path.basename(self.test_suite).rsplit('-debug', 1)[0]
OLDNEW
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698