forked from googleapis/google-cloud-cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_integration_tests_emulator_cmake.sh
More file actions
executable file
·61 lines (49 loc) · 1.54 KB
/
run_integration_tests_emulator_cmake.sh
File metadata and controls
executable file
·61 lines (49 loc) · 1.54 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -euo pipefail
source "$(dirname "$0")/../../../../ci/lib/init.sh"
source module /ci/cloudbuild/builds/lib/ctest.sh
source module /ci/etc/integration-tests-config.sh
if [[ $# -lt 1 ]]; then
echo "Usage: $(basename "$0") <binary-dir> [ctest-args]"
exit 1
fi
BINARY_DIR="$(
cd "${1}"
pwd
)"
readonly BINARY_DIR
shift
ctest_args=("$@")
if ctest::has_no_tests "${BINARY_DIR}" "^bigtable_" "${ctest_args[@]}"; then
exit 0
fi
# Configure run_emulators_utils.sh to find the instance admin emulator.
CBT_INSTANCE_ADMIN_EMULATOR_START=(
"${BINARY_DIR}/google/cloud/bigtable/tests/instance_admin_emulator"
)
# Configure run_emulators_utils.sh to find the cbt emulator.
CBT_EMULATOR_CMD=(
"${BINARY_DIR}/google/cloud/bigtable/emulator/emulator"
)
source module /google/cloud/bigtable/tools/run_emulator_utils.sh
cd "${BINARY_DIR}"
start_emulators 8480 8490
ctest -R "^bigtable_" "${ctest_args[@]}"
exit_status=$?
kill_emulators
trap '' EXIT
exit "${exit_status}"