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

Unified Diff: build/android/test_runner.py

Issue 1416703003: [Android] Add a configurable environment for devil/. (RELAND 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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/setup.gyp ('k') | build/android/tombstones.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/test_runner.py
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 90210b6cae817d69909853a67420ab67a36cb235..9f1b22e56dd19e66e84ad72b97b081383bff7490 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -16,6 +16,8 @@ import sys
import threading
import unittest
+import devil_chromium
+
from devil import base_error
from devil.android import apk_helper
from devil.android import device_blacklist
@@ -47,6 +49,10 @@ from pylib.results import json_results
from pylib.results import report_results
+_DEVIL_STATIC_CONFIG_FILE = os.path.abspath(os.path.join(
+ constants.DIR_SOURCE_ROOT, 'build', 'android', 'devil_config.json'))
+
+
def AddCommonOptions(parser):
"""Adds all common options to |parser|."""
@@ -111,8 +117,19 @@ def ProcessCommonOptions(args):
constants.SetBuildDirectory(args.build_directory)
if args.output_directory:
constants.SetOutputDirectory(args.output_directory)
+
+ devil_custom_deps = None
if args.adb_path:
- constants.SetAdbPath(args.adb_path)
+ devil_custom_deps = {
+ 'adb': {
+ 'android_host': [args.adb_path]
+ }
+ }
+
+ devil_chromium.Initialize(
+ output_directory=constants.GetOutDirectory(),
+ custom_deps=devil_custom_deps)
+
# Some things such as Forwarder require ADB to be in the environment path.
adb_dir = os.path.dirname(constants.GetAdbPath())
if adb_dir and adb_dir not in os.environ['PATH'].split(os.pathsep):
« no previous file with comments | « build/android/setup.gyp ('k') | build/android/tombstones.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698