File: android-interop.sh

package info (click to toggle)
grpc-java 1.41.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 16,884 kB
  • sloc: java: 203,784; xml: 1,224; sh: 1,221; cpp: 1,158; makefile: 40; python: 40
file content (40 lines) | stat: -rwxr-xr-x 1,481 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/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)

echo y | ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;28.0.3"

# Proto deps
buildscripts/make_dependencies.sh

# 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 build/outputs/apk/debug/grpc-android-interop-testing-debug.apk \
  --test build/outputs/apk/androidTest/debug/grpc-android-interop-testing-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