Home | History | Annotate | Download | only in kokoro
      1 #!/bin/bash
      2 
      3 set -exu -o pipefail
      4 if [[ -f /VERSION ]]; then
      5   cat /VERSION
      6 fi
      7 
      8 # Install gRPC and codegen for the Android interop app
      9 # (a composite gradle build can't find protoc-gen-grpc-java)
     10 
     11 cd github/grpc-java
     12 
     13 export GRADLE_OPTS=-Xmx512m
     14 export LDFLAGS=-L/tmp/protobuf/lib
     15 export CXXFLAGS=-I/tmp/protobuf/include
     16 export LD_LIBRARY_PATH=/tmp/protobuf/lib
     17 export OS_NAME=$(uname)
     18 
     19 # Proto deps
     20 buildscripts/make_dependencies.sh
     21 
     22 ./gradlew install
     23 
     24 
     25 # Build and run interop instrumentation tests on Firebase Test Lab
     26 cd android-interop-testing
     27 ../gradlew assembleDebug
     28 ../gradlew assembleDebugAndroidTest
     29 gcloud 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