#46455 closed defect (worksforme)
p5-file-path: upgrade to 2.09, add 5.18 5.20; tests fail
Reported by: | mojca (Mojca Miklavec) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | dbevans (David B. Evans) | |
Port: | p5-file-path |
Description
When trying to upgrade p5-file-path
I'm unable to get the tests to pass.
Attachments (1)
Change History (9)
Changed 10 years ago by mojca (Mojca Miklavec)
Attachment: | p5-file-path.2.09.diff added |
---|
comment:1 Changed 10 years ago by dbevans (David B. Evans)
comment:2 Changed 10 years ago by mojca (Mojca Miklavec)
---> Testing p5.20-file-path PERL_DL_NONLAZY=1 /opt/local/bin/perl5.20 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/Path.t ... Failed 124/129 subtests t/pod.t .... skipped: PERL_AUTHOR_TESTING environment variable not set (or zero) t/taint.t .. ok Test Summary Report ------------------- t/Path.t (Wstat: 11 Tests: 5 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 129 tests but ran 5. Files=3, Tests=11, 1 wallclock secs ( 0.05 usr 0.02 sys + 0.16 cusr 0.13 csys = 0.36 CPU) Result: FAIL Failed 1/3 test programs. 0/11 subtests failed. make: *** [test_dynamic] Error 255 Command failed: cd "/path/to/p5.20-file-path/work/File-Path-2.09" && /usr/bin/make test Exit code: 2
I'm still on the ancient 10.7. How can I debug this?
comment:3 Changed 10 years ago by mojca (Mojca Miklavec)
If I comment out line 24 in t/Path.t
then all the tests pass:
chmod $perm, "mhx", $path;
where $perm
equals 0111
(no read permissions).
If I run the tests as root (cd /path/to/t && make test
) then the tests succeed.
This might be connected with the macports
user and its permissions. I don't know what permission 111
is good for anyway.
comment:4 Changed 10 years ago by dbevans (David B. Evans)
It's just part of the test. At any rate, I think you're right its a permissions problem and the tests would normally be run as root anyway.
sudo port -d test p5.20-file-path
So I would rate this as a pass.
If you want to see which subtest is failing (with comments) run t/Path.t directly
cd work/File-Path-2.09 sudo p5.20 t/Path.t
comment:5 Changed 10 years ago by dbevans (David B. Evans)
If I run the test directly without root permission
perl5.20 t/Path.t 1..129 ok 1 - use Cwd; ok 2 - use File::Path; ok 3 - use File::Spec::Functions; mkdir mhx: Permission denied at t/Path.t line 23. Use of chdir('') or chdir(undef) as chdir() is deprecated at t/Path.t line 654. ok 4 - ... now chdir No root path(s) specified at t/Path.t line 655. not ok 5 - ... and finally rmtree # Failed test '... and finally rmtree ' # at t/Path.t line 655. # Looks like you planned 129 tests but ran 5. # Looks like you failed 1 test of 5 run. # Looks like your test exited with 255 just after 5.
which makes sense since
$ ls -ld . drwxr-xr-x 17 macports wheel 578 Jan 10 04:47 .
Only macports (and root) have write access in the working directory.
comment:6 Changed 10 years ago by dbevans (David B. Evans)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Committed in r131362 since tests succeed given appropriate permissions.
comment:7 follow-up: 8 Changed 10 years ago by mojca (Mojca Miklavec)
Can you please try the difference between
sudo port -v test p5.20-file-path
and
sudo port -v -t test p5.20-file-path
?
For me the first one works, but the second one doesn't. The problem lies in line 24 as mentioned earlier. But I don't understand what difference the -t
parameter could have.
comment:8 Changed 10 years ago by dbevans (David B. Evans)
Replying to mojca@…:
Can you please try the difference between
sudo port -v test p5.20-file-pathand
sudo port -v -t test p5.20-file-path?
For me the first one works, but the second one doesn't. The problem lies in line 24 as mentioned earlier. But I don't understand what difference the
-t
parameter could have.
I see the same thing but there no real error message that sheds any light on what the issue is. I'm wondering if this isn't an issue with trace mode rather than p5.20-file-path
.
Why don't you bring it up for discussion on the devel list and see if anyone can shed some light?
Not sure what problems you are seeing but tests work for me