From: Jarkko Hietaniemi Date: Sat, 10 Feb 2001 22:54:38 +0000 (+0000) Subject: Make TEST and UTEST more verbose in case something goes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be24517c7d6dbd51b4477cded03d9c0853e614ee;p=p5sagit%2Fp5-mst-13.2.git Make TEST and UTEST more verbose in case something goes wrong in running/compiling a script, suggested by Doug MacEachern. p4raw-id: //depot/perl@8764 --- diff --git a/t/TEST b/t/TEST index 65b1aa4..6237f9e 100755 --- a/t/TEST +++ b/t/TEST @@ -87,13 +87,16 @@ EOT } if ($type eq 'perl') { - open(RESULTS,"./perl$switch $test |") or print "can't run.\n"; + my $run = "./perl$switch $test |"; + open(RESULTS,$run) or print "can't run '$run': $!.\n"; } else { - open(RESULTS, "./perl -I../lib ../utils/perlcc -o ./$test.plc ./$test " - ." && ./$test.plc |") - or print "can't compile.\n"; - unlink "./$test.plc"; + my $compile = + "./perl -I../lib ../utils/perlcc -o ./$test.plc ./$test " + ." && ./$test.plc |"; + open(RESULTS, $compile) + or print "can't compile '$compile': $!.\n"; + unlink "./$test.plc"; } $ok = 0; diff --git a/t/UTEST b/t/UTEST index 1be1a5b..d1ac2be 100755 --- a/t/UTEST +++ b/t/UTEST @@ -79,12 +79,16 @@ EOT -x $test || (print "isn't executable.\n"); if ($type eq 'perl') { - open(RESULTS, "./$test |") || (print "can't run.\n"); } + my $run = "./$test |"; + open(RESULTS, $run) || (print "can't run '$run': $!\n"); + } else { - open(RESULTS, "./perl -I../lib ../utils/perlcc -o ./$test.plc ./$test " - ." && ./$test.plc |") - or print "can't compile.\n"; - unlink "./$test.plc"; + my $compile = + "./perl -I../lib ../utils/perlcc -o ./$test.plc ./$test " + ." && ./$test.plc |"; + open(RESULTS, $compile) + or print "can't compile '$compile': $!.\n"; + unlink "./$test.plc"; } } else { @@ -103,10 +107,14 @@ EOT } if ($type eq 'perl') { - open(RESULTS,"./perl$switch -I../lib -Mutf8 $test |") || (print "can't run.\n"); + my $run = "./perl$switch -I../lib -Mutf8 $test |"; + open(RESULTS, $run) or + print "can't run '$run': $!.\n"; } else { - open(RESULTS, "./perl -I../lib ../utils/perlcc -Mutf8 ./$test -run -verbose dcf -log ../compilelog |") or print "can't compile.\n"; + my $compile = "./perl -I../lib ../utils/perlcc -Mutf8 ./$test -run -verbose dcf -log ../compilelog |"; + open(RESULTS, $compile) or + print "can't compile '$compile': $!.\n"; } } $ok = 0;