From: Gurusamy Sarathy Date: Mon, 6 Jul 1998 23:24:47 +0000 (+0000) Subject: try harder to run non-executable tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8e169608e62d8d83f3c21ba3dafc4efb9ad5e930;p=p5sagit%2Fp5-mst-13.2.git try harder to run non-executable tests p4raw-id: //depot/perl@1351 --- diff --git a/t/TEST b/t/TEST index df121e8..990c18b 100755 --- a/t/TEST +++ b/t/TEST @@ -73,12 +73,18 @@ EOT chop($te); print "$te" . '.' x (18 - length($te)); if ($sharpbang) { - -x $test || (print "isn't executable.\n"); + eval { chmod 0555, $test } unless -x $test; if ($type eq 'perl') { - open(RESULTS, "./$test |") || (print "can't run.\n"); } + unless (open(RESULTS, "./$test |")) { + print "$test not executable, " unless -x $test; + print "can't run.\n"; + } + } else { - open(RESULTS, "./perl -I../lib ../utils/perlcc ./$test -run -verbose dcf -log ../compilelog |") or print "can't compile.\n"; + open(RESULTS, "./perl -I../lib ../utils/perlcc ./$test " + ."-run -verbose dcf -log ../compilelog |") + or print "can't compile.\n"; } } else {