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

Unified Diff: build/android/PRESUBMIT.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 | « no previous file | build/android/adb_install_apk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/PRESUBMIT.py
diff --git a/build/android/PRESUBMIT.py b/build/android/PRESUBMIT.py
index 5e4c988ed05cb96411242bcdfddd38dae0fb9144..38b2f01766088b7f1d948addc3f6045dffb804a8 100644
--- a/build/android/PRESUBMIT.py
+++ b/build/android/PRESUBMIT.py
@@ -12,9 +12,11 @@ details on the presubmit API built into depot_tools.
def CommonChecks(input_api, output_api):
output = []
+ build_android_dir = input_api.PresubmitLocalPath()
+
def J(*dirs):
"""Returns a path relative to presubmit directory."""
- return input_api.os_path.join(input_api.PresubmitLocalPath(), *dirs)
+ return input_api.os_path.join(build_android_dir, *dirs)
build_pys = [
r'gyp/.*\.py$',
@@ -40,7 +42,7 @@ def CommonChecks(input_api, output_api):
pylib_test_env = dict(input_api.environ)
pylib_test_env.update({
- 'PYTHONPATH': input_api.PresubmitLocalPath(),
+ 'PYTHONPATH': build_android_dir,
'PYTHONDONTWRITEBYTECODE': '1',
})
output.extend(input_api.canned_checks.RunUnitTests(
@@ -48,13 +50,6 @@ def CommonChecks(input_api, output_api):
output_api,
unit_tests=[
J('.', 'emma_coverage_stats_test.py'),
- J('devil', 'android', 'fastboot_utils_test.py'),
- J('devil', 'android', 'battery_utils_test.py'),
- J('devil', 'android', 'device_utils_test.py'),
- J('devil', 'android', 'md5sum_test.py'),
- J('devil', 'android', 'logcat_monitor_test.py'),
- J('devil', 'utils', 'cmd_helper_test.py'),
- J('devil', 'utils', 'timeout_retry_unittest.py'),
J('gyp', 'util', 'md5_check_test.py'),
J('play_services', 'update_test.py'),
J('pylib', 'base', 'test_dispatcher_unittest.py'),
@@ -64,6 +59,26 @@ def CommonChecks(input_api, output_api):
J('pylib', 'results', 'json_results_test.py'),
],
env=pylib_test_env))
+
+
+ devil_test_env = dict(pylib_test_env)
+ devil_test_env.update({
+ 'DEVIL_ENV_CONFIG':
+ input_api.os_path.join(build_android_dir, 'devil_chromium.json')
+ })
+ output.extend(input_api.canned_checks.RunUnitTests(
+ input_api,
+ output_api,
+ unit_tests=[
+ J('devil', 'android', 'battery_utils_test.py'),
+ J('devil', 'android', 'device_utils_test.py'),
+ J('devil', 'android', 'fastboot_utils_test.py'),
+ J('devil', 'android', 'md5sum_test.py'),
+ J('devil', 'android', 'logcat_monitor_test.py'),
+ J('devil', 'utils', 'cmd_helper_test.py'),
+ J('devil', 'utils', 'timeout_retry_unittest.py'),
+ ],
+ env=devil_test_env))
return output
« no previous file with comments | « no previous file | build/android/adb_install_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698