diff options
author | 2018-02-23 08:34:16 -0800 | |
---|---|---|
committer | 2018-02-23 08:36:06 -0800 | |
commit | 5d1fb9e239556d868320046fd6d293de99678296 (patch) | |
tree | 8feb54e53e0f8d54dd17d3b1c1a81c1678bd0f86 /src | |
parent | 27043ed144d8442098361faa4a70611788f7eaa3 (diff) |
Pass `--install_test_services=true` test arg to DeviceBroker when running in Bazel because the test services APK is no longer installed by default as of unknown commit
RELNOTES: None.
PiperOrigin-RevId: 186772375
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt b/src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt index 4224dcd67a..ab1cace19a 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt +++ b/src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt @@ -67,6 +67,12 @@ host_service_fixture_services="%host_service_fixture_services%" test_suite_property_name='%test_suite_property_name%' +# Bazel-only test arguments for the device broker +bazel_only_argv=$(cat <<END +--install_test_services=true +END +) + argv=$(cat <<END --aapt=${aapt} \ --adb=${adb} \ @@ -84,7 +90,12 @@ $@ END ) +# We pass in $argv via two channels here: +# 1) regular arguments: parsed normally by internal test entry point. +# 2) --jvm_flag: external AndroidDeviceTestSuite doesn't parse the argvs if +# passed in regularly, so we pass them in via a JVM flag hack and parse them +# at the AndroidDeviceTestSuite constructor. $test_entry_point \ --wrapper_script_flag=--jvm_flag=-D$test_suite_property_name=com.google.android.apps.common.testing.suite.AndroidDeviceTestSuite \ - --wrapper_script_flag=--jvm_flag=-Dargv="$argv" \ + --wrapper_script_flag=--jvm_flag=-Dargv="$bazel_only_argv $argv" \ $argv |