--- perl/trunk/test/helper.pm 2005/03/20 00:36:05 10 +++ perl-llin/test/helper.pm 2006/11/29 13:23:28 105 @@ -2,11 +2,13 @@ package test::helper; use strict; use Exporter; +use Config; use POSIX qw(WEXITSTATUS); our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); @ISA = "Exporter"; @EXPORT_OK = qw($_loop $_point $_pidfile $_real); -our($_loop, $_point, $_pidfile, $_real) = ("examples/loopback.pl","/tmp/fusemnt-".$ENV{LOGNAME},"test/s/mounted.pid","/tmp/fusetest-".$ENV{LOGNAME}); +our($_loop, $_point, $_pidfile, $_real) = ("","/tmp/fusemnt-".$ENV{LOGNAME},"test/s/mounted.pid","/tmp/fusetest-".$ENV{LOGNAME}); +$_loop = $Config{useithreads} ? "examples/loopback_t.pl" : "examples/loopback.pl"; if($0 !~ qr|s/u?mount\.t$|) { my ($reject) = 1; if(-f $_pidfile) { @@ -18,7 +20,7 @@ } } } - system("ls $_point >&/dev/null"); + system("ls $_point >/dev/null"); $reject = 1 if (POSIX::WEXITSTATUS($?)); die "not properly mounted\n" if $reject; }