X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib-core;h=6cdffeb155a479288124a98d9e613016c04b4dcb;hp=f3881ca561c008c407ca24755cdc9facce646039;hb=2ecbfc70bba339e0475b745f5d5615675e427370;hpb=d228327cc4aec6fef736c5d44abb0edf025a57f0 diff --git a/tests/lib-core b/tests/lib-core index f3881ca5..6cdffeb1 100644 --- a/tests/lib-core +++ b/tests/lib-core @@ -8,10 +8,12 @@ fail () { t-set-intree () { if [ "x$DGIT_TEST_INTREE" = x ]; then return; fi : ${DGIT_TEST:=$DGIT_TEST_INTREE/dgit} + : ${DGIT_BADCOMMIT_FIXUP:=$DGIT_TEST_INTREE/dgit-badcommit-fixup} : ${DGIT_REPOS_SERVER_TEST:=$DGIT_TEST_INTREE/infra/dgit-repos-server} : ${DGIT_SSH_DISPATCH_TEST:=$DGIT_TEST_INTREE/infra/dgit-ssh-dispatch} : ${DGIT_INFRA_PFX:=$DGIT_TEST_INTREE${DGIT_TEST_INTREE:+/infra/}} - export DGIT_TEST DGIT_REPOS_SERVER_TEST DGIT_SSH_DISPATCH_TEST + export DGIT_TEST DGIT_BADCOMMIT_FIXUP + export DGIT_REPOS_SERVER_TEST DGIT_SSH_DISPATCH_TEST export PERLLIB="$DGIT_TEST_INTREE${PERLLIB:+:}${PERLLIB}" } @@ -19,5 +21,18 @@ t-set-using-tmp () { export HOME=$tmp export DGIT_TEST_DUMMY_DIR=$tmp export DGIT_TEST_TMP=$tmp - export GNUPGHOME=$tmp/gnupg + export GNUPGHOME=$tmp/nonexistent + git config --global user.email 'dgit-test@debian.example.net' + git config --global user.name 'dgit test git user' +} + +t-filter-out-git-hyphen-dir () { + local pathent; pathent=$(type -p git-rev-parse ||:) + case "$pathent" in '') return ;; esac + pathent=${pathent%/*} + local path=":$PATH:" + path="${path//:$pathent:/}" + path="${path#:}" + path="${path%:}" + PATH="$path" }