-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepro.sh
executable file
·36 lines (27 loc) · 1.11 KB
/
repro.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
#!/bin/bash
set -e
# clean and shutdown so that we're starting from a known state
bazel clean
bazel shutdown
echo -e "\nExpected: 1"
bazel run //:echo_nargs 2>/dev/null
echo -e "\nExpected: 3"
bazel run //:echo_nargs -- a b 2>/dev/null
echo -e "\nExpected: 3"
bazel run --run_under="exec" //:echo_nargs -- a b 2>/dev/null
echo -e "\nExpected: 3"
runcmd="$(mktemp /tmp/bazel-run.XXXXXX)" || { echo "Could not create tmp file"; exit 1; }
bazel run --script_path="$runcmd" //:echo_nargs -- a b 2>/dev/null
"$runcmd"
echo -e "\nExpected: 5"
runcmd="$(mktemp /tmp/bazel-run.XXXXXX)" || { echo "Could not create tmp file"; exit 1; }
bazel run --script_path="$runcmd" //:echo_nargs -- a b 2>/dev/null
"$runcmd" 1 2
echo -e "\nExpected: 3"
runcmd="$(mktemp /tmp/bazel-run.XXXXXX)" || { echo "Could not create tmp file"; exit 1; }
bazel run --run_under="exec" --script_path="$runcmd" //:echo_nargs -- a b &>/dev/null
"$runcmd"
echo -e "\nExpected: 5"
runcmd="$(mktemp /tmp/bazel-run.XXXXXX)" || { echo "Could not create tmp file"; exit 1; }
bazel run --run_under="exec" --script_path="$runcmd" //:echo_nargs -- a b 2>/dev/null
"$runcmd" 1 2