chiark / gitweb /
Test suite: t-setup-*: Fix lock path
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 7 Aug 2016 19:52:11 +0000 (20:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Sep 2016 12:41:48 +0000 (13:41 +0100)
Needs to be not in a directory which may not exist yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib

index 81accebf0f6f11d53639af725298416606102e33..c81a7922ef89bbd9d7f55040f9dfa6e02f9d5655 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -398,18 +398,22 @@ t-setup-done () {
 t-setup-import () {
        local setupname=$1
 
 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"
        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"
        else
                setupsrc="$tmpbase/$setupname"
+               lock="$setupsrc.lock"
        fi
 
        local simport="$setupsrc/IMPORT"
 
        if ! [ -e "$simport" ]; then
        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
                xargs -0 -a $tmp/.save-env \
                bash -xec '
                        cd "$1"; shift