1
0
mirror of https://github.com/rancher/os.git synced 2025-06-18 19:27:26 +00:00
os/scripts/test
niusmallnan cdac009e41 Remove integration tests
We rewrite them using python and maintain it separately
2018-12-02 20:59:00 +08:00

15 lines
353 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)' | sed -e 's!^!./!' -e 's!$!/...!')"
if [ "$ARCH" = "amd64" ]; then
RACE="-race"
fi
go test $RACE -v -cover -tags=test ${PACKAGES}