2015-07-30 02:37:31 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-05-23 21:00:56 +00:00
|
|
|
#/ Usage: script/test # run all non-vendored tests
|
2014-05-31 01:23:11 +00:00
|
|
|
#/ script/test <subdir> # run just a package's tests
|
|
|
|
|
2013-10-04 13:48:57 +00:00
|
|
|
script/fmt
|
2015-02-07 17:23:49 +00:00
|
|
|
if [ $# -gt 0 ]; then
|
2016-06-23 12:43:03 +00:00
|
|
|
GO15VENDOREXPERIMENT=1 go test "./$@"
|
2016-05-23 21:00:56 +00:00
|
|
|
else
|
2016-06-05 20:01:49 +00:00
|
|
|
# The following vendor test-exclusion grep-s typically need to match the same set in
|
|
|
|
# debian/rules variable DH_GOLANG_EXCLUDES, so update those when adding here.
|
2016-05-23 23:07:18 +00:00
|
|
|
GO15VENDOREXPERIMENT=1 go test \
|
2016-05-27 19:19:14 +00:00
|
|
|
$(GO15VENDOREXPERIMENT=1 go list ./... \
|
2016-08-17 17:22:53 +00:00
|
|
|
| grep -v "github.com/kr/pty" \
|
|
|
|
| grep -v "github.com/kr/text" \
|
2016-05-23 23:07:18 +00:00
|
|
|
| grep -v "github.com/olekukonko/ts" \
|
2016-08-17 21:12:46 +00:00
|
|
|
| grep -v "github.com/pkg/errors" \
|
2016-08-17 17:22:53 +00:00
|
|
|
| grep -v "github.com/stretchr/testify" \
|
2016-07-15 13:27:20 +00:00
|
|
|
| grep -v "github.com/xeipuuv/gojsonreference" \
|
2016-06-02 11:45:36 +00:00
|
|
|
| grep -v "github.com/xeipuuv/gojsonschema" \
|
2016-05-23 23:07:18 +00:00
|
|
|
)
|
2015-02-07 17:23:49 +00:00
|
|
|
fi
|