diff options
| author | Albin <albin@mullvad.net> | 2024-02-06 19:15:27 +0100 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2024-02-07 15:54:39 +0100 |
| commit | 45575e542d79ffb9e5936a52c5dadd772bfbe7b7 (patch) | |
| tree | 5b7a388f3216a07d90bc6f722feb772626189c80 | |
| parent | 0cd3aced962cb29c14f5b6b7fe4056a3fb3a8308 (diff) | |
| download | mullvadvpn-45575e542d79ffb9e5936a52c5dadd772bfbe7b7.tar.xz mullvadvpn-45575e542d79ffb9e5936a52c5dadd772bfbe7b7.zip | |
Fix test runner temp dir
This fix ensures that the script can be run by multiple
users on the same machine.
| -rwxr-xr-x | android/scripts/run-instrumented-tests.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/android/scripts/run-instrumented-tests.sh b/android/scripts/run-instrumented-tests.sh index e72d4687bd..0288439f56 100755 --- a/android/scripts/run-instrumented-tests.sh +++ b/android/scripts/run-instrumented-tests.sh @@ -10,8 +10,10 @@ AUTO_FETCH_TEST_HELPER_APKS=${AUTO_FETCH_TEST_HELPER_APKS:-"false"} APK_BASE_DIR=${APK_BASE_DIR:-"$SCRIPT_DIR/.."} LOG_FAILURE_MESSAGE="FAILURES!!!" -DEFAULT_ORCHESTRATOR_APK_PATH=/tmp/orchestrator.apk -DEFAULT_TEST_SERVICES_APK_PATH=/tmp/test-services.apk +TEMP_DIR=$(mktemp -d -t test-run-XXXX) + +DEFAULT_ORCHESTRATOR_APK_PATH=$TEMP_DIR/orchestrator.apk +DEFAULT_TEST_SERVICES_APK_PATH=$TEMP_DIR/test-services.apk ORCHESTRATOR_URL=https://dl.google.com/android/maven2/androidx/test/orchestrator/1.4.2/orchestrator-1.4.2.apk TEST_SERVICES_URL=https://dl.google.com/android/maven2/androidx/test/services/test-services/1.4.2/test-services-1.4.2.apk @@ -141,7 +143,7 @@ case "$TEST_TYPE" in ;; esac -LOCAL_TMP_REPORT_PATH="/tmp/mullvad-$TEST_TYPE-instrumentation-report" +LOCAL_TMP_REPORT_PATH="$TEMP_DIR/mullvad-$TEST_TYPE-instrumentation-report" INSTRUMENTATION_LOG_FILE_PATH="$LOCAL_TMP_REPORT_PATH/instrumentation-log.txt" LOGCAT_FILE_PATH="$LOCAL_TMP_REPORT_PATH/logcat.txt" LOCAL_SCREENSHOT_PATH="$LOCAL_TMP_REPORT_PATH/screenshots" @@ -232,3 +234,5 @@ if grep -q "$LOG_FAILURE_MESSAGE" "$INSTRUMENTATION_LOG_FILE_PATH"; then else echo "No failures!" fi + +rm -rf "$TEMP_DIR" |
