Subject: | Mech 0.73_02 developer fails tests on cygwin w/ perl 5.8.0; minor aid offered that box is on internet |
Love your module. I would like to use it at work, on my Win2000 laptop.
Cygwin is a mature implementation of Unix flavored software on Windows.
For my cygwin,
Mechanize 0.73_02 fails t/click.t at line 19
I now understand how to get Makefile.PL to recognize that I am on the internet. The test to get www.google.com fails to recognize the ENV of http_proxy. By testing for a url on my side of the firewall, Makefile.PL will recognize that I am on the internet. (see below)
I suggest that if the test to www.google.com fails, then a test to the url derived from the http_proxy be used. If the http_proxy can be pinged, we are apparently on the internet.
Even with this fix, t/click.t fails. TEST_VERBOSE output is attached. I suspect the failure is really in the internal proxy that is fired up. Can the internal proxy-based tests be made optional for cygwin? Can the functionality of the internal proxy be tested on cygwin? I would be happy to test the internal proxy on my platform.
$ diff Makefile.PL My.PL
13c13
< my $s = IO::Socket::INET->new(PeerAddr => "www.google.com:80",
---
Show quoted text
> my $s = IO::Socket::INET->new(PeerAddr => "ectip.ba.dupont.com:80",
$ cygperl Makefile.PL
It seems that you are not directly connected to the Internet. Some
of the WWW::Mechanize tests interact with websites such as Google,
in addition to its own internal tests.
Do you want to skip these tests? [y]
Do you want to install the mech-dump utility? [y]
It looks like you don't have IO::Socket::SSL installed. You will
not be able to process https:// URLs correctly.
WWW::Mechanize likes to have Test::Memory::Cycle for some of its tests,
but doesn't require it.
Checking if your kit is complete...
Looks good
Writing Makefile for WWW::Mechanize
WESTMWJ 08:47:39 /home/westmj/WWW-Mechanize-073_02
$ cygperl My.PL
Do you want to install the mech-dump utility? [y]
It looks like you don't have IO::Socket::SSL installed. You will
not be able to process https:// URLs correctly.
WWW::Mechanize likes to have Test::Memory::Cycle for some of its tests,
but doesn't require it.
Writing Makefile for WWW::Mechanize
$ make
cp script/mech-dump blib/script/mech-dump
/usr/bin/cygperl.exe "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/mech-dum
p
/usr/bin/cygperl.exe "-Iblib/arch" "-Iblib/lib" My.PL My
Do you want to install the mech-dump utility? [y]
It looks like you don't have IO::Socket::SSL installed. You will
not be able to process https:// URLs correctly.
WWW::Mechanize likes to have Test::Memory::Cycle for some of its tests,
but doesn't require it.
Writing Makefile for WWW::Mechanize
WESTMWJ 09:09:58 /home/westmj/WWW-Mechanize-073_02
$ make test TEST_VERBOSE=1
cp script/mech-dump blib/script/mech-dump
/usr/bin/cygperl.exe "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/mech-dum
p
/usr/bin/cygperl.exe "-MExtUtils::Command::MM" "-e" "test_harness(1, 'blib/lib',
'blib/arch')" t/*.t t/live/back.t t/live/click.t t/live/follow.t t/live/follow_
link.t t/live/form.t t/live/get.t t/live/reload.t t/live/submit.t
t/00.load...............1..2
ok 1 - use WWW::Mechanize;
# Testing WWW::Mechanize 0.73_02
ok 2 - use WWW::Mechanize::Link;
ok
t/98.rules..............1..2
ok 1 - Looking for XXXes
ok 2 - Looking for XXXes
ok
t/add_header............1..4
ok 1 - use WWW::Mechanize;
ok 2 - Created agent isa WWW::Mechanize
ok 3 - set header
ok 4 # skip Test::Memory::Cycle not installed
ok
1/4 skipped: Test::Memory::Cycle not installed
t/aliases...............1..8
ok 1 - use WWW::Mechanize;
ok 2
ok 3 - We only know Mac, Windows or Linux
ok 4 - We only know Mac, Windows or Linux
ok 5 - We only know Mac, Windows or Linux
ok 6 - We only know Mac, Windows or Linux
ok 7 - We only know Mac, Windows or Linux
ok 8 - We only know Mac, Windows or Linux
ok
t/area_link.............1..9
ok 1 - use WWW::Mechanize;
ok 2 - The object isa WWW::Mechanize
ok 3 - Fetched file:/home/westmj/WWW-Mechanize-073_02/t/area_link.html
ok 4 - Correct links came back
ok 5 - Correct links came back
ok 6 # skip Test::Memory::Cycle not installed
ok 7 # skip Test::Memory::Cycle not installed
ok 8 # skip Test::Memory::Cycle not installed
ok 9 # skip Test::Memory::Cycle not installed
ok
4/9 skipped: Test::Memory::Cycle not installed
t/autocheck.............1..5
ok 1 - use WWW::Mechanize;
ok 2 - The object isa WWW::Mechanize
ok 3 - Didn't fetch, but didn't die, either
ok 4 - The object isa WWW::Mechanize
ok 5 - Mech would die 4 u
ok
t/click.................1..10
ok 1 - use WWW::Mechanize;
ok 2 - Created the object isa WWW::Mechanize
ok 3 - The object isa Test::HTTP::LocalServer
# Failed test (t/click.t at line 19)ok 4 - Got back a response isa HTTP::Res
ponse
Can't even fetch local url at t/click.t line 19, <$server> line 1.
not ok 5 - Got URL
make: *** [test_dynamic] Interrupt
# Looks like you planned 10 tests but only ran 5.
# Looks like your test died just after 5.
WESTMWJ 09:10:24 /home/westmj/WWW-Mechanize-073_02
$ cygperl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=cygwin, osvers=1.3.22(0.7832), archname=cygwin-multi-64int
uname='cygwin_nt-5.0 ismene 1.3.22(0.7832) 2003-03-18 09:20 i586 unknown unk
nown cygwin '
config_args='-de -Dmksymlinks -Dusemultiplicity -Duse64bitint -Doptimize=-O3
-Dman3ext=3pm'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=defi
ne
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing',
optimize='-O3',
cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing'
ccversion='', gccversion='3.2 20020927 (prerelease)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lsee
ksize=4
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld2', ldflags =' -s -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib
libs=-lgdbm -ldb -lcrypt -lutil -lgdbm_compat
perllibs=-lcrypt -lutil -lgdbm_compat
libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_64_BIT_INT USE_LARGE_FILES PERL_IMPLICI
T_CONTEXT
Built under cygwin
Compiled at Aug 29 2003 12:06:59
%ENV:
CYGWIN=""
@INC:
/usr/lib/perl5/5.8.0/cygwin-multi-64int
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/cygwin-multi-64int
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
.
WESTMWJ 09:11:55 /home/westmj/WWW-Mechanize-073_02
$