Replace pipe with redirection to a subshell (#13409)

When the writing process sends an EAGAIN to the fd, tee dies.
We correct this behavior by redirecting the output to a subshell
which handles this correctly.

Relevant link here: https://serverfault.com/questions/369757/why-is-this-tee-losing-stdout
Этот коммит содержится в:
Agniva De Sarker
2019-12-17 19:28:25 +05:30
коммит произвёл Ben Schumacher
родитель 4cbea3d5b5
Коммит a83df931b9

Просмотреть файл

@@ -15,7 +15,7 @@ echo "Packages to test: $PACKAGES"
find . -name 'cprofile*.out' -exec sh -c 'rm "{}"' \;
find . -type d -name data -not -path './vendor/*' | xargs rm -rf
$GO test $GOFLAGS -run=$TESTS $TESTFLAGS -v -timeout=2000s -covermode=count -coverpkg=$PACKAGES_COMMA -exec $DIR/test-xprog.sh $PACKAGES 2>&1 | tee output
$GO test $GOFLAGS -run=$TESTS $TESTFLAGS -v -timeout=2000s -covermode=count -coverpkg=$PACKAGES_COMMA -exec $DIR/test-xprog.sh $PACKAGES 2>&1 > >( tee output )
EXIT_STATUS=$?
cat output | $GOPATH/bin/go-junit-report > report.xml