|
2 | 2 |
|
3 | 3 | set -e |
4 | 4 |
|
5 | | -GIT_REVISION=$(git rev-parse HEAD) |
6 | | - |
7 | 5 | if [[ ! -f $1 ]]; then |
8 | 6 | echo "File $1 not found." |
9 | 7 | exit -1 |
10 | 8 | fi |
11 | 9 |
|
12 | | -# New contributors will not have permissions to run this test - they won't be |
13 | | -# able to access the service account information. We should just mark the test |
14 | | -# as passed - it will run fine on post submit, where it will still catch |
15 | | -# failures. |
16 | | -# We can also still make sure that building a release app bundle still works. |
17 | | -if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then |
18 | | - echo "This user does not have permission to run this test." |
19 | | - exit 0 |
20 | | -fi |
| 10 | +GIT_REVISION=${2:-$(git rev-parse HEAD)} |
| 11 | +BUILD_ID=${3:-$CIRRUS_BUILD_ID} |
21 | 12 |
|
22 | | -echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json |
23 | | -gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json |
24 | | -gcloud --quiet config set project flutter-infra |
| 13 | +if [[ ! -z $GCLOUD_FIREBASE_TESTLAB_KEY ]]; then |
| 14 | + # New contributors will not have permissions to run this test - they won't be |
| 15 | + # able to access the service account information. We should just mark the test |
| 16 | + # as passed - it will run fine on post submit, where it will still catch |
| 17 | + # failures. |
| 18 | + # We can also still make sure that building a release app bundle still works. |
| 19 | + if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then |
| 20 | + echo "This user does not have permission to run this test." |
| 21 | + exit 0 |
| 22 | + fi |
| 23 | + |
| 24 | + echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json |
| 25 | + gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json |
| 26 | +fi |
25 | 27 |
|
26 | 28 | # Run the test. |
27 | 29 | # game-loop tests are meant for OpenGL apps. |
28 | 30 | # This type of test will give the application a handle to a file, and |
29 | 31 | # we'll write the timeline JSON to that file. |
30 | 32 | # See https://firebase.google.com/docs/test-lab/android/game-loop |
31 | | -gcloud firebase test android run \ |
| 33 | +gcloud --project flutter-infra firebase test android run \ |
32 | 34 | --type game-loop \ |
33 | 35 | --app $1 \ |
34 | 36 | --timeout 2m \ |
35 | 37 | --results-bucket=gs://flutter_firebase_testlab \ |
36 | | - --results-dir=engine_scenario_test/$GIT_REVISION/$CIRRUS_BUILD_ID |
| 38 | + --results-dir=engine_scenario_test/$GIT_REVISION/$BUILD_ID |
37 | 39 |
|
0 commit comments