add SKIPCOMPILE to tests

This commit is contained in:
Rick Olson 2015-05-21 11:51:40 -06:00
parent d71ad5bec5
commit be7581dc38
2 changed files with 19 additions and 5 deletions

@ -64,6 +64,15 @@ section.
5. Failing test runs should dump enough information to diagnose the bug. This
includes stdout, stderr, any log files, and even the OS environment.
There are a few environment variables that you can set to change the test suite
behavior:
* `KEEPTRASH=1` - This will leave the local repository data in a `tmp` directory
and the remote repository data in `test/remote`.
* `SKIPCOMPILE=1` - This skips the Git LFS compilation step. Speeds up the
tests when you're running the same test script multiple times without changing
any Go code.
### Test Suite
The `testenv.sh` script includes some global variables used in tests. This

@ -115,13 +115,18 @@ setup() {
rm -rf "test/remote"
mkdir "test/remote"
if [ -z "$SKIPCOMPILE" ]; then
echo "compile git-lfs for $0"
script/bootstrap
fi
$GITLFS version
if [ -z "$SKIPCOMPILE" ]; then
for go in test/cmd/*.go; do
go build -o "$BINPATH/$(basename $go .go)" "$go"
done
fi
echo "LFSTEST_URL=$LFS_URL_FILE LFSTEST_DIR=$REMOTEDIR lfstest-gitserver"
LFSTEST_URL="$LFS_URL_FILE" LFSTEST_DIR="$REMOTEDIR" lfstest-gitserver > "$REMOTEDIR/gitserver.log" 2>&1 &