Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions ci/firebase_testlab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,38 @@

set -e

GIT_REVISION=$(git rev-parse HEAD)

if [[ ! -f $1 ]]; then
echo "File $1 not found."
exit -1
fi

# New contributors will not have permissions to run this test - they won't be
# able to access the service account information. We should just mark the test
# as passed - it will run fine on post submit, where it will still catch
# failures.
# We can also still make sure that building a release app bundle still works.
if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then
echo "This user does not have permission to run this test."
exit 0
fi
GIT_REVISION=${2:-$(git rev-parse HEAD)}
BUILD_ID=${3:-$CIRRUS_BUILD_ID}

echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json
gcloud --quiet config set project flutter-infra
if [[ ! -z $GCLOUD_FIREBASE_TESTLAB_KEY ]]; then
# New contributors will not have permissions to run this test - they won't be
# able to access the service account information. We should just mark the test
# as passed - it will run fine on post submit, where it will still catch
# failures.
# We can also still make sure that building a release app bundle still works.
if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then
echo "This user does not have permission to run this test."
exit 0
fi

echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json
fi

# Run the test.
# game-loop tests are meant for OpenGL apps.
# This type of test will give the application a handle to a file, and
# we'll write the timeline JSON to that file.
# See https://firebase.google.com/docs/test-lab/android/game-loop
gcloud firebase test android run \
gcloud --project flutter-infra firebase test android run \
--type game-loop \
--app $1 \
--timeout 2m \
--results-bucket=gs://flutter_firebase_testlab \
--results-dir=engine_scenario_test/$GIT_REVISION/$CIRRUS_BUILD_ID
--results-dir=engine_scenario_test/$GIT_REVISION/$BUILD_ID

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
7 changes: 7 additions & 0 deletions testing/scenario_app/assemble_apk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

./compile_android_aot.sh $1 $2

pushd android
./gradlew assembleDebug --no-daemon
popd