Re: VMS and Unix pathnames
"Craig A. Berry" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.ports.vms |
|---|---|
| Message-ID | <[email protected]> |
On Aug 24, 2009, at 9:58 PM, John E. Malmberg wrote:
> Nicholas Clark wrote:
>> On Mon, Aug 24, 2009 at 08:40:44AM -0500, John E. Malmberg wrote:
>>> Nicholas Clark wrote:
>>>> Currently the core uses File::Spec inside the test running
>>>> script, t/TEST,
>>>> that VMS uses. If I understand perlvms.pod correctly, perl on VMS
>>>> can
>>>> understand Unix-like pathnames directly.
>>>>
>>>> I'd like to remove File::Spec from t/TEST, as it's something
>>>> complex run too
>>>> early in testing. Would the appended change work on VMS? It
>>>> assumes that
>>> As the current t/TEST is used now, I think it is passed the
>>> starting file specification in VMS format. So on VMS you still
>>> need a VMS::Filespec::unixify to convert the input path
>>> parameter(s) to the test.
>> If I understand vms/test.com enough:
>> $ If PERL_TEST_DRIVER .eqs. "minitest"
>> $ Then
>> $ MCR Sys$Disk:[]Perl'exe' TEST. "-minitest" "base/*.t" "comp/
>> *.t" "cmd/*.t" "run/*.t" "io/*.t" "op/*.t" "uni/*.t"
>> $ Else
>> $ MCR Sys$Disk:[]Perl'exe' "-I[-.lib]" 'PERL_TEST_DRIVER'
>> "''p3'" "''p4'" "''p5'" "''p6'" "''p7'"
>> $ EndIf
>> and vms/descrip_mms.template
>> test : all [.t.lib]vmsfspec.t [.t.lib]vms_dclsym.t
>> [.t.lib]vms_stdio.t unpack_files
>> @ PERL_TEST_DRIVER == "TEST."
>> - @[.vms]test.com "$(E)" "$(__DEBUG__)"
>> @ $(MINIPERL) -e "print ""Ran tests"";" > [.t]rantests.
>> then under minitest, it's being passed Unix-style globs, and under
>> test,
>> nothing. So it is "already" expecting Unix-style names.
>
> vms/test.com is also run manually and when that is done, it is
> generally passed a VMS style path name, which it would have a
> difficult time to translate to a Unix path name to pass to t/TEST.
It doesn't need to. It really just needs a filename it can pass to
Perl. I just ran the following in a build directory after Nicholas's
patch:
$ @[.vms]test .exe "" -"v" [.base]cond.t
%DELETE-I-FILDEL, D0:[smoke.Test-Smoke.blead.t]PERL.EXE;1 deleted (16
blocks)
%COPY-S-COPIED, D0:[smoke.Test-Smoke.blead]PERL.EXE;1 copied to D0:
[SMOKE.TEST-SMOKE.BLEAD.t]Perl.EXE;1 (16 blocks)
%DELETE-I-FILDEL, D0:[smoke.Test-Smoke.blead.t]vmspipe.com;1 deleted
(16 blocks)
%COPY-S-COPIED, D0:[smoke.Test-Smoke.blead]vmspipe.com;1 copied to D0:
[SMOKE.TEST-SMOKE.BLEAD.t]vmspipe.com;1 (2 blocks)
24-AUG-2009 22:12:10.60 User: SMOKE Process ID: 000130F1
Node: ALMA Process name: "SMOKE"
Accounting information:
Buffered I/O count: 17662 Peak working set size: 19360
Direct I/O count: 3324 Peak virtual size: 187920
Page faults: 7500 Mounted volumes: 0
Images activated: 40
Elapsed CPU time: 0 00:00:04.30
Connect time: 0 02:23:20.43
1..4
ok 1
ok 2
ok 3
ok 4
t/[.BASE]COND....ok
So that bit looks a little off. I'm not convinced we should worry too
much about that. We were still able to run the test and see its
result. I don't think anything that parses the output will pass in
native-syntax filenames, so it won't see them on output either.
All tests successful.
u=4.38 s=0.00 cu=0.00 cs=0.00 scripts=1 tests=4
24-AUG-2009 22:12:10.74 User: SMOKE Process ID: 000130F1
________________________________________
Craig A. Berry
mailto:[email protected]
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser