diff --git a/script/test-unit b/script/test-unit index 3b4269ef..1fe66ce8 100755 --- a/script/test-unit +++ b/script/test-unit @@ -3,24 +3,4 @@ set -e source "$(dirname "$BASH_SOURCE")/.build" -find_dirs() { - ( - find . -not \( \ - \( \ - -path './vendor/*' \ - \) -prune \ - \) -name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./||' | sort -u - ) -} - -TEST_FLAGS=("${BUILD_FLAGS[@]}" -cover -coverprofile=cover.out) - -if [ -z "$TEST_DIRS" ]; then - TEST_DIRS=$(find_dirs '*_test.go') -fi - -TESTS_FAILED=() - -for dir in $TEST_DIRS; do - go test "${TEST_FLAGS[@]}" "./${dir}" -done +go test "${BUILD_FLAGS[@]}" -race -cover -v $( go list github.com/kubernetes-incubator/kompose/... | grep -v '/vendor/' )