Hi,

I have done some smoke testing in the past. I have a new machine and
wanted to set it up for smoke testing but I've been bitten again by make
tests that don't seem to do the right thing with proxy settings. Even
though the issue I had was with File::Fetch via CPANPLUS as I was
setting up for smoke testing I thought I'd post it here in case there
was some good advice to avoid these issues in the future.

Created new user
Built a new perl 5.10 and installed into users home dir
Set paths etc to point to user perl
Installed and configured CPAN shell
Attempted to install CPANPLUS from the CPAN shell and got:

Running make install
  Delayed until after prerequisites
Running install for module 'File::Fetch'
Running make for K/KA/KANE/File-Fetch-0.18.tar.gz
.
.
.
Running make test
CPAN: CPAN::Reporter loaded ok (v1.1708)
PERL_DL_NONLAZY=1 /home/cpantester/perl10/bin/perl
"-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib',
'blib/arch')" t/*.t
Name "File::Fetch::USER_AGENT" used only once: possible typo at
t/01_File-Fetch.t line 119.
Name "File::Fetch::FROM_EMAIL" used only once: possible typo at
t/01_File-Fetch.t line 121.


####################### NOTE ##############################

Some of these tests assume you are connected to the
internet. If you are not, or if certain protocols or hosts
are blocked and/or firewalled, these tests could fail due
to no fault of the module itself.

###########################################################
Command failed: get: Fatal error: HTTP/1.0 403 Forbidden
 at t/01_File-Fetch.t line 211
Fetch failed! HTTP response: 500 Internal Server Error [500 Can't
connect to www.cpan.org:80 (connect: Connection refused)] at
t/01_File-Fetch.t line 211
Command failed:  at t/01_File-Fetch.t line 211

and it sits there blocked on something!

Eventually I control/c it (remember this).

So I notice, it is File::Fetch and download and run the tests manually
and it does the same thing - hangs in the middle of the tests. So then I
run prove on the 01_File-Fetch.t and it gets to test 120 and hangs. It
is doing HTTP/FTP stuff and I sit behind a firewall that throws packets
to port 80 in a bin but my http_proxy env var is set correctly. Finally
I spot a process:

1001      6915  0.0  0.0   5356  1868 pts/4    S+   13:12   0:00
/usr/bin/lftp -f /tmp/Poxnaf5Zgh

and on examining /tmp/Poxnaf5Zgh I see:

set ftp:passive-mode 1;
get 'http://www.cpan.org/index.html' -o tmp/index.html

I run that command myself and it attempts a fetch then delays and seems
to go on retrying forever. I've never heard of lftp and as far as I know
I don't need it and have never used it but ubuntu installer installed it
out of the box.

Finally I find /etc/lftp.conf and see the http:proxy line is commented
out, uncomment it and set it correctly and now a prove on the test works.

Now for some reason, even though I control/c'ed the install for
CPANPLUS, cpan shell seems to think I've already installed CPANPLUS and
even a force install CPANPLUS just contains many lines of this form:

Has already been unwrapped into directory
/home/cpantester/.cpan/build/CPANPLUS-0.8601-k6q367
Has already been made
Running make test
  Has already been tested successfully

and I never got to configure CPANPLUS :-(

You may be asking why I wanted CPANPLUS - that was because of its useful
-c command to show testing reports.

I find the magic command to force CPANPLUS to configure it:

perl -MCPANPLUS::Configure::Setup -e 'CPANPLUS::Configure::Setup->init()'

and it dies with:

perl -MCPANPLUS::Configure::Setup -e 'CPANPLUS::Configure::Setup->init()'
You called 'CPANPLUS::Configure::Setup::term' on
'CPANPLUS::Configure::Setup' which was interpreted by Object::Accessor
as an object call. Did you mean to include 'term' from somewhere else?
at /home/cpantester/perl10/lib/5.10.0/Object/Accessor.pm line 458
        Object::Accessor::AUTOLOAD('CPANPLUS::Configure::Setup') called at
/home/cpantester/perl10/lib/5.10.0/CPANPLUS/Configure/Setup.pm line 87
        CPANPLUS::Configure::Setup::init('CPANPLUS::Configure::Setup') called
at -e line 1

I know CPANPLUS is not a requirement for CPAN::Reporter::Smoker but it
is useful. Presumably because CPANPLUS was never configured any command
I issue with it now just reports nothing:

cpanp -c

% cpanp
CPAN Terminal> o

CPAN Terminal> c *

No wonder so few people do this.

>From what I remember last time I was smoke testing I hit rather a lot of
modules which ignored my http_proxy. If you feel there are any bugs in
this or people I should tell about this experience please let me know.

Anyone know how to configure CPANPLUS once it is in this state?

And as a secondary, I see my previous reports in the "Hall of Fame"
under my CPAN name but I cannot remember how it gets there. As far as I
am aware I only put in an email address to CPAN::Reporter and although
my cpan email address may forward to that address I'm not sure how my
CPAN name gets into the reports.

Thanks for listening to a rather frustrated user.

Martin

Reply via email to