Skip to content

Commit 9b27d88

Browse files
committed
Fix test runner temp dir
This fix ensures that the script can be run by multiple users on the same machine.
1 parent f8f9c81 commit 9b27d88

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

android/scripts/run-instrumented-tests.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ AUTO_FETCH_TEST_HELPER_APKS=${AUTO_FETCH_TEST_HELPER_APKS:-"false"}
1010
APK_BASE_DIR=${APK_BASE_DIR:-"$SCRIPT_DIR/.."}
1111
LOG_FAILURE_MESSAGE="FAILURES!!!"
1212

13-
DEFAULT_ORCHESTRATOR_APK_PATH=/tmp/orchestrator.apk
14-
DEFAULT_TEST_SERVICES_APK_PATH=/tmp/test-services.apk
13+
TEMP_DIR=$(mktemp -d -t test-run-XXXX)
14+
15+
DEFAULT_ORCHESTRATOR_APK_PATH=$TEMP_DIR/orchestrator.apk
16+
DEFAULT_TEST_SERVICES_APK_PATH=$TEMP_DIR/test-services.apk
1517

1618
ORCHESTRATOR_URL=https://dl.google.com/android/maven2/androidx/test/orchestrator/1.4.2/orchestrator-1.4.2.apk
1719
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
141143
;;
142144
esac
143145

144-
LOCAL_TMP_REPORT_PATH="/tmp/mullvad-$TEST_TYPE-instrumentation-report"
146+
LOCAL_TMP_REPORT_PATH="$TEMP_DIR/mullvad-$TEST_TYPE-instrumentation-report"
145147
INSTRUMENTATION_LOG_FILE_PATH="$LOCAL_TMP_REPORT_PATH/instrumentation-log.txt"
146148
LOGCAT_FILE_PATH="$LOCAL_TMP_REPORT_PATH/logcat.txt"
147149
LOCAL_SCREENSHOT_PATH="$LOCAL_TMP_REPORT_PATH/screenshots"

0 commit comments

Comments
 (0)