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

Side by Side Diff: build/android/pylib/instrumentation/test_package.py

Issue 13577003: [Android] Specify dependency files for instrumentation tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor change: Also add ssl/certs dep to contentshell Created 7 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 """Class representing instrumentation test apk and jar.""" 5 """Class representing instrumentation test apk and jar."""
6 6
7 import os 7 import os
8 8
9 from pylib.utils import apk_helper 9 from pylib.utils import apk_helper
10 10
11 import test_jar 11 import test_jar
12 12
13 13
14 class TestPackage(test_jar.TestJar): 14 class TestPackage(test_jar.TestJar):
15 def __init__(self, apk_path, jar_path): 15 def __init__(self, apk_path, jar_path):
16 test_jar.TestJar.__init__(self, jar_path) 16 test_jar.TestJar.__init__(self, jar_path)
17 17
18 if not os.path.exists(apk_path): 18 if not os.path.exists(apk_path):
19 raise Exception('%s not found, please build it' % apk_path) 19 raise Exception('%s not found, please build it' % apk_path)
20 self._apk_path = apk_path 20 self._apk_path = apk_path
21 self._apk_name = os.path.splitext(os.path.basename(apk_path))[0]
21 self._package_name = apk_helper.GetPackageName(self._apk_path) 22 self._package_name = apk_helper.GetPackageName(self._apk_path)
22 23
23 def GetApkPath(self): 24 def GetApkPath(self):
25 """Returns the absolute path to the APK."""
24 return self._apk_path 26 return self._apk_path
25 27
28 def GetApkName(self):
29 """Returns the name of the apk without the suffix."""
30 return self._apk_name
31
26 def GetPackageName(self): 32 def GetPackageName(self):
27 """Returns the package name of this APK.""" 33 """Returns the package name of this APK."""
28 return self._package_name 34 return self._package_name
29 35
30 # Override. 36 # Override.
31 def Install(self, adb): 37 def Install(self, adb):
32 adb.ManagedInstall(self.GetApkPath(), package_name=self.GetPackageName()) 38 adb.ManagedInstall(self.GetApkPath(), package_name=self.GetPackageName())
OLDNEW
« no previous file with comments | « build/android/pylib/host_driven/run_python_tests.py ('k') | build/android/pylib/instrumentation/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698