forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mac_ci_steps.sh
executable file
·35 lines (27 loc) · 1014 Bytes
/
mac_ci_steps.sh
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
#!/bin/bash
set -e
function finish {
echo "disk space at end of build:"
df -h
}
trap finish EXIT
echo "disk space at beginning of build:"
df -h
. "$(dirname "$0")"/setup_cache.sh
# TODO(zuercher): remove --flaky_test_attempts when https://github.com/envoyproxy/envoy/issues/2428
# is resolved.
BAZEL_BUILD_OPTIONS="--curses=no --show_task_finish --verbose_failures \
--action_env=PATH=/usr/local/bin:/opt/local/bin:/usr/bin:/bin --test_output=all \
--flaky_test_attempts=integration@2 ${BAZEL_BUILD_EXTRA_OPTIONS} ${BAZEL_EXTRA_TEST_OPTIONS}"
# Build envoy and run tests as separate steps so that failure output
# is somewhat more deterministic (rather than interleaving the build
# and test steps).
if [[ $# -gt 0 ]]; then
TEST_TARGETS=$*
else
TEST_TARGETS=//test/integration/...
fi
if [[ "$TEST_TARGETS" == "//test/..." || "$TEST_TARGETS" == "//test/integration/..." ]]; then
bazel build ${BAZEL_BUILD_OPTIONS} //source/exe:envoy-static
fi
bazel test ${BAZEL_BUILD_OPTIONS} ${TEST_TARGETS}