1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/make/test-integration
Alexandr Morozov 7cd1e48230 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)
2014-05-19 08:26:05 +04:00

15 lines
494 B
Bash

#!/bin/bash
set -e
DEST=$1
bundle_test_integration() {
LDFLAGS="$LDFLAGS $LDFLAGS_STATIC_DOCKER" go_test_dir ./integration \
"-coverpkg $(find_dirs '*.go' | sed 's,^\.,github.com/dotcloud/docker,g' | paste -d, -s)"
}
# this "grep" hides some really irritating warnings that "go test -coverpkg"
# spews when it is given packages that aren't used
exec > >(tee -a $DEST/test.log) 2>&1
bundle_test_integration 2>&1 \
| grep --line-buffered -v '^warning: no packages being tested depend on '