1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/project/make/test-integration
Tianon Gravi 232d59baeb Let's try fixing "netgo" again
Since "go test" doesn't seem to support "-installsuffix" as quite the same perfect solution that "go build" is happy to let it be, let's just switch those crappy old "integration/" tests to use our separate static dockerinit binary so we don't have to worry about compiling the entire test harness statically. 👍

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-19 12:48:25 -07:00

25 lines
690 B
Bash

#!/bin/bash
set -e
DEST=$1
INIT=$DEST/../dynbinary/dockerinit-$VERSION
[ -x "$INIT" ] || {
source "$(dirname "$BASH_SOURCE")/.dockerinit"
INIT="$DEST/dockerinit"
}
export TEST_DOCKERINIT_PATH="$INIT"
bundle_test_integration() {
LDFLAGS="
$LDFLAGS
-X $DOCKER_PKG/dockerversion.INITSHA1 \"$DOCKER_INITSHA1\"
" go_test_dir ./integration \
"-coverpkg $(find_dirs '*.go' | sed 's,^\.,'$DOCKER_PKG',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
bundle_test_integration 2>&1 \
| grep --line-buffered -v '^warning: no packages being tested depend on ' \
| tee -a $DEST/test.log