Skip to content

Commit e00642f

Browse files
authored
Merge pull request #3194 from modocache/android-deploy-path-default
[Android] Specify default device deploy path
2 parents 104a72f + 6c053de commit e00642f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

docs/Android.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ $ utils/build-script \
198198
-R \ # Build in ReleaseAssert mode.
199199
-T \ # Run all tests.
200200
--android \ # Build for Android.
201-
--android-deploy-device-path /data/local/tmp \ # Temporary directory on the device where Android tests are run.
202201
--android-ndk ~/android-ndk-r12 \ # Path to an Android NDK.
203202
--android-ndk-version 21 \
204203
--android-icu-uc ~/libicu-android/armeabi-v7a/libicuuc.so \

test/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ if(PYTHONINTERP_FOUND)
205205
# These are supported testing SDKs, but their implementation of
206206
# `command_upload_stdlib` is hidden.
207207
elseif("${SDK}" STREQUAL "ANDROID")
208+
if("${SWIFT_ANDROID_DEPLOY_DEVICE_PATH}" STREQUAL "")
209+
message(FATAL_ERROR
210+
"When running Android host tests, you must specify the directory on the device "
211+
"to which Swift build products will be deployed.")
212+
endif()
213+
208214
# Warning: This step will fail if you do not have an Android device
209215
# connected via USB. See docs/Android.md for details on
210216
# how to run the test suite for Android.

utils/build-script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,7 @@ details of the setups of other systems or automated environments.""")
17731773
help="Path on an Android device to which built Swift stdlib products "
17741774
"will be deployed. If running host tests, specify the '{}' "
17751775
"directory.".format(adb.commands.DEVICE_TEMP_DIR),
1776+
default=adb.commands.DEVICE_TEMP_DIR,
17761777
metavar="PATH")
17771778

17781779
parser.add_argument(

0 commit comments

Comments
 (0)