git p4 test: start p4d inside its db dir
authorPete Wyckoff <pw@padd.com>
Sun, 27 Jan 2013 03:11:10 +0000 (22:11 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Jan 2013 06:00:38 +0000 (22:00 -0800)
This will avoid having to do native path conversion for
windows.  Also may be a bit cleaner always to know that p4d
has that working directory, instead of wherever the function
was called from.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-git-p4.sh

index c5d1f4d27a77bcfc753163a35600c1318a1376ef..185f6f1a8d882e3f6d795e09bdb2d41ee7ca4670 100644 (file)
@@ -40,8 +40,11 @@ start_p4d() {
        mkdir -p "$db" "$cli" "$git" &&
        rm -f "$pidfile" &&
        (
-               p4d -q -r "$db" -p $P4DPORT &
-               echo $! >"$pidfile"
+               cd "$db" &&
+               {
+                       p4d -q -p $P4DPORT &
+                       echo $! >"$pidfile"
+               }
        ) &&
 
        # This gives p4d a long time to start up, as it can be