diff options
| author | David Göransson <david.goransson@mullvad.net> | 2024-07-31 14:48:06 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2024-07-31 14:48:06 +0200 |
| commit | 74ab3c0812d38ec521348324bb675cf0b635fb54 (patch) | |
| tree | a64c7d3617aa665766817eb2dc24f0c550eb57fb | |
| parent | 59929c15536a4a7510e9e7a5dd844bd3332ad8a4 (diff) | |
| parent | 19530f153185a8b929f255439b38a829dc022e5c (diff) | |
| download | mullvadvpn-74ab3c0812d38ec521348324bb675cf0b635fb54.tar.xz mullvadvpn-74ab3c0812d38ec521348324bb675cf0b635fb54.zip | |
Merge branch 'better-detection-for-faulty-screen-tests-droid-1211'
| -rwxr-xr-x | android/scripts/run-instrumented-tests-locally.sh | 5 | ||||
| -rwxr-xr-x | android/scripts/run-instrumented-tests.sh | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/android/scripts/run-instrumented-tests-locally.sh b/android/scripts/run-instrumented-tests-locally.sh index 4a642356eb..d8a4cad8ab 100755 --- a/android/scripts/run-instrumented-tests-locally.sh +++ b/android/scripts/run-instrumented-tests-locally.sh @@ -7,4 +7,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$SCRIPT_DIR"/.. ./gradlew assembleOssProdAndroidTest ./gradlew app:assembleOssProdDebug -"$SCRIPT_DIR"/run-instrumented-tests.sh app +REPORT_DIR=$(mktemp -d) +export REPORT_DIR +"$SCRIPT_DIR"/run-instrumented-tests.sh --test-type app --infra-flavor prod --billing-flavor oss + diff --git a/android/scripts/run-instrumented-tests.sh b/android/scripts/run-instrumented-tests.sh index f966bcfa12..f43b3a9972 100755 --- a/android/scripts/run-instrumented-tests.sh +++ b/android/scripts/run-instrumented-tests.sh @@ -8,7 +8,7 @@ cd "$SCRIPT_DIR" AUTO_FETCH_TEST_HELPER_APKS=${AUTO_FETCH_TEST_HELPER_APKS:-"false"} APK_BASE_DIR=${APK_BASE_DIR:-"$SCRIPT_DIR/.."} -LOG_FAILURE_MESSAGE="FAILURES!!!" +LOG_SUCCESS_REGEX="OK \([0-9]+ tests\)" ORCHESTRATOR_URL=https://dl.google.com/android/maven2/androidx/test/orchestrator/1.5.0/orchestrator-1.5.0.apk TEST_SERVICES_URL=https://dl.google.com/android/maven2/androidx/test/services/test-services/1.5.0/test-services-1.5.0.apk @@ -226,15 +226,15 @@ adb uninstall androidx.test.services || echo "Test services package not installe adb uninstall androidx.test.orchestrator || echo "Test orchestrator package not installed" echo "" -echo "### Checking logs for failures ###" -if grep -q "$LOG_FAILURE_MESSAGE" "$INSTRUMENTATION_LOG_FILE_PATH"; then +echo "### Checking logs for success message ###" +if grep -q -E "$LOG_SUCCESS_REGEX" "$INSTRUMENTATION_LOG_FILE_PATH"; then + echo "Success, no failures!" +else echo "One or more tests failed, see logs for more details." echo "Collecting report..." adb pull "$DEVICE_SCREENSHOT_PATH" "$LOCAL_SCREENSHOT_PATH" || echo "No screenshots" adb logcat -d > "$LOGCAT_FILE_PATH" exit 1 -else - echo "No failures!" fi if [[ -n ${TEMP_DOWNLOAD_DIR-} ]]; then |
