File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ function test_tmpdir() {
91
91
#!/bin/sh
92
92
set -e
93
93
echo TEST_TMPDIR=$TEST_TMPDIR
94
+ echo HOME=$HOME
94
95
touch "$TEST_TMPDIR/foo"
96
+ touch "$HOME/bar"
95
97
EOF
96
98
chmod +x foo/bar_test.sh
97
99
cat > foo/BUILD << EOF
@@ -105,10 +107,12 @@ EOF
105
107
bazel test --test_output=all //foo:bar_test >& $TEST_log || \
106
108
fail " Running sh_test failed"
107
109
expect_log " TEST_TMPDIR=/.*"
110
+ expect_log " HOME=/.*"
108
111
109
112
bazel test --nocache_test_results --test_output=all --test_tmpdir=$TEST_TMPDIR //foo:bar_test \
110
113
>& $TEST_log || fail " Running sh_test failed"
111
114
expect_log " TEST_TMPDIR=$TEST_TMPDIR "
115
+ expect_log " HOME=$TEST_TMPDIR "
112
116
}
113
117
114
118
function test_env_vars() {
@@ -118,6 +122,7 @@ function test_env_vars() {
118
122
#!/bin/sh
119
123
echo "pwd: $PWD"
120
124
echo "src: $TEST_SRCDIR"
125
+ echo "rd: $RUNFILES_DIR"
121
126
echo "ws: $TEST_WORKSPACE"
122
127
EOF
123
128
chmod +x foo/testenv.sh
@@ -131,8 +136,9 @@ sh_test(
131
136
EOF
132
137
133
138
bazel test --test_output=all //foo & > $TEST_log || fail " Test failed"
134
- expect_log " pwd: .*/foo.runfiles/_main$"
135
- expect_log " src: .*/foo.runfiles$"
139
+ expect_log " pwd: /.*/foo.runfiles/_main$"
140
+ expect_log " src: /.*/foo.runfiles$"
141
+ expect_log " rd: /.*/foo.runfiles$"
136
142
expect_log " ws: _main$"
137
143
}
138
144
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ is_absolute "$TEST_UNDECLARED_OUTPUTS_ANNOTATIONS_DIR" ||
64
64
is_absolute " $TEST_SRCDIR " || TEST_SRCDIR=" $PWD /$TEST_SRCDIR "
65
65
is_absolute " $TEST_TMPDIR " || TEST_TMPDIR=" $PWD /$TEST_TMPDIR "
66
66
is_absolute " $HOME " || HOME=" $TEST_TMPDIR "
67
+ export HOME
67
68
is_absolute " $XML_OUTPUT_FILE " || XML_OUTPUT_FILE=" $PWD /$XML_OUTPUT_FILE "
68
69
69
70
# Set USER to the current user, unless passed by Bazel via --test_env.
You can’t perform that action at this time.
0 commit comments