-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpresubmit.sh
executable file
·41 lines (35 loc) · 963 Bytes
/
presubmit.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
36
37
38
39
40
41
#!/bin/bash
set -euxo pipefail
echo ">>> Running all Bazel tests"
bazel \
--output_base=$HOME/.cache/bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
test \
--verbose_failures \
--sandbox_debug \
--test_output=errors \
--test_strategy=standalone \
--spawn_strategy=standalone \
--genrule_strategy=standalone \
--local_resources=400,1,1.0 \
//...
echo ">>> Running all examples"
for label in $(bazel query //examples:all); do
bazel \
--output_base=$HOME/.cache/bazel \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
run \
--verbose_failures \
--sandbox_debug \
--test_output=errors \
--test_strategy=standalone \
--spawn_strategy=standalone \
--genrule_strategy=standalone \
--local_resources=400,1,1.0 \
"$label"
done
echo ">>> All presubmit tests passed."