forked from mapbox/mapbox-events-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloud_test.sh
executable file
·24 lines (22 loc) · 1 KB
/
cloud_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
set -xe
build_dir="$1"
module=$(echo "$build_dir" | cut -d "/" -f1)
test_apk_path="$2"
results_dir="$3"
gcloud firebase test android models list
gcloud firebase test android run --type instrumentation \
--app app/build/outputs/apk/full/debug/app-full-debug.apk \
--test "${build_dir}/${test_apk_path}" \
--results-dir="$results_dir" \
--device model=hammerhead,version=21,locale=en,orientation=portrait \
--device model=hammerhead,version=23,locale=en,orientation=landscape \
--device model=sailfish,version=26,locale=en,orientation=portrait \
--device model=sailfish,version=28,locale=en,orientation=portrait \
--environment-variables coverage=true,coverageFile="/sdcard/${module}_coverage.ec" \
--directories-to-pull /sdcard \
--timeout 20m
bucket="test-lab-r47d1tyt8h0hm-iku3c1i8kjrux"
artifacts_path="sailfish-28-en-portrait/artifacts"
covfile_path="gs://${bucket}/${results_dir}/${artifacts_path}/${module}_coverage.ec"
gsutil cp $covfile_path "${build_dir}/jacoco"