chiark / gitweb /
Test suite: t-setup-*: Fix lock path
[dgit.git] / tests / lib
index 81acceb..c81a792 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -398,18 +398,22 @@ t-setup-done () {
 t-setup-import () {
        local setupname=$1
 
+       local setupsrc
+       local lock
        if [ "x$tmpbase" = x ]; then
                # ADTTMP was set on entry to tests/lib, so we
                # are not sharing tmp area between tests
                setupsrc="$tmp"
+               lock="$tmp/.dummy.lock"
        else
                setupsrc="$tmpbase/$setupname"
+               lock="$setupsrc.lock"
        fi
 
        local simport="$setupsrc/IMPORT"
 
        if ! [ -e "$simport" ]; then
-               with-lock-ex -w "$simport.lock" \
+               with-lock-ex -w "$lock" \
                xargs -0 -a $tmp/.save-env \
                bash -xec '
                        cd "$1"; shift