1
0
mirror of https://github.com/rancher/os.git synced 2025-05-30 18:35:17 +00:00
os/scripts/test
Sven Dowideit 32061238aa Fix validation tests, update deps and use the rancher/docker version that uses logrus for daemon
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-17 23:03:09 +10:00

15 lines
359 B
Bash
Executable File

#!/bin/bash
# help: Run go unit tests
set -ex
cd $(dirname $0)/..
echo Running tests
PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin|tests)' | sed -e 's!^!./!' -e 's!$!/...!')"
if [ "$ARCH" = "amd64" ]; then
RACE="-race"
fi
go test $RACE -v -cover -tags=test ${PACKAGES}