mirror of https://github.com/grpc/grpc-java.git
buildscripts: run Android interop tests on Firebase (#4314)
This commit is contained in:
parent
d3cdfd0883
commit
03dab29e3a
|
|
@ -38,7 +38,7 @@ import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public class InteropInstrumentationTest {
|
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 static final String LOG_TAG = "GrpcInteropInstrumentationTest";
|
||||||
|
|
||||||
private String host;
|
private String host;
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
Loading…
Reference in New Issue