From 87870065338a5b57760b4256dd0eee152f227bb4 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Mon, 31 Oct 2016 16:32:22 -0400 Subject: [PATCH] Modify command in initializing unit tests This cleans up the current script we have to a simple one-liner to test unit tests. --- script/test-unit | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) 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/' )