xref: /aosp_15_r20/external/grpc-grpc-java/buildscripts/observability-test/run.sh (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1*e07d83d3SAndroid Build Coastguard Worker#!/bin/bash
2*e07d83d3SAndroid Build Coastguard Worker# Copyright 2023 gRPC authors.
3*e07d83d3SAndroid Build Coastguard Worker#
4*e07d83d3SAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License");
5*e07d83d3SAndroid Build Coastguard Worker# you may not use this file except in compliance with the License.
6*e07d83d3SAndroid Build Coastguard Worker# You may obtain a copy of the License at
7*e07d83d3SAndroid Build Coastguard Worker#
8*e07d83d3SAndroid Build Coastguard Worker#     http://www.apache.org/licenses/LICENSE-2.0
9*e07d83d3SAndroid Build Coastguard Worker#
10*e07d83d3SAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
11*e07d83d3SAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS,
12*e07d83d3SAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*e07d83d3SAndroid Build Coastguard Worker# See the License for the specific language governing permissions and
14*e07d83d3SAndroid Build Coastguard Worker# limitations under the License.
15*e07d83d3SAndroid Build Coastguard Worker
16*e07d83d3SAndroid Build Coastguard Workerset -ex
17*e07d83d3SAndroid Build Coastguard Workercd "$(dirname "$0")"/../..
18*e07d83d3SAndroid Build Coastguard Worker
19*e07d83d3SAndroid Build Coastguard Workerif [ "$1" = "server" ] ; then
20*e07d83d3SAndroid Build Coastguard Worker  /grpc-java/bin/gcp-observability-interop server --use_tls=false "${@:2}"
21*e07d83d3SAndroid Build Coastguard Worker
22*e07d83d3SAndroid Build Coastguard Workerelif [ "$1" = "client" ] ; then
23*e07d83d3SAndroid Build Coastguard Worker  /grpc-java/bin/gcp-observability-interop client --use_tls=false "${@:2}"
24*e07d83d3SAndroid Build Coastguard Worker
25*e07d83d3SAndroid Build Coastguard Workerelse
26*e07d83d3SAndroid Build Coastguard Worker  echo "Invalid action: $1. Usage:"
27*e07d83d3SAndroid Build Coastguard Worker  echo "  $ .../run.sh [server|client] --server_host=<hostname> --server_port=<port> ..."
28*e07d83d3SAndroid Build Coastguard Worker  exit 1
29*e07d83d3SAndroid Build Coastguard Workerfi
30