diff options
| author | Eric Gribkoff <ericgribkoff@google.com> | 2018-08-28 14:56:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-28 14:56:06 -0700 |
| commit | 03dab29e3a4c763fcd4dc494c09da3a8ab294760 (patch) | |
| tree | 12a9ddccd6f24e66e229ed6e51d769843f5654bc | |
| parent | d3cdfd08833e7b53e098e07d88f948797dbab6d9 (diff) | |
| download | platform_external_grpc-grpc-java-03dab29e3a4c763fcd4dc494c09da3a8ab294760.tar.gz platform_external_grpc-grpc-java-03dab29e3a4c763fcd4dc494c09da3a8ab294760.tar.bz2 platform_external_grpc-grpc-java-03dab29e3a4c763fcd4dc494c09da3a8ab294760.zip | |
buildscripts: run Android interop tests on Firebase (#4314)
3 files changed, 47 insertions, 1 deletions
diff --git a/android-interop-testing/app/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java b/android-interop-testing/app/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java index 28a637c5b..3fe6379ff 100644 --- a/android-interop-testing/app/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java +++ b/android-interop-testing/app/src/androidTest/java/io/grpc/android/integrationtest/InteropInstrumentationTest.java @@ -38,7 +38,7 @@ import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) public class InteropInstrumentationTest { - private static final int TIMEOUT_SECONDS = 10; + private static final int TIMEOUT_SECONDS = 60; private static final String LOG_TAG = "GrpcInteropInstrumentationTest"; private String host; diff --git a/buildscripts/kokoro/android-interop.cfg b/buildscripts/kokoro/android-interop.cfg new file mode 100644 index 000000000..e39920726 --- /dev/null +++ b/buildscripts/kokoro/android-interop.cfg @@ -0,0 +1,5 @@ +# Config file for internal CI + +# Location of the continuous shell script in repository. +build_file: "grpc-java/buildscripts/kokoro/android-interop.sh" +timeout_mins: 45 diff --git a/buildscripts/kokoro/android-interop.sh b/buildscripts/kokoro/android-interop.sh new file mode 100755 index 000000000..a1439266d --- /dev/null +++ b/buildscripts/kokoro/android-interop.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +set -exu -o pipefail +if [[ -f /VERSION ]]; then + cat /VERSION +fi + +# Install gRPC and codegen for the Android interop app +# (a composite gradle build can't find protoc-gen-grpc-java) + +cd github/grpc-java + +export GRADLE_OPTS=-Xmx512m +export LDFLAGS=-L/tmp/protobuf/lib +export CXXFLAGS=-I/tmp/protobuf/include +export LD_LIBRARY_PATH=/tmp/protobuf/lib +export OS_NAME=$(uname) + +# Proto deps +buildscripts/make_dependencies.sh + +./gradlew install + + +# Build and run interop instrumentation tests on Firebase Test Lab +cd android-interop-testing +../gradlew assembleDebug +../gradlew assembleDebugAndroidTest +gcloud firebase test android run \ + --type instrumentation \ + --app app/build/outputs/apk/debug/app-debug.apk \ + --test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \ + --environment-variables \ + server_host=grpc-test.sandbox.googleapis.com,server_port=443,test_case=all \ + --device model=Nexus6P,version=27,locale=en,orientation=portrait \ + --device model=Nexus6P,version=26,locale=en,orientation=portrait \ + --device model=Nexus6P,version=25,locale=en,orientation=portrait \ + --device model=Nexus6P,version=24,locale=en,orientation=portrait \ + --device model=Nexus6P,version=23,locale=en,orientation=portrait \ + --device model=Nexus6,version=22,locale=en,orientation=portrait \ + --device model=Nexus6,version=21,locale=en,orientation=portrait |
