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

Unified Diff: build/android/pylib/gtest/test_package_exe.py

Issue 294113003: [Android] Convert to DeviceUtils versions of WaitUntilFullyBooted and GetExternalStoragePath. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/gtest/test_package_apk.py ('k') | build/android/pylib/gtest/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/gtest/test_package_exe.py
diff --git a/build/android/pylib/gtest/test_package_exe.py b/build/android/pylib/gtest/test_package_exe.py
index 9429abd0e0461ff5abee888b88fcbcecd8f23478..18146adfff297da9b850a743243c31b1d30eb1fe 100644
--- a/build/android/pylib/gtest/test_package_exe.py
+++ b/build/android/pylib/gtest/test_package_exe.py
@@ -12,6 +12,7 @@ import tempfile
from pylib import cmd_helper
from pylib import constants
from pylib import pexpect
+from pylib.device import device_errors
from pylib.gtest.test_package import TestPackage
@@ -62,14 +63,17 @@ class TestPackageExecutable(TestPackage):
# /code/chrome if GCOV_PREFIX_STRIP=3
try:
depth = os.environ['NATIVE_COVERAGE_DEPTH_STRIP']
+ export_string = ('export GCOV_PREFIX="%s/gcov"\n' %
+ device.GetExternalStoragePath())
+ export_string += 'export GCOV_PREFIX_STRIP=%s\n' % depth
+ return export_string
except KeyError:
logging.info('NATIVE_COVERAGE_DEPTH_STRIP is not defined: '
'No native coverage.')
return ''
- export_string = ('export GCOV_PREFIX="%s/gcov"\n' %
- device.old_interface.GetExternalStorage())
- export_string += 'export GCOV_PREFIX_STRIP=%s\n' % depth
- return export_string
+ except device_errors.CommandFailedError:
+ logging.info('No external storage found: No native coverage.')
+ return ''
#override
def ClearApplicationState(self, device):
« no previous file with comments | « build/android/pylib/gtest/test_package_apk.py ('k') | build/android/pylib/gtest/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698