From: David Mitchell Date: Sat, 20 Feb 2010 21:01:11 +0000 (+0000) Subject: stop skipping ext/Fcntl/t/syslfs.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3778d1b0a501c83cfa3003b5667224e2cd76288c;p=p5sagit%2Fp5-mst-13.2.git stop skipping ext/Fcntl/t/syslfs.t Since the module reorganisation and now that tests run cd'ed to ext/Fcntl, expecting to run ../perl no longer works. Also, for the benefit of future generations, make the inability to find perl a failure rather than a skip, with a more relevant error message. --- diff --git a/ext/Fcntl/t/syslfs.t b/ext/Fcntl/t/syslfs.t index 3417e44..7da5e21 100644 --- a/ext/Fcntl/t/syslfs.t +++ b/ext/Fcntl/t/syslfs.t @@ -119,7 +119,12 @@ print "# we seem to have sparse files...\n"; $ENV{LC_ALL} = "C"; -my $r = system '../perl', '-I../lib', '-e', <<'EOF'; +my $perl = '../../perl'; +unless (-x $perl) { + print "1..1\nnot ok 1 - can't find perl: expected $perl\n"; + exit 0; +} +my $r = system $perl, '-I../lib', '-e', <<'EOF'; use Fcntl qw(/^O_/ /^SEEK_/); sysopen(BIG, "big", O_WRONLY|O_CREAT|O_TRUNC) or die $!; my $sysseek = sysseek(BIG, 5_000_000_000, SEEK_SET); @@ -127,6 +132,7 @@ my $syswrite = syswrite(BIG, "big"); exit 0; EOF + sysopen(BIG, "big", O_WRONLY|O_CREAT|O_TRUNC) or do { warn "sysopen 'big' failed: $!\n"; bye }; my $sysseek = sysseek(BIG, 5_000_000_000, SEEK_SET);