1 $! Test.Com - DCL driver for perl5 regression tests
3 $! Version 1.1 4-Dec-1995
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$Search("t.dir").nes.""
13 $ If F$TrnLNm("Perl_Root").nes.""
15 $ Set Default Perl_Root:[t]
17 $ Write Sys$Error "Can't find test directory"
23 $ If p1.nes."" Then exe = p1
24 $! Pick up a copy of perl to use for the tests
25 $ Delete/Log/NoConfirm Perl.;*
26 $ Copy/Log/NoConfirm [-]Perl'exe' []Perl.
28 $! Make the environment look a little friendlier to tests which assume Unix
30 $ Macro/NoDebug/Object=Echo.Obj Sys$Input
35 .byte 14 ; DSC$K_DTYPE_T
36 .byte 2 ; DSC$K_CLASS_D
42 calls #1,G^LIB$GET_FOREIGN
66 calls #1,G^LIB$PUT_OUTPUT
70 $ Link/NoTrace/Exe=Echo.Exe Echo.Obj;
71 $ Delete/Log/NoConfirm Echo.Obj;*
72 $ echo = "$" + F$Parse("Echo.Exe")
75 $ testdir = "Directory/NoHead/NoTrail/Column=1"
76 $ Define/User Perlshr Sys$Disk:[-]PerlShr'exe'
77 $ MCR Sys$Disk:[]Perl. "''p2'" "''p3'" "''p4'" "''p5'" "''p6'"
78 $ Deck/Dollar=$$END-OF-TEST$$
79 # $RCSfile: TEST,v $$Revision: 4.1 $$Date: 92/08/07 18:27:00 $
80 # Modified for VMS 30-Sep-1994 Charles Bailey bailey@genetics.upenn.edu
82 # This is written in a peculiar style, since we're trying to avoid
83 # most of the constructs we'll be testing for.
85 # skip those tests we know will fail entirely or cause perl to hang bacause
86 # of Unixisms in the tests. (The Perl operators being tested may work fine,
87 # but the tests may use other operators which don't.)
88 @compexcl=('cpp.t','script.t');
89 @ioexcl=('argv.t','dup.t','fs.t','inplace.t','pipe.t');
90 @libexcl=('anydbm.t','db-btree.t','db-hash.t','db-recno.t',
91 'gdbm.t','io_dup.t', 'io_pipe.t', 'io_sock.t',
92 'ndbm.t','odbm.t','posix.t','sdbm.t','soundex.t');
93 # Note: POSIX is not part of basic build, but can be built
94 # separately if you're using DECC
95 @opexcl=('exec.t','fork.t','glob.t','groups.t','magic.t','misc.t','stat.t');
96 @exclist=(@compexcl,@ioexcl,@libexcl,@opexcl);
97 foreach $file (@exclist) { $skip{$file}++; }
101 @ARGV = grep($_,@ARGV); # remove empty elements due to "''p1'" syntax
103 if ($ARGV[0] eq '-v') {
108 chdir 't' if -f 't/TEST';
110 if ($ARGV[0] eq '') {
111 foreach (<[.*]*.t>) {
113 ($fname = $_) =~ s/.*\]//;
114 if ($skip{"\L$fname"}) { push(@skipped,$_); }
115 else { push(@ARGV,$_); }
120 print "The following tests were skipped because they rely extensively on\n";
121 print " Unixisms not compatible with the current version of perl for VMS:\n";
122 print "\t",join("\n\t",@skipped),"\n\n";
128 while ($test = shift) {
134 $te .= '.' x (24 - length($te));
135 open(script,"$test") || die "Can't run $test.\n";
138 if (/#!..perl(.*)/) {
140 # Add "" to protect uppercase switches on command line
141 $switch =~ s/-([A-Z]\S*)/"-$1"/g;
145 open(results,"\$ MCR Sys\$Disk:[]Perl. $switch $test |") || (print "can't run.\n");
154 if (/^1\.\.([0-9]+)/) {
161 $next = $1, $ok = 0, last if /^not ok ([0-9]*)/;
162 next if /^\s*$/; # our 'echo' substitute produces one more \n than Unix'
163 if (/^ok (.*)/ && $1 == $next) {
172 if ($ok && $next == $max) {
177 print "${te}skipping test on this platform\n";
182 print "${te}FAILED on test $next\n";
186 die "Failed a basic test--cannot continue.\n";
193 print "All tests successful.\n";
195 die "FAILED--no tests were run for some reason.\n";
198 $pct = sprintf("%.2f", $good / $total * 100);
200 warn "Failed 1 test, $pct% okay.\n";
202 warn "Failed $bad/$total tests, $pct% okay.\n";
205 ($user,$sys,$cuser,$csys) = times;
206 print sprintf("u=%g s=%g cu=%g cs=%g files=%d tests=%d\n",
207 $user,$sys,$cuser,$csys,$files,$totmax);
210 $ If F$Search("Echo.Exe").nes."" Then Delete/Log/NoConfirm Echo.Exe;*
211 $ Set Default &olddef