1 $! Test.Com - DCL driver for perl5 regression tests
3 $! Version 1.0 30-Sep-1994
4 $! Charles Bailey bailey@genetics.upenn.edu
6 $! A little basic setup
7 $ On Error Then Goto wrapup
8 $ olddef = F$Environment("Default")
9 $ If F$TrnLNm("Perl_Root").nes.""
11 $ Set Default Perl_Root:[t]
16 $! Pick up a copy of perl to use for the tests
17 $ Delete/Log/NoConfirm Perl.;*
18 $ Copy/Log/NoConfirm [-]Perl.Exe []Perl.
20 $! Make the environment look a little friendlier to tests which assume Unix
22 $ Macro/NoDebug/Object=Echo.Obj Sys$Input
27 .byte 14 ; DSC$K_DTYPE_T
28 .byte 2 ; DSC$K_CLASS_D
34 calls #1,G^LIB$GET_FOREIGN
58 calls #1,G^LIB$PUT_OUTPUT
62 $ Link/NoTrace Echo.Obj;
63 $ Delete/Log/NoConfirm Echo.Obj;*
64 $ echo = "$" + F$Parse("Echo.Exe")
67 $ MCR Sys$Disk:[]Perl.
68 $ Deck/Dollar=$$END-OF-TEST$$
69 # $RCSfile: TEST,v $$Revision: 4.1 $$Date: 92/08/07 18:27:00 $
70 # Modified for VMS 30-Sep-1994 Charles Bailey bailey@genetics.upenn.edu
72 # This is written in a peculiar style, since we're trying to avoid
73 # most of the constructs we'll be testing for.
75 # skip those tests we know will fail entirely or cause perl to hang bacause
77 @compexcl=('cpp.t','script.t');
78 @ioexcl=('argv.t','dup.t','fs.t','inplace.t','pipe.t');
79 @libexcl=('anydbm.t','db-btree.t','db-hash.t','db-recno.t',
80 'gdbm.t','ndbm.t','odbm.t','sdbm.t','posix.t','soundex.t');
81 @opexcl=('exec.t','fork.t','glob.t','magic.t','misc.t','stat.t');
82 @exclist=(@compexcl,@ioexcl,@libexcl,@opexcl);
83 foreach $file (@exclist) { $skip{$file}++; }
87 #if ($ARGV[0] eq '-v') {
92 chdir 't' if -f 't/TEST';
95 @files = split(/[ \n]/, `\$ dir/col=1/nohead/notrail [...]*.t;`);
98 $fname =~ s/.*\]([\w\$\-]+\.T);.*/$1/;
99 if ($skip{"\L$fname"}) { push(@skipped,$_); }
100 else { push(@ARGV,$_); }
105 print "The following tests were skipped because they rely extensively on\n";
106 print " Unixisms not compatible with the current version of perl for VMS:\n";
107 print "\t",join("\n\t",@skipped);
113 while ($test = shift) {
119 print "$te" . '.' x (15 - length($te)) . "\n";
120 open(script,"$test") || die "Can't run $test.\n";
123 if (/#!..perl(.*)/) {
128 open(results,"\$ MCR Sys\$Disk:[]Perl. $switch $test |") || (print "can't run.\n");
136 if (/^1\.\.([0-9]+)/) {
143 $next = $1, $ok = 0, last if /^not ok ([0-9]*)/;
144 next if /^\s*$/; # our 'echo' substitute produces one more \n than Unix'
145 if (/^ok (.*)/ && $1 == $next) {
154 if ($ok && $next == $max) {
159 print "FAILED on test $next\n";
163 die "Failed a basic test--cannot continue.\n";
170 print "All tests successful.\n";
172 die "FAILED--no tests were run for some reason.\n";
175 $pct = sprintf("%.2f", $good / $total * 100);
177 warn "Failed 1 test, $pct% okay.\n";
179 warn "Failed $bad/$total tests, $pct% okay.\n";
182 ($user,$sys,$cuser,$csys) = times;
183 print sprintf("u=%g s=%g cu=%g cs=%g files=%d tests=%d\n",
184 $user,$sys,$cuser,$csys,$files,$totmax);
187 $ If F$Search("Echo.Exe").nes."" Then Delete/Log/NoConfirm Echo.Exe;*
188 $ Set Default &olddef