Skip to content

Commit

Permalink
For mozilla-mobile#7698 - Change active Firebase Test Lab emulator fr…
Browse files Browse the repository at this point in the history
…om x86 to ARM in UI jobs
  • Loading branch information
AaronMT committed Sep 20, 2022
1 parent b0f1acd commit a50f5cc
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 183 deletions.
36 changes: 36 additions & 0 deletions automation/taskcluster/androidTest/flank-arm-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Google Cloud Documentation: https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
# Flank Documentation: https://flank.github.io/flank/
gcloud:
results-bucket: focus_android_test_artifacts
record-video: true

timeout: 30m
async: false
num-flaky-test-attempts: 1

app: /app/path
test: /test/path

auto-google-login: false
use-orchestrator: true
environment-variables:
clearPackageData: true
directories-to-pull:
- /sdcard/screenshots
performance-metrics: true

test-targets:
- class org.mozilla.focus.activity.SearchTest#testBlankSearchDoesNothing
- class org.mozilla.focus.activity.EraseBrowsingDataTest#deleteHistoryOnRestartTest

device:
- model: Pixel2.arm
version: 30
locale: en_US

flank:
project: GOOGLE_PROJECT
max-test-shards: 1
num-test-runs: 1
output-style: compact
full-junit-result: true
36 changes: 36 additions & 0 deletions automation/taskcluster/androidTest/flank-arm-start-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Google Cloud Documentation: https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
# Flank Documentation: https://flank.github.io/flank/
gcloud:
results-bucket: focus_android_test_artifacts
record-video: true

timeout: 30m
async: false
num-flaky-test-attempts: 1

app: /app/path
test: /test/path

auto-google-login: false
use-orchestrator: true
environment-variables:
clearPackageData: true
directories-to-pull:
- /sdcard/screenshots
performance-metrics: true

test-targets:
- class org.mozilla.focus.activity.SearchTest#testBlankSearchDoesNothing
- class org.mozilla.focus.activity.EraseBrowsingDataTest#deleteHistoryOnRestartTest

device:
- model: Pixel2.arm
version: 30
locale: en_US

flank:
project: GOOGLE_PROJECT
max-test-shards: 1
num-test-runs: 1
output-style: compact
full-junit-result: true
36 changes: 36 additions & 0 deletions automation/taskcluster/androidTest/flank-arm64-v8a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Google Cloud Documentation: https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
# Flank Documentation: https://flank.github.io/flank/
gcloud:
results-bucket: focus_android_test_artifacts
record-video: true

timeout: 30m
async: false
num-flaky-test-attempts: 1

app: /app/path
test: /test/path

auto-google-login: false
use-orchestrator: true
environment-variables:
clearPackageData: true
directories-to-pull:
- /sdcard/screenshots
performance-metrics: true

test-targets:
- package org.mozilla.focus.activity
- package org.mozilla.focus.privacy

device:
- model: Pixel2.arm
version: 30
locale: en_US

flank:
project: GOOGLE_PROJECT
max-test-shards: -1
num-test-runs: 1
output-style: compact
full-junit-result: true
65 changes: 0 additions & 65 deletions automation/taskcluster/androidTest/flank-x86-beta.yml

This file was deleted.

65 changes: 0 additions & 65 deletions automation/taskcluster/androidTest/flank-x86-start-test.yml

This file was deleted.

43 changes: 7 additions & 36 deletions automation/taskcluster/androidTest/flank-x86.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,14 @@
# gcloud args match the official gcloud cli
# https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
# Google Cloud Documentation: https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
# Flank Documentation: https://flank.github.io/flank/
gcloud:
results-bucket: focus_android_test_artifacts
record-video: true

# The maximum possible testing time is 30m on physical devices and 60m on virtual devices.
timeout: 30m
# will start test then close socket. no reports will be generated.
# to retrieve results later, use the "refresh" command
# reports will be generated from /results/matrix_ids.json
#async: true
# will start test then leave socket open. reports will be published
# to /results
# see: https://github.com/TestArmada/flank/issues/339
async: false

# results-history-name
# by default, set to app name
# declare results-history-name to create a separate dropdown menu in Firebase
# see: https://github.com/TestArmada/flank/issues/341
#results-history-name: tmp_parallel

# The number of times a test execution should be re-attempted if one or more failures occur.
# The maximum number of reruns allowed is 10. Default is 0, which implies no reruns.
num-flaky-test-attempts: 1

# test and app are the only required args
app: /app/path
app: /app/path
test: /test/path

auto-google-login: false
Expand All @@ -42,24 +24,13 @@ gcloud:
- package org.mozilla.focus.privacy

