Subject: | long path to perl && FreeBSD (non-linux?) cause 2 tests to fail [patch] |
is there really a 1.3 seen in "broken in" list ?
I use an automated process to install hundreds of module tarballs and it's
necessary for each tarball to PASS its tests.
[DMT 30-Nov-2011] don't quite understand this, but 'make test' only failed
on FreeBSD/5.14.2 and for two tests (variations on a theme)
not ok 3 - simple: verified (real)
not ok 12 - oo: alive (verified)
This happened because the 'ps' output should be:
/opt/perl/uq.is.perl.20111125-5.10.1/bin/perl test.pl --daemon
but was truncated to
/opt/perl/uq.is.perl.20111125-5.14.2/bin/perl test.p
Other people may not have encountered this as I have a particularly long
path to perl. I don't understand how 5.10.1 on the same machine can work.
Setting the 'COLUMNS' environment variable won't help as:
my $cols = delete($ENV{'COLUMNS'}); # prevents `ps` from wrapping
so add 'w' to ps command, for FreeBSD
possbly related
https://rt.cpan.org/Public/Bug/Display.html?id=15015
diff -u Proc-PID-File-1.27.orig/File.pm Proc-PID-File-1.27/File.pm
--- Proc-PID-File-1.27.orig/File.pm 2009-10-13 11:40:21.000000000 +1000
+++ Proc-PID-File-1.27/File.pm 2011-11-30 07:58:17.000000000 +1000
@@ -253,8 +253,9 @@
}
}
my $cols = delete($ENV{'COLUMNS'}); # prevents `ps` from wrapping
- my @ps = split m|$/|, qx/ps -fp $pid/
- || die "ps utility not available: $!";
+ my $ps_cmd = ($^O eq 'freebsd') ? "ps -fwp $pid" : "ps -fp $pid";
+ my @ps = split m|$/|, `$ps_cmd`
+ or die "ps utility not available: $!";
s/^\s+// for @ps; # leading spaces confuse us
$ENV{'COLUMNS'} = $cols if defined($cols);