Skip to content

Commit 429675d

Browse files
author
Emmanuel Garcia
authored
Custom Gradle home and add .vpython file (flutter#20425)
1 parent 169b22c commit 429675d

File tree

27 files changed

+32
-1
lines changed

27 files changed

+32
-1
lines changed

testing/scenario_app/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ build/
55
ios/Scenarios/*.framework/
66
android/app/libs/flutter.jar
77
android/app/src/main/jniLibs/arm64-v8a/libapp.so
8+
android/gradle-home/.cache
9+
10+
!.vpython

testing/scenario_app/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ The test is run on a x86 emulator. To run the test locally, you must create an e
4848
hw.lcd.density = 480
4949
hw.lcd.height = 1920
5050
hw.lcd.width = 1080
51+
lcd.depth = 16
5152
```
5253

5354
This file is typically located in your `$HOME/.android/avd/<avd>` folder.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# "vpython" specification file for build
3+
#
4+
# Pillow is required by com.facebook.testing.screenshot.
5+
6+
python_version: "2.7"
7+
8+
wheel: <
9+
name: "infra/python/wheels/pillow/${vpython_platform}"
10+
version: "version:6.0.0"
11+
>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# This script is added to the PATH on LUCI when executing the junit tests.
4+
# The Python scripts used to compare the screenshots are contained in a jar file.
5+
# As a result, vpython cannot find the .vpython spec file because it's outside
6+
# of the jar file.
7+
8+
set -e
9+
10+
SCRIPT_DIR="$( dirname "${BASH_SOURCE[0]}" )"
11+
12+
echo "Running from $SCRIPT_DIR/bin/python"
13+
14+
vpython -vpython-spec "$SCRIPT_DIR/../.vpython" "$@"

testing/scenario_app/run_android_tests.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ set -e
99

1010
cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd
1111

12+
GRADLE_USER_HOME=$(pwd)/android/gradle-home/.cache
13+
1214
pushd android
1315

14-
set -o pipefail && ./gradlew app:verifyDebugAndroidTestScreenshotTest
16+
set -o pipefail && ./gradlew app:verifyDebugAndroidTestScreenshotTest --gradle-user-home "$GRADLE_USER_HOME"
1517

1618
popd

0 commit comments

Comments
 (0)