From ab57bfd46fcca6d1b869a39da884fde1c7c18206 Mon Sep 17 00:00:00 2001 From: Richard Pappalardo Date: Wed, 28 Aug 2019 17:02:17 -0700 Subject: [PATCH] fix: dex error on UI test job --- architecture/build.gradle | 4 +++ ...k-armabi-v7a.yml => flank-armeabi-v7a.yml} | 0 .../{flank-x86-64.yml => flank-x86_64.yml} | 0 automation/taskcluster/androidTest/ui-test.sh | 32 ++++++------------- automation/taskcluster/lib/tasks.py | 4 +-- 5 files changed, 15 insertions(+), 25 deletions(-) rename automation/taskcluster/androidTest/{flank-armabi-v7a.yml => flank-armeabi-v7a.yml} (100%) rename automation/taskcluster/androidTest/{flank-x86-64.yml => flank-x86_64.yml} (100%) diff --git a/architecture/build.gradle b/architecture/build.gradle index ecdbf86f5..34b7ff063 100644 --- a/architecture/build.gradle +++ b/architecture/build.gradle @@ -22,6 +22,10 @@ android { consumerProguardFiles 'proguard-rules.pro' } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } androidExtensions { diff --git a/automation/taskcluster/androidTest/flank-armabi-v7a.yml b/automation/taskcluster/androidTest/flank-armeabi-v7a.yml similarity index 100% rename from automation/taskcluster/androidTest/flank-armabi-v7a.yml rename to automation/taskcluster/androidTest/flank-armeabi-v7a.yml diff --git a/automation/taskcluster/androidTest/flank-x86-64.yml b/automation/taskcluster/androidTest/flank-x86_64.yml similarity index 100% rename from automation/taskcluster/androidTest/flank-x86-64.yml rename to automation/taskcluster/androidTest/flank-x86_64.yml diff --git a/automation/taskcluster/androidTest/ui-test.sh b/automation/taskcluster/androidTest/ui-test.sh index 17a939b5b..562919794 100755 --- a/automation/taskcluster/androidTest/ui-test.sh +++ b/automation/taskcluster/androidTest/ui-test.sh @@ -26,10 +26,10 @@ display_help() { echo echo "Examples:" echo "To run UI tests on ARM device shard (1 test / shard)" - echo "$ ui-test.sh arm -1" + echo "$ ui-test.sh arm64-v8a -1" echo echo "To run UI tests on X86 device (on 3 shards)" - echo "$ ui-test.sh feature x86 3" + echo "$ ui-test.sh x86 3" echo } @@ -40,7 +40,7 @@ if [[ $# -lt 1 ]]; then exit 1 fi -device_type="$1" # arm | x86 +device_type="$1" # arm64-v8a | armeabi-v7a | x86_64 | x86 if [[ ! -z "$2" ]]; then num_shards=$2 fi @@ -68,34 +68,20 @@ gcloud auth activate-service-account --key-file "$GOOGLE_APPLICATION_CREDENTIALS echo echo -# From now on disable exiting on error. If the tests fail we want to continue +# Disable exiting on error. If the tests fail we want to continue # and try to download the artifacts. We will exit with the actual error code later. set +e -APK_APP="${PATH_APK}/app-geckoNightly-${deviceType,,}-debug.apk" -if [[ "${device_type,,}" == "aarch64" ]] -then - flank_template="${PATH_TEST}/flank-aarch64.yml" - APK_APP="${PATH_APK}/app-geckoNightly-arm64-v8a-debug.apk" -elif [[ "${device_type,,}" == "arm" ]] -then - flank_template="${PATH_TEST}/flank-arm.yml" - APK_APP="${PATH_APK}/app-geckoNightly-armeabi-v7a-debug.apk" -elif [[ "${device_type,,}" == "x86_64" ]] -then - flank_template="${PATH_TEST}/flank-x86-64.yml" - APK_APP="${PATH_APK}/app-geckoNightly-x86_64-debug.apk" -elif [[ "${device_type,,}" == "x86" ]] -then - flank_template="${PATH_TEST}/flank-x86.yml" - APK_APP="${PATH_APK}/app-geckoNightly-x86-debug.apk" +if [[ "${device_type}" =~ ^(arm64-v8a|armeabi-v7a|x86_64|x86)$ ]]; then + APK_APP="${PATH_APK}/app-geckoNightly-${device_type}-debug.apk" + flank_template="${PATH_TEST}/flank-${device_type}.yml" + echo "device_type: ${device_type}" else echo "NOT FOUND" exitcode=1 fi -APK_TEST="./app/build/outputs/apk/androidTest/debug/app-geckoNightly-debug-androidTest.apk" -ls -la ./app/build/outputs/apk/androidTest/debug +APK_TEST="./app/build/outputs/apk/androidTest/geckoNightly/debug/app-geckoNightly-debug-androidTest.apk" # function to exit script with exit code from test run. # (Only 0 if all test executions passed) diff --git a/automation/taskcluster/lib/tasks.py b/automation/taskcluster/lib/tasks.py index 09327ccef..c5efb3bb7 100644 --- a/automation/taskcluster/lib/tasks.py +++ b/automation/taskcluster/lib/tasks.py @@ -183,8 +183,8 @@ class TaskBuilder(object): ) test_commands = ( - 'automation/taskcluster/androidTest/ui-test.sh aarch64 -1', - 'automation/taskcluster/androidTest/ui-test.sh arm -1', + 'automation/taskcluster/androidTest/ui-test.sh arm64-v8a -1', + 'automation/taskcluster/androidTest/ui-test.sh armeabi-v7a -1', ) command = ' && '.join(