summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-01-23 16:26:59 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2023-02-09 12:10:40 +0000
commitea4ce92aea6cbe5da688b97988dceb6b33382f66 (patch)
tree573ad8f9352b802549021e8e221acab2efcf3e84 /ci
parentff67b5e11724b075d145931aa6ac2c8817d791e2 (diff)
downloadlibgit2-ea4ce92aea6cbe5da688b97988dceb6b33382f66.tar.gz
ci: isolate the home directory for test execution
libgit2 can now isolate its home directory, and our test runner (by default) isolates the home directory. In our CI environment, we want to set up some pieces (like ssh configuration) in a fake homedir. Continue to do so and propagate that to clar.
Diffstat (limited to 'ci')
-rwxr-xr-xci/test.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/ci/test.sh b/ci/test.sh
index 230daaaa0..47629e9eb 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -16,6 +16,9 @@ BUILD_DIR=$(pwd)
TMPDIR=${TMPDIR:-/tmp}
USER=${USER:-$(whoami)}
+HOME=`mktemp -d ${TMPDIR}/home.XXXXXXXX`
+export CLAR_HOMEDIR=${HOME}
+
SUCCESS=1
CONTINUE_ON_FAILURE=0
@@ -140,7 +143,6 @@ fi
if [ -z "$SKIP_SSH_TESTS" ]; then
echo "Starting SSH server..."
- HOME=`mktemp -d ${TMPDIR}/home.XXXXXXXX`
SSHD_DIR=`mktemp -d ${TMPDIR}/sshd.XXXXXXXX`
git init --bare "${SSHD_DIR}/test.git" >/dev/null
cat >"${SSHD_DIR}/sshd_config" <<-EOF