device:
- model: Pixel3
version: 30
- model: Pixel2
version: 30
locale: en_US

flank:
project: GOOGLE_PROJECT
# test shards - the amount of groups to split the test suite into
# set to -1 to use one shard per test. default: 1
max-test-shards: -1
# num-test-runs: the amount of times to run the tests.
# 1 runs the tests once. 10 runs all the tests 10x
num-test-runs: 1
### Output Style flag
## Output style of execution status. May be one of [verbose, multi, single, compact].
## For runs with only one test execution the default value is 'verbose', in other cases
## 'multi' is used as the default. The output style 'multi' is not displayed correctly on consoles
## which don't support ansi codes, to avoid corrupted output use single or verbose.
## The output style `compact` is used to produce less detailed output, it prints just Args, test and matrix count, weblinks, cost, and result reports.
output-style: compact
### Full Junit Result flag
## Enable create additional local junit result on local storage with failure nodes on passed flaky tests.
full-junit-result: true
full-junit-result: true
10 changes: 3 additions & 7 deletions automation/taskcluster/androidTest/ui-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,10 @@ set +e

if [[ "${device_type}" =~ ^(arm64-v8a|armeabi-v7a|x86_64|x86)$ ]]; then
flank_template="${PATH_TEST}/flank-${device_type}.yml"
elif [[ "${device_type}" == "x86-start-test" ]]; then
flank_template="${PATH_TEST}/flank-x86-start-test.yml"
elif [[ "${device_type}" == "arm-start-test" ]]; then
flank_template="${PATH_TEST}/flank-armeabi-v7a-start-test.yml"
elif [[ "${device_type}" == "x86-screenshots-tests" ]]; then
flank_template="${PATH_TEST}/flank-x86-screenshots-tests.yml"
elif [[ "${device_type}" == "x86-beta-tests" ]]; then
flank_template="${PATH_TEST}/flank-x86-beta.yml"
flank_template="${PATH_TEST}/flank-arm-start-test.yml"
elif [[ "${device_type}" == "arm-beta-tests" ]]; then
flank_template="${PATH_TEST}/flank-arm-beta.yml"
else
echo "FAILURE: flank config file not found!"
exitcode=1
Expand Down
20 changes: 10 additions & 10 deletions taskcluster/ci/ui-test/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ task-defaults:
path: .firebase_token.json
json: true
commands:
- [wget, {artifact-reference: '<signed-debug-apk/public/build/focus/x86/target.apk>'}, '-O', app.apk]
- [wget, {artifact-reference: '<signed-debug-apk/public/build/focus/arm64-v8a/target.apk>'}, '-O', app.apk]
- [wget, {artifact-reference: '<signed-android-test/public/build/app-focus-androidTest.apk>'}, '-O', android-test.apk]

tasks:
x86-debug:
arm-debug:
description: 'UI tests with firebase'
run-on-tasks-for: [github-pull-request, github-push]
run:
commands:
- ['automation/taskcluster/androidTest/ui-test.sh', 'x86', 'app.apk', 'android-test.apk', '-1']
- ['automation/taskcluster/androidTest/ui-test.sh', 'arm64-v8a', 'app.apk', 'android-test.apk', '50']
treeherder:
symbol: debug(ui-test-x86)
x86-nightly:
symbol: debug(ui-test-arm)
arm-nightly:
attributes:
build-type: nightly-firebase
description: 'UI tests on Nightly with firebase'
Expand All @@ -70,10 +70,10 @@ tasks:
signed-android-test: signing-android-test-nightly
run:
commands:
- ['automation/taskcluster/androidTest/ui-test.sh', 'x86-start-test', 'app.apk', 'android-test.apk', '-1']
- ['automation/taskcluster/androidTest/ui-test.sh', 'arm-start-test', 'app.apk', 'android-test.apk', '1']
treeherder:
symbol: nightly(ui-test-x86-nightly)
x86-beta:
symbol: nightly(ui-test-arm-nightly)
arm-beta:
attributes:
build-type: nightly-firebase
description: 'UI tests on Nightly with firebase'
Expand All @@ -83,6 +83,6 @@ tasks:
signed-android-test: signing-android-test-beta
run:
commands:
- ['automation/taskcluster/androidTest/ui-test.sh', 'x86-beta-tests', 'app.apk', 'android-test.apk', '-1']
- ['automation/taskcluster/androidTest/ui-test.sh', 'arm-beta-tests', 'app.apk', 'android-test.apk', '1']
treeherder:
symbol: beta(ui-test-x86-beta)
symbol: beta(ui-test-arm-beta)

0 comments on commit a50f5cc

Please sign in to comment.