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

Side by Side Diff: build/android/pylib/linker/test_runner.py

Issue 167643002: android: Don't require aapt to be on the path during builds and tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rietfail Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 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 """Runs linker tests on a particular device.""" 5 """Runs linker tests on a particular device."""
6 6
7 import logging 7 import logging
8 import os.path 8 import os.path
9 import sys 9 import sys
10 import time 10 import time
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 cleanup_test_files) 65 cleanup_test_files)
66 66
67 #override 67 #override
68 def InstallTestPackage(self): 68 def InstallTestPackage(self):
69 apk_path = os.path.join( 69 apk_path = os.path.join(
70 constants.GetOutDirectory(), 'apks', '%s.apk' % _PACKAGE_NAME) 70 constants.GetOutDirectory(), 'apks', '%s.apk' % _PACKAGE_NAME)
71 71
72 if not os.path.exists(apk_path): 72 if not os.path.exists(apk_path):
73 raise Exception('%s not found, please build it' % apk_path) 73 raise Exception('%s not found, please build it' % apk_path)
74 74
75 package_name = apk_helper.GetPackageName(apk_path) 75 package_name = apk_helper.GetPackageName(constants.ANDROID_SDK_TOOLS,
76 apk_path)
76 self.adb.ManagedInstall(apk_path, package_name) 77 self.adb.ManagedInstall(apk_path, package_name)
77 78
78 #override 79 #override
79 def RunTest(self, test): 80 def RunTest(self, test):
80 """Sets up and runs a test case. 81 """Sets up and runs a test case.
81 82
82 Args: 83 Args:
83 test: An object which is ostensibly a subclass of LinkerTestCaseBase. 84 test: An object which is ostensibly a subclass of LinkerTestCaseBase.
84 85
85 Returns: 86 Returns:
(...skipping 10 matching lines...) Expand all
96 test.tagged_name) 97 test.tagged_name)
97 exc_info = sys.exc_info() 98 exc_info = sys.exc_info()
98 results = base_test_result.TestRunResults() 99 results = base_test_result.TestRunResults()
99 results.AddResult(LinkerExceptionTestResult( 100 results.AddResult(LinkerExceptionTestResult(
100 test.tagged_name, exc_info)) 101 test.tagged_name, exc_info))
101 102
102 if not results.DidRunPass(): 103 if not results.DidRunPass():
103 return results, test 104 return results, test
104 else: 105 else:
105 return results, None 106 return results, None
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698