Custom Gradle home and add .vpython file (flutter/engine#20425)

This commit is contained in:
Emmanuel Garcia 2020-08-14 15:01:01 -07:00 committed by GitHub
parent 4ba82d4d91
commit 3fb3b05fdf
5 changed files with 32 additions and 1 deletions

View File

@ -5,3 +5,6 @@ build/
ios/Scenarios/*.framework/
android/app/libs/flutter.jar
android/app/src/main/jniLibs/arm64-v8a/libapp.so
android/gradle-home/.cache
!.vpython

View File

@ -48,6 +48,7 @@ The test is run on a x86 emulator. To run the test locally, you must create an e
hw.lcd.density = 480
hw.lcd.height = 1920
hw.lcd.width = 1080
lcd.depth = 16
```
This file is typically located in your `$HOME/.android/avd/<avd>` folder.

View File

@ -0,0 +1,11 @@
#
# "vpython" specification file for build
#
# Pillow is required by com.facebook.testing.screenshot.
python_version: "2.7"
wheel: <
name: "infra/python/wheels/pillow/${vpython_platform}"
version: "version:6.0.0"
>

View File

@ -0,0 +1,14 @@
#!/bin/bash
# This script is added to the PATH on LUCI when executing the junit tests.
# The Python scripts used to compare the screenshots are contained in a jar file.
# As a result, vpython cannot find the .vpython spec file because it's outside
# of the jar file.
set -e
SCRIPT_DIR="$( dirname "${BASH_SOURCE[0]}" )"
echo "Running from $SCRIPT_DIR/bin/python"
vpython -vpython-spec "$SCRIPT_DIR/../.vpython" "$@"

View File

@ -9,8 +9,10 @@ set -e
cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd
GRADLE_USER_HOME=$(pwd)/android/gradle-home/.cache
pushd android
set -o pipefail && ./gradlew app:verifyDebugAndroidTestScreenshotTest
set -o pipefail && ./gradlew app:verifyDebugAndroidTestScreenshotTest --gradle-user-home "$GRADLE_USER_HOME"
popd