mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix hanging on tests failing
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)
This commit is contained in:
parent
9405a58e99
commit
7cd1e48230
3 changed files with 6 additions and 4 deletions
|
@ -10,6 +10,6 @@ bundle_test_integration() {
|
||||||
|
|
||||||
# this "grep" hides some really irritating warnings that "go test -coverpkg"
|
# this "grep" hides some really irritating warnings that "go test -coverpkg"
|
||||||
# spews when it is given packages that aren't used
|
# spews when it is given packages that aren't used
|
||||||
|
exec > >(tee -a $DEST/test.log) 2>&1
|
||||||
bundle_test_integration 2>&1 \
|
bundle_test_integration 2>&1 \
|
||||||
| grep --line-buffered -v '^warning: no packages being tested depend on ' \
|
| grep --line-buffered -v '^warning: no packages being tested depend on '
|
||||||
| tee $DEST/test.log
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ bundle_test_integration_cli() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# subshell so that we can export PATH without breaking other things
|
# subshell so that we can export PATH without breaking other things
|
||||||
|
exec > >(tee -a $DEST/test.log) 2>&1
|
||||||
(
|
(
|
||||||
export PATH="$DEST/../binary:$DEST/../dynbinary:$PATH"
|
export PATH="$DEST/../binary:$DEST/../dynbinary:$PATH"
|
||||||
|
|
||||||
|
@ -40,4 +41,4 @@ bundle_test_integration_cli() {
|
||||||
DOCKERD_PID=$(set -x; cat $DEST/docker.pid)
|
DOCKERD_PID=$(set -x; cat $DEST/docker.pid)
|
||||||
( set -x; kill $DOCKERD_PID )
|
( set -x; kill $DOCKERD_PID )
|
||||||
wait $DOCKERD_PID || true
|
wait $DOCKERD_PID || true
|
||||||
) 2>&1 | tee $DEST/test.log
|
)
|
||||||
|
|
|
@ -49,7 +49,8 @@ bundle_test_unit() {
|
||||||
echo
|
echo
|
||||||
true
|
true
|
||||||
fi
|
fi
|
||||||
} 2>&1 | tee $DEST/test.log
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exec > >(tee -a $DEST/test.log) 2>&1
|
||||||
bundle_test_unit
|
bundle_test_unit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue