• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3set -exu -o pipefail
4if [[ -f /VERSION ]]; then
5  cat /VERSION
6fi
7
8# Install gRPC and codegen for the Android interop app
9# (a composite gradle build can't find protoc-gen-grpc-java)
10
11cd github/grpc-java
12
13export GRADLE_OPTS=-Xmx512m
14export LDFLAGS=-L/tmp/protobuf/lib
15export CXXFLAGS=-I/tmp/protobuf/include
16export LD_LIBRARY_PATH=/tmp/protobuf/lib
17export OS_NAME=$(uname)
18
19# Proto deps
20buildscripts/make_dependencies.sh
21
22./gradlew install
23
24
25# Build and run interop instrumentation tests on Firebase Test Lab
26cd android-interop-testing
27../gradlew assembleDebug
28../gradlew assembleDebugAndroidTest
29gcloud firebase test android run \
30  --type instrumentation \
31  --app app/build/outputs/apk/debug/app-debug.apk \
32  --test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
33  --environment-variables \
34      server_host=grpc-test.sandbox.googleapis.com,server_port=443,test_case=all \
35  --device model=Nexus6P,version=27,locale=en,orientation=portrait \
36  --device model=Nexus6P,version=26,locale=en,orientation=portrait \
37  --device model=Nexus6P,version=25,locale=en,orientation=portrait \
38  --device model=Nexus6P,version=24,locale=en,orientation=portrait \
39  --device model=Nexus6P,version=23,locale=en,orientation=portrait \
40  --device model=Nexus6,version=22,locale=en,orientation=portrait \
41  --device model=Nexus6,version=21,locale=en,orientation=portrait
42