git-lfs/script/test
Olivier Monnier b5421868f2 script/test: propagate extra args to go test
As described in the test/README.md, it is possible to
pass extra args to the script/test, like for example:
  $ script/test lfs -run TestSuccessStatus -v
Those args must be propagated to the 'go test' script.

Signed-off-by: Olivier Monnier <olivier.monnier@intel.com>
2016-06-23 14:47:15 +02:00

18 lines
662 B
Bash
Executable File

#!/usr/bin/env bash
#/ Usage: script/test # run all non-vendored tests
#/ script/test <subdir> # run just a package's tests
script/fmt
if [ $# -gt 0 ]; then
GO15VENDOREXPERIMENT=1 go test "./$@"
else
# 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.
GO15VENDOREXPERIMENT=1 go test \
$(GO15VENDOREXPERIMENT=1 go list ./... \
| grep -v "github.com/olekukonko/ts" \
| grep -v "github.com/xeipuuv/gojsonschema" \
| grep -v "github.com/technoweenie/go-contentaddressable" \
)
fi