-
Notifications
You must be signed in to change notification settings - Fork 48
/
cloud_test.sh
executable file
·24 lines (22 loc) · 1.01 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/okhttp4/debug/app-okhttp4-debug.apk \
--test "${build_dir}/${test_apk_path}" \
--results-dir="$results_dir" \
--device model=Nexus4,version=21,locale=en,orientation=portrait \
--device model=hammerhead,version=23,locale=en,orientation=landscape \
--device model=starqlteue,version=26,locale=en,orientation=portrait \
--device model=redfin,version=30,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="hammerhead-23-en-landscape/artifacts/sdcard"
covfile_path="gs://${bucket}/${results_dir}/${artifacts_path}/${module}_coverage.ec"
gsutil cp $covfile_path "${build_dir}/jacoco"