Files
docker-cli/components/engine/hack/test/unit
Michael Crosby d78181e968 Remove solaris files
For obvious reasons that it is not really supported now.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5a9b5f10cf967f31f0856871ad08f9a0286b4a46
Component: engine
2017-10-24 15:39:34 -04:00

23 lines
549 B
Bash
Executable File

#!/usr/bin/env bash
#
# Run unit tests
#
# TESTFLAGS - add additional test flags. Ex:
#
# TESTFLAGS="-v -run TestBuild" hack/test/unit
#
# TESTDIRS - run tests for specified packages. Ex:
#
# TESTDIRS="./pkg/term" hack/test/unit
#
set -eu -o pipefail
TESTFLAGS+=" -test.timeout=${TIMEOUT:-5m}"
BUILDFLAGS=( -tags "netgo seccomp libdm_no_deferred_remove" )
TESTDIRS="${TESTDIRS:-"./..."}"
exclude_paths="/vendor/|/integration"
pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
go test -cover "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list