2013-12-08 20:41:50 -05:00
|
|
|
#!/bin/bash
|
2014-04-08 00:14:19 -04:00
|
|
|
set -e
|
2013-12-08 20:41:50 -05:00
|
|
|
|
|
|
|
DEST=$1
|
|
|
|
|
2015-01-17 00:00:44 -05:00
|
|
|
INIT=$DEST/../dynbinary/dockerinit-$VERSION
|
|
|
|
[ -x "$INIT" ] || {
|
|
|
|
source "$(dirname "$BASH_SOURCE")/.dockerinit"
|
|
|
|
INIT="$DEST/dockerinit"
|
|
|
|
}
|
|
|
|
export TEST_DOCKERINIT_PATH="$INIT"
|
|
|
|
|
2013-12-08 20:41:50 -05:00
|
|
|
bundle_test_integration() {
|
2015-01-17 00:00:44 -05:00
|
|
|
LDFLAGS="
|
|
|
|
$LDFLAGS
|
|
|
|
-X $DOCKER_PKG/dockerversion.INITSHA1 \"$DOCKER_INITSHA1\"
|
|
|
|
" go_test_dir ./integration \
|
2014-07-30 19:02:04 -04:00
|
|
|
"-coverpkg $(find_dirs '*.go' | sed 's,^\.,'$DOCKER_PKG',g' | paste -d, -s)"
|
2013-12-08 20:41:50 -05:00
|
|
|
}
|
|
|
|
|
2014-02-21 13:26:04 -05:00
|
|
|
# this "grep" hides some really irritating warnings that "go test -coverpkg"
|
|
|
|
# spews when it is given packages that aren't used
|
|
|
|
bundle_test_integration 2>&1 \
|
2015-01-09 19:28:40 -05:00
|
|
|
| grep --line-buffered -v '^warning: no packages being tested depend on ' \
|
|
|
|
| tee -a $DEST/test.log
|