diff options
| -rw-r--r-- | .github/workflows/android-app.yml | 4 | ||||
| -rwxr-xr-x | android/scripts/run-instrumented-tests.sh | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index c6572ddbc7..04bade3349 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -304,7 +304,7 @@ jobs: instrumented-tests: name: Run instrumented tests - runs-on: [self-hosted, android-emulator] + runs-on: [self-hosted, android-device] timeout-minutes: 30 needs: [build-app] strategy: @@ -341,7 +341,7 @@ jobs: instrumented-e2e-tests: name: Run instrumented e2e tests - runs-on: [self-hosted, android-emulator] + runs-on: [self-hosted, android-device] if: github.event_name == 'schedule' || github.event.inputs.run_e2e_tests == 'true' timeout-minutes: 30 needs: [build-app] 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" |
