2015-05-18 23:28:58 +00:00
|
|
|
#!/bin/sh
|
2015-05-19 01:09:32 +00:00
|
|
|
# Including in script/integration and every test/test-*.sh file.
|
2015-05-18 23:28:58 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2015-05-19 22:54:15 +00:00
|
|
|
# The root directory for the git-lfs repository
|
2015-05-18 23:28:58 +00:00
|
|
|
ROOTDIR=$(cd $(dirname "$0")/.. && pwd)
|
2015-05-19 22:54:15 +00:00
|
|
|
|
|
|
|
# Where Git LFS outputs the compiled binaries
|
2015-05-18 23:28:58 +00:00
|
|
|
BINPATH="$ROOTDIR/bin"
|
2015-05-19 22:54:15 +00:00
|
|
|
|
|
|
|
# Put bin path on PATH
|
2015-05-18 23:28:58 +00:00
|
|
|
PATH="$BINPATH:$PATH"
|
|
|
|
|
|
|
|
# create a temporary work space
|
2015-05-21 21:01:35 +00:00
|
|
|
TMPDIR=${GIT_LFS_TEST_DIR:-"$(cd $(dirname "$0")/.. && pwd)/tmp"}
|
2015-05-19 22:54:15 +00:00
|
|
|
|
|
|
|
# This is unique to every test file, and cleared after every test run.
|
2015-05-18 23:28:58 +00:00
|
|
|
TRASHDIR="$TMPDIR/$(basename "$0")-$$"
|
|
|
|
|
2015-05-19 22:54:15 +00:00
|
|
|
# Points to the git-lfs binary compiled just for the tests
|
2015-05-18 23:28:58 +00:00
|
|
|
GITLFS="$BINPATH/git-lfs"
|
2015-05-19 22:54:15 +00:00
|
|
|
|
|
|
|
# The directory that the test Git server works from. This cleared at the
|
|
|
|
# beginning of every test run.
|
2015-05-18 23:28:58 +00:00
|
|
|
REMOTEDIR="$ROOTDIR/test/remote"
|
2015-05-19 22:54:15 +00:00
|
|
|
|
|
|
|
# This is the prefix for Git config files. See the "Test Suite" section in
|
|
|
|
# test/README.md
|
2015-05-18 23:28:58 +00:00
|
|
|
LFS_CONFIG="$REMOTEDIR/config"
|
|
|
|
|
2015-05-19 22:54:15 +00:00
|
|
|
# This file contains the URL of the test Git server. See the "Test Suite"
|
|
|
|
# section in test/README.md
|
|
|
|
LFS_URL_FILE="$REMOTEDIR/url"
|
|
|
|
|
2015-05-18 23:28:58 +00:00
|
|
|
mkdir -p "$TRASHDIR"
|
|
|
|
|
|
|
|
. "test/testhelpers.sh"
|