From 8aed94420f610368eb49a8f7c3dc12d318bf4092 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 14 Mar 2017 15:01:13 +0100 Subject: [PATCH] autotest: determine path of mbsync prior to chdir() that allows tmp/ to be a symlink to a ramdisk. --- src/run-tests.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/run-tests.pl b/src/run-tests.pl index d1121c5..41a6f8b 100755 --- a/src/run-tests.pl +++ b/src/run-tests.pl @@ -18,8 +18,11 @@ use warnings; use strict; +use Cwd; use File::Path; +my $mbsync = getcwd()."/mbsync"; + -d "tmp" or mkdir "tmp"; chdir "tmp" or die "Cannot enter temp direcory.\n"; @@ -276,8 +279,8 @@ sub killcfg() # $options sub runsync($) { -# open FILE, "valgrind -q --log-fd=3 ../mbsync ".shift()." -c .mbsyncrc test 3>&2 2>&1 |"; - open FILE, "../mbsync -D -Z ".shift()." -c .mbsyncrc test 2>&1 |"; +# open FILE, "valgrind -q --log-fd=3 $mbsync ".shift()." -c .mbsyncrc test 3>&2 2>&1 |"; + open FILE, "$mbsync -D -Z ".shift()." -c .mbsyncrc test 2>&1 |"; my @out = ; close FILE or push(@out, $! ? "*** error closing mbsync: $!\n" : "*** mbsync exited with signal ".($?&127).", code ".($?>>8)."\n"); return $?, @out;