Skip to content

Commit

Permalink
Automated rollback of commit 0ebb3e5.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Cause rare case of test hanging.

To cherry-pick for #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
  • Loading branch information
damienmg authored and Copybara-Service committed Nov 22, 2017
1 parent 69cb005 commit 0d6ff47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/test/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,10 @@ for signal in $signals; do
done
start=$(date +%s)

set -o pipefail
if [ -z "$COVERAGE_DIR" ]; then
"${TEST_PATH}" "$@" 2>&1 | tee "${XML_OUTPUT_FILE}.log" || exitCode=$?
"${TEST_PATH}" "$@" 2> >(tee -a "${XML_OUTPUT_FILE}.log" >&2) 1> >(tee -a "${XML_OUTPUT_FILE}.log") 2>&1 || exitCode=$?
else
"$1" "$TEST_PATH" "${@:3}" 2>&1 | tee "${XML_OUTPUT_FILE}.log" || exitCode=$?
"$1" "$TEST_PATH" "${@:3}" 2> >(tee -a "${XML_OUTPUT_FILE}.log" >&2) 1> >(tee -a "${XML_OUTPUT_FILE}.log") 2>&1 || exitCode=$?
fi

for signal in $signals; do
Expand Down

0 comments on commit 0d6ff47

Please sign in to comment.