This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make the VERSION of File::Spec be 0.86, otherwise File::Temp's
[perl5.git] / vms / test.com
1 $!  Test.Com - DCL wrapper for perl5 regression test driver
2 $!
3 $!  Version 2.0  25-April-2002   Craig Berry  craigberry@mac.com
4 $!                               (and many other hands in the last 7+ years)
5 $!  The most significant difference is that we now run the external t/TEST
6 $!  rather than keeping a separately maintained test driver embedded here.
7 $!
8 $!  Version 1.1   4-Dec-1995
9 $!  Charles Bailey  bailey@newman.upenn.edu
10 $!
11 $!  Set up error handler and save things we'll restore later.
12 $   On Control_Y Then Goto Control_Y_exit
13 $   On Error Then Goto wrapup
14 $   olddef = F$Environment("Default")
15 $   oldmsg = F$Environment("Message")
16 $   oldpriv = F$SetPrv("NOALL")         ! downgrade privs for safety
17 $   discard = F$SetPrv("NETMBX,TMPMBX") ! only need these to run tests
18 $!
19 $! Process arguments.  P1 is the file extension of the Perl images.  P2,
20 $! when not empty, indicates that we are testing a version of Perl built for
21 $! the VMS debugger.  The other arguments are passed directly to t/TEST.
22 $!
23 $   exe = ".Exe"
24 $   If p1.nes."" Then exe = p1
25 $   If F$Extract(0,1,exe) .nes. "."
26 $   Then
27 $     Write Sys$Error ""
28 $     Write Sys$Error "The first parameter passed to Test.Com must be the file type used for the"
29 $     Write Sys$Error "images produced when you built Perl (i.e. "".Exe"", unless you edited"
30 $     Write Sys$Error "Descrip.MMS or used the AXE=1 macro in the MM[SK] command line."
31 $     Write Sys$Error ""
32 $     $status = 44
33 $     goto wrapup
34 $   EndIf
35 $!
36 $!  "debug" perl if second parameter is nonblank
37 $!
38 $   dbg = ""
39 $   ndbg = ""
40 $   if p2.nes."" then dbg  = "dbg"
41 $   if p2.nes."" then ndbg = "ndbg"
42 $!
43 $!  Make sure we are where we need to be.
44 $   If F$Search("t.dir").nes.""
45 $   Then
46 $       Set Default [.t]
47 $   Else
48 $       If F$TrnLNm("Perl_Root").nes.""
49 $       Then 
50 $           Set Default Perl_Root:[t]
51 $       Else
52 $           Write Sys$Error "Can't find test directory"
53 $           $status = 44
54 $           goto wrapup
55 $       EndIf
56 $   EndIf
57 $!
58 $!  Pick up a copy of perl to use for the tests
59 $   If F$Search("Perl.").nes."" Then Delete/Log/NoConfirm Perl.;*
60 $   Copy/Log/NoConfirm [-]'ndbg'Perl'exe' []Perl.
61 $!
62 $!  Pick up a copy of vmspipe.com to use for the tests
63 $   If F$Search("VMSPIPE.COM").nes."" then Delete/Log/Noconfirm VMSPIPE.COM;*
64 $   Copy/Log/NoConfirm [-]VMSPIPE.COM []
65 $!
66 $!  This may be set for the C compiler in descrip.mms, but it confuses the File::Find tests
67 $   if f$trnlnm("sys") .nes. "" then Define sys " "
68 $!
69 $!  And do it
70 $   Set Message /NoFacility/NoSeverity/NoIdentification/NoText
71 $   Show Process/Accounting
72 $   testdir = "Directory/NoHead/NoTrail/Column=1"
73 $   PerlShr_filespec = f$parse("Sys$Disk:[-]''dbg'PerlShr''exe'")
74 $   Define 'dbg'Perlshr 'PerlShr_filespec'
75 $   If F$Mode() .nes. "INTERACTIVE" Then Define/Nolog PERL_SKIP_TTY_TEST 1
76 $   MCR Sys$Disk:[]Perl. "-I[-.lib]" TEST. "''p3'" "''p4'" "''p5'" "''p6'"
77 $   goto wrapup
78 $!
79 $ Control_Y_exit:
80 $   $status = 1552   ! %SYSTEM-W-CONTROLY
81 $!
82 $ wrapup:
83 $   status = $status
84 $   If f$trnlnm("''dbg'PerlShr") .nes. "" Then DeAssign 'dbg'PerlShr
85 $   Show Process/Accounting
86 $   If f$type(olddef) .nes. "" Then Set Default &olddef
87 $   If f$type(oldmsg) .nes. "" Then Set Message 'oldmsg'
88 $   If f$type(oldpriv) .nes. "" Then discard = F$SetPrv(oldpriv)
89 $   Exit status