1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 14:23:11 +00:00
Files
os/scripts/test

15 lines
358 B
Plaintext
Raw Normal View History

2015-02-17 17:01:03 -07:00
#!/bin/bash
2016-05-22 23:11:26 -07:00
# help: Run go unit tests
set -e
2015-02-17 17:01:03 -07:00
cd $(dirname $0)/..
2016-05-06 10:12:09 -07:00
echo Running tests
2015-02-17 17:01:03 -07:00
2016-07-20 10:42:16 -07:00
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!$!/...!')"
2015-02-17 17:01:03 -07:00
2016-05-31 21:11:03 -07:00
if [ "$ARCH" = "amd64" ]; then
RACE="-race"
fi
go test $RACE -v -cover -tags=test ${PACKAGES}