Skip to content

Commit 0d6ff47

Browse files
damienmgCopybara-Service
authored andcommitted
Automated rollback of commit 0ebb3e5.
*** Reason for rollback *** Cause rare case of test hanging. To cherry-pick for bazelbuild#3772 *** Original change description *** Attempting to fix an occasionally missing stdout from test.xml. In hello-world_test, when executed inside a docker container, for about 2% of the runs the test.xml has an empty CDATA, instead of the expected "Hello, world!". I'm not sure still what exactly was the bug, but in any case this change simplifies the test execution code line, so if this doesn't fix it, at least further debugging will be easier. I ran the test in a loop 1360 times, and the error did not reproduce once, which hints to... *** PiperOrigin-RevId: 176662654
1 parent 69cb005 commit 0d6ff47

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tools/test/test-setup.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,10 @@ for signal in $signals; do
217217
done
218218
start=$(date +%s)
219219

220-
set -o pipefail
221220
if [ -z "$COVERAGE_DIR" ]; then
222-
"${TEST_PATH}" "$@" 2>&1 | tee "${XML_OUTPUT_FILE}.log" || exitCode=$?
221+
"${TEST_PATH}" "$@" 2> >(tee -a "${XML_OUTPUT_FILE}.log" >&2) 1> >(tee -a "${XML_OUTPUT_FILE}.log") 2>&1 || exitCode=$?
223222
else
224-
"$1" "$TEST_PATH" "${@:3}" 2>&1 | tee "${XML_OUTPUT_FILE}.log" || exitCode=$?
223+
"$1" "$TEST_PATH" "${@:3}" 2> >(tee -a "${XML_OUTPUT_FILE}.log" >&2) 1> >(tee -a "${XML_OUTPUT_FILE}.log") 2>&1 || exitCode=$?
225224
fi
226225

227226
for signal in $signals; do

0 commit comments

Comments
 (0)