mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Get FTL test running again (flutter/engine#25771)
This commit is contained in:
parent
079be3f9dc
commit
5a4efab2a4
@ -18,22 +18,7 @@ if [[ ! -f "$APP" ]]; then
|
||||
fi
|
||||
|
||||
GIT_REVISION="${2:-$(git rev-parse HEAD)}"
|
||||
BUILD_ID="${3:-$CIRRUS_BUILD_ID}"
|
||||
|
||||
if [[ -n $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
|
||||
BUILD_ID="${3:-$SWARMING_TASK_ID}"
|
||||
|
||||
# Run the test.
|
||||
# game-loop tests are meant for OpenGL apps.
|
||||
@ -46,4 +31,5 @@ gcloud --project flutter-infra firebase test android run \
|
||||
--timeout 2m \
|
||||
--results-bucket=gs://flutter_firebase_testlab \
|
||||
--results-dir="engine_scenario_test/$GIT_REVISION/$BUILD_ID" \
|
||||
--no-auto-google-login
|
||||
# Pixel 4. As of this commit, this is a highly available device in FTL.
|
||||
--device model=flame,version=29
|
||||
|
||||
@ -33,11 +33,6 @@
|
||||
android:launchMode="singleTop"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:theme="@style/FullScreenScreenshot">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.intent.action.TEST_LOOP" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="application/javascript" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
@ -6,7 +6,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.0'
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath 'com.facebook.testing.screenshot:plugin:0.12.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
||||
@ -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-5.6.4-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||
|
||||
@ -28,7 +28,7 @@ SRC_DIR="$(cd "$SCRIPT_DIR/../../.."; pwd -P)"
|
||||
export ANDROID_HOME="$SRC_DIR/third_party/android_tools/sdk"
|
||||
|
||||
"$SRC_DIR/flutter/tools/gn" --unopt
|
||||
autoninja -C "$SRC_DIR/out/host_debug_unopt" sky_engine sky_services
|
||||
ninja -C "$SRC_DIR/out/host_debug_unopt" sky_engine sky_services -j 400
|
||||
|
||||
"$SCRIPT_DIR/compile_android_aot.sh" "$1" "$2"
|
||||
|
||||
@ -36,3 +36,7 @@ autoninja -C "$SRC_DIR/out/host_debug_unopt" sky_engine sky_services
|
||||
cd "$SCRIPT_DIR/android"
|
||||
./gradlew assembleDebug --no-daemon
|
||||
)
|
||||
|
||||
# LUCI expects to find the APK here
|
||||
mkdir -p "$SCRIPT_DIR/android/app/build/outputs/apk/debug"
|
||||
cp "$SCRIPT_DIR/build/app/outputs/apk/debug/app-debug.apk" "$SCRIPT_DIR/android/app/build/outputs/apk/debug"
|
||||
|
||||
@ -41,7 +41,7 @@ fi
|
||||
|
||||
if [[ ! -d "$DEVICE_TOOLS" ]]; then
|
||||
echo "Directory $DEVICE_TOOLS not found."
|
||||
ehco "Second argument must specify the device out directory containing gen_snapshot (e.g. out/android_debug_unopt_x64/clang_x64)."
|
||||
echo "Second argument must specify the device out directory containing gen_snapshot (e.g. out/android_debug_unopt_x64/clang_x64)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -61,16 +61,22 @@ mkdir -p "$OUTDIR"
|
||||
|
||||
echo "Compiling kernel..."
|
||||
|
||||
# --disable-dart-dev: No need for observatory/DDS.
|
||||
# --no-print-incremental-dependencies: Avoid printing out a lot of verbosity that doesn't help this test.
|
||||
"$HOST_TOOLS/dart" \
|
||||
--disable-dart-dev \
|
||||
"$HOST_TOOLS/gen/frontend_server.dart.snapshot" \
|
||||
--sdk-root "$HOST_TOOLS/flutter_patched_sdk" \
|
||||
--aot --tfa --target=flutter \
|
||||
--target=flutter \
|
||||
--no-print-incremental-dependencies \
|
||||
--aot \
|
||||
--tfa \
|
||||
--output-dill "$OUTDIR/app.dill" \
|
||||
"$SCRIPT_DIR/lib/main.dart"
|
||||
|
||||
echo "Compiling ELF Shared Library..."
|
||||
|
||||
"$HOST_TOOLS/gen_snapshot" --deterministic --snapshot_kind=app-aot-elf --elf="$OUTDIR/libapp.so" --strip "$OUTDIR/app.dill"
|
||||
"$DEVICE_TOOLS/gen_snapshot" --deterministic --snapshot_kind=app-aot-elf --elf="$OUTDIR/libapp.so" --strip "$OUTDIR/app.dill"
|
||||
|
||||
mkdir -p "$SCRIPT_DIR/android/app/src/main/jniLibs/arm64-v8a"
|
||||
mkdir -p "$SCRIPT_DIR/android/app/libs"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user