Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Custom Gradle home and add .vpython file #20425

Merged
merged 4 commits into from
Aug 14, 2020
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
3 changes: 3 additions & 0 deletions testing/scenario_app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions testing/scenario_app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 11 additions & 0 deletions testing/scenario_app/android/gradle-home/.vpython
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# "vpython" specification file for build
#
# Pillow is required by com.facebook.testing.screenshot.

python_version: "2.7"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we can use 3, or does that need a separate PR?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin that compares the screenshots requires python-2.7


wheel: <
name: "infra/python/wheels/pillow/${vpython_platform}"
version: "version:6.0.0"
>
14 changes: 14 additions & 0 deletions testing/scenario_app/android/gradle-home/bin/python
Original file line number Diff line number Diff line change
@@ -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" "$@"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was discussed with the LUCI infra folks and they said it's as better as it could get.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see that it worked!

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion testing/scenario_app/run_android_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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