Tee hanging when `go test` exit with non-zero code.
Fixes #5672
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
| ... | ... |
@@ -10,6 +10,6 @@ bundle_test_integration() {
|
| 10 | 10 |
|
| 11 | 11 |
# this "grep" hides some really irritating warnings that "go test -coverpkg" |
| 12 | 12 |
# spews when it is given packages that aren't used |
| 13 |
+exec > >(tee -a $DEST/test.log) 2>&1 |
|
| 13 | 14 |
bundle_test_integration 2>&1 \ |
| 14 |
- | grep --line-buffered -v '^warning: no packages being tested depend on ' \ |
|
| 15 |
- | tee $DEST/test.log |
|
| 15 |
+ | grep --line-buffered -v '^warning: no packages being tested depend on ' |
| ... | ... |
@@ -11,6 +11,7 @@ bundle_test_integration_cli() {
|
| 11 | 11 |
} |
| 12 | 12 |
|
| 13 | 13 |
# subshell so that we can export PATH without breaking other things |
| 14 |
+exec > >(tee -a $DEST/test.log) 2>&1 |
|
| 14 | 15 |
( |
| 15 | 16 |
export PATH="$DEST/../binary:$DEST/../dynbinary:$PATH" |
| 16 | 17 |
|
| ... | ... |
@@ -40,4 +41,4 @@ bundle_test_integration_cli() {
|
| 40 | 40 |
DOCKERD_PID=$(set -x; cat $DEST/docker.pid) |
| 41 | 41 |
( set -x; kill $DOCKERD_PID ) |
| 42 | 42 |
wait $DOCKERD_PID || true |
| 43 |
-) 2>&1 | tee $DEST/test.log |
|
| 43 |
+) |