1
0
mirror of https://github.com/rancher/os.git synced 2025-06-21 20:47:04 +00:00
os/scripts/test

12 lines
298 B
Plaintext
Raw Normal View History

2015-02-18 00:01:03 +00:00
#!/bin/bash
2016-05-23 06:11:26 +00:00
# help: Run go unit tests
2015-02-18 00:01:03 +00:00
set -e
cd $(dirname $0)/..
2016-05-06 17:12:09 +00:00
echo Running tests
2015-02-18 00:01:03 +00:00
2016-05-06 17:12:09 +00:00
PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')"
2015-02-18 00:01:03 +00:00
2016-05-06 17:12:09 +00:00
go test -race -cover -tags=test ${PACKAGES}