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 $ Set Default Perl_Root:[t]
11 $! Pick up a copy of perl to use for the tests
12 $ Delete/Log/NoConfirm Perl.;*
13 $ Copy/Log/NoConfirm [-]Perl.Exe []Perl.
15 $! Make the environment look a little friendlier to tests which assume Unix
17 $ Macro/NoDebug/Object=Echo.Obj Sys$Input
22 .byte 14 ; DSC$K_DTYPE_T
23 .byte 2 ; DSC$K_CLASS_D
29 calls #1,G^LIB$GET_FOREIGN
53 calls #1,G^LIB$PUT_OUTPUT
57 $ Link/NoTrace Echo.Obj;
58 $ Delete/Log/NoConfirm Echo.Obj;*
59 $ echo = "$Perl_Root:[T]Echo.Exe"
62 $ MCR Sys$Disk:[]Perl.
63 $ Deck/Dollar=$$END-OF-TEST$$
64 # $RCSfile: TEST,v $$Revision: 4.1 $$Date: 92/08/07 18:27:00 $
65 # Modified for VMS 30-Sep-1994 Charles Bailey bailey@genetics.upenn.edu
67 # This is written in a peculiar style, since we're trying to avoid
68 # most of the constructs we'll be testing for.
70 # skip those tests we know will fail entirely or cause perl to hang bacause
72 @compexcl=('cpp.t','script.t');
73 @ioexcl=('argv.t','dup.t','fs.t','inplace.t','pipe.t');
74 @libexcl=('anydbm.t','db-btree.t','db-hash.t','db-recno.t',
75 'gdbm.t','ndbm.t','odbm.t','sdbm.t','posix.t','soundex.t');
76 @opexcl=('exec.t','fork.t','glob.t','magic.t','misc.t','stat.t');
77 @exclist=(@compexcl,@ioexcl,@libexcl,@opexcl);
78 foreach $file (@exclist) { $skip{$file}++; }
82 #if ($ARGV[0] eq '-v') {
87 chdir 't' if -f 't/TEST';
90 @files = split(/[ \n]/, `\$ dir/col=1/nohead/notrail [...]*.t;`);
93 $fname =~ s/.*\]([\w\$\-]+\.T);.*/$1/;
94 if ($skip{"\L$fname"}) { push(@skipped,$_); }
95 else { push(@ARGV,$_); }
100 print "The following tests were skipped because they rely extensively on\n";
101 print " Unixisms not compatible with the current version of perl for VMS:\n";
102 print "\t",join("\n\t",@skipped);
108 while ($test = shift) {
114 print "$te" . '.' x (15 - length($te)) . "\n";
115 open(script,"$test") || die "Can't run $test.\n";
118 if (/#!..perl(.*)/) {
123 open(results,"\$ MCR Sys\$Disk:[]Perl. $switch $test |") || (print "can't run.\n");
131 if (/^1\.\.([0-9]+)/) {
138 $next = $1, $ok = 0, last if /^not ok ([0-9]*)/;
139 next if /^\s*$/; # our 'echo' substitute produces one more \n than Unix'
140 if (/^ok (.*)/ && $1 == $next) {
149 if ($ok && $next == $max) {
154 print "FAILED on test $next\n";
158 die "Failed a basic test--cannot continue.\n";
165 print "All tests successful.\n";
167 die "FAILED--no tests were run for some reason.\n";
170 $pct = sprintf("%.2f", $good / $total * 100);
172 warn "Failed 1 test, $pct% okay.\n";
174 warn "Failed $bad/$total tests, $pct% okay.\n";
177 ($user,$sys,$cuser,$csys) = times;
178 print sprintf("u=%g s=%g cu=%g cs=%g files=%d tests=%d\n",
179 $user,$sys,$cuser,$csys,$files,$totmax);
182 $ If F$Search("Echo.Exe").nes."" Then Delete/Log/NoConfirm Echo.Exe;*
183 $ Set Default &olddef