git-lfs/script/test
2015-03-19 13:30:55 -06:00

20 lines
494 B
Bash
Executable File

#!/bin/sh
#/ Usage: script/test # run all tests
#/ script/test <subdir> # run just a package's tests
script/fmt
script/bootstrap
export LOCALSRCDIR=`pwd`/.vendor/src/github.com/github/git-lfs
mkdir -p `dirname $LOCALSRCDIR`
rm -f $LOCALSRCDIR
ln -s `pwd` $LOCALSRCDIR
GOPATH="`pwd`/.vendor"
SUITE="./${1:-"..."}"
if [ $# -gt 0 ]; then
shift
fi
PATH=$LOCALSRCDIR/bin:$PATH GOPATH=$GOPATH go test $SUITE -i "$@"
PATH=$LOCALSRCDIR/bin:$PATH GOPATH=$GOPATH go test $SUITE "$@"