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

Unified Diff: build/android/pylib/instrumentation/instrumentation_test_instance.py

Issue 1571803002: [Android] Prepare build/android/ for catapult+devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@create-device-library-links
Patch Set: rebase Created 4 years, 11 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
Index: build/android/pylib/instrumentation/instrumentation_test_instance.py
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index 84b130d18fdca92527987004b500cb6045903c4f..00ce2bca305b0908631fbb49dfbc751f553ad980 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -8,20 +8,19 @@ import logging
import os
import pickle
import re
-import sys
from devil.android import apk_helper
from devil.android import md5sum
from pylib import constants
from pylib.base import base_test_result
from pylib.base import test_instance
+from pylib.constants import host_paths
from pylib.instrumentation import test_result
from pylib.instrumentation import instrumentation_parser
from pylib.utils import proguard
-sys.path.append(
- os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib', 'common'))
-import unittest_util # pylint: disable=import-error
+with host_paths.SysPath(host_paths.BUILD_COMMON_PATH):
+ import unittest_util # pylint: disable=import-error
# Ref: http://developer.android.com/reference/android/app/Activity.html
_ACTIVITY_RESULT_CANCELED = 0
@@ -441,7 +440,7 @@ class InstrumentationTestInstance(test_instance.TestInstance):
if self._test_data:
for t in self._test_data:
device_rel_path, host_rel_path = t.split(':')
- host_abs_path = os.path.join(constants.DIR_SOURCE_ROOT, host_rel_path)
+ host_abs_path = os.path.join(host_paths.DIR_SOURCE_ROOT, host_rel_path)
self._data_deps.extend(
[(host_abs_path,
[None, 'chrome', 'test', 'data', device_rel_path])])

Powered by Google App Engine
This is Rietveld 408576698