When switching to the parallel test suite we stumbled upon test names used twice. This introduced random test failures due to a race condition. It has been fixed by correcting the test names given to HTTPTest->new().
The naming is not just critical but also redundant - the naming mirrors the filename of the test. To avoid this, I propose a patch (attached) that automatically uses the correct test name. It still could be overridden by explicitly setting it, if the need arises. What do you think ? Tim
From 4018325711072dd09ead5cb0f7c8919b902518b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim Rühsen?= <[email protected]> Date: Thu, 2 Oct 2014 11:26:59 +0200 Subject: [PATCH] use test filename as default test name --- tests/ChangeLog | 5 +++++ tests/Test--httpsonly-r.px | 3 +-- tests/Test--no-content-disposition-trivial.px | 2 +- tests/Test--no-content-disposition.px | 2 +- tests/Test--post-file.px | 3 +-- tests/Test--spider-fail.px | 2 +- tests/Test--spider-r--no-content-disposition-trivial.px | 2 +- tests/Test--spider-r--no-content-disposition.px | 2 +- tests/Test--spider-r-HTTP-Content-Disposition.px | 2 +- tests/Test--spider-r.px | 2 +- tests/Test--spider.px | 2 +- tests/Test--start-pos--continue.px | 2 +- tests/Test--start-pos.px | 2 +- tests/Test-204.px | 2 +- tests/Test-E-k-K.px | 2 +- tests/Test-E-k.px | 2 +- tests/Test-HTTP-Content-Disposition-1.px | 2 +- tests/Test-HTTP-Content-Disposition-2.px | 2 +- tests/Test-HTTP-Content-Disposition.px | 2 +- tests/Test-N--no-content-disposition-trivial.px | 2 +- tests/Test-N--no-content-disposition.px | 2 +- tests/Test-N-HTTP-Content-Disposition.px | 2 +- tests/Test-N-current.px | 2 +- tests/Test-N-no-info.px | 2 +- tests/Test-N-old.px | 2 +- tests/Test-N-smaller.px | 2 +- tests/Test-N.px | 2 +- tests/Test-O--no-content-disposition-trivial.px | 2 +- tests/Test-O--no-content-disposition.px | 2 +- tests/Test-O-HTTP-Content-Disposition.px | 2 +- tests/Test-O-nc.px | 2 +- tests/Test-O-nonexisting.px | 2 +- tests/Test-O.px | 2 +- tests/Test-Restrict-Lowercase.px | 2 +- tests/Test-Restrict-Uppercase.px | 2 +- tests/Test-auth-basic.px | 2 +- tests/Test-auth-no-challenge-url.px | 2 +- tests/Test-auth-no-challenge.px | 2 +- tests/Test-auth-retcode.px | 2 +- tests/Test-auth-with-content-disposition.px | 2 +- tests/Test-c-full.px | 2 +- tests/Test-c-partial.px | 2 +- tests/Test-c-shorter.px | 2 +- tests/Test-c.px | 2 +- tests/Test-cookies-401.px | 2 +- tests/Test-cookies.px | 2 +- tests/Test-ftp--start-pos.px | 2 +- tests/Test-ftp-bad-list.px | 2 +- tests/Test-ftp-iri-disabled.px | 2 +- tests/Test-ftp-iri-fallback.px | 2 +- tests/Test-ftp-iri-recursive.px | 2 +- tests/Test-ftp-iri.px | 2 +- tests/Test-ftp-list-Multinet.px | 2 +- tests/Test-ftp-list-UNIX-hidden.px | 2 +- tests/Test-ftp-list-Unknown-a.px | 2 +- tests/Test-ftp-list-Unknown-hidden.px | 2 +- tests/Test-ftp-list-Unknown-list-a-fails.px | 2 +- tests/Test-ftp-list-Unknown.px | 2 +- tests/Test-ftp-pasv-fail.px | 2 +- tests/Test-ftp-recursive.px | 2 +- tests/Test-ftp.px | 2 +- tests/Test-i-ftp.px | 2 +- tests/Test-i-http.px | 2 +- tests/Test-idn-cmd-utf8.px | 2 +- tests/Test-idn-cmd.px | 2 +- tests/Test-idn-headers.px | 2 +- tests/Test-idn-meta.px | 2 +- tests/Test-idn-robots-utf8.px | 2 +- tests/Test-idn-robots.px | 2 +- tests/Test-iri-disabled.px | 2 +- tests/Test-iri-forced-remote.px | 2 +- tests/Test-iri-list.px | 2 +- tests/Test-iri-percent.px | 2 +- tests/Test-iri.px | 2 +- tests/Test-k.px | 2 +- tests/Test-meta-robots.px | 2 +- tests/Test-nonexisting-quiet.px | 2 +- tests/Test-noop.px | 2 +- tests/Test-np.px | 2 +- tests/Test-proxy-auth-basic.px | 2 +- tests/Test-restrict-ascii.px | 2 +- tests/Test-stdouterr.px | 2 +- tests/WgetTests.pm | 4 +++- 83 files changed, 89 insertions(+), 84 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 45293eb..b4ea8cb 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2014-10-02 Tim Ruehsen <[email protected]> + + * tests/WgetTests.pm: use filename as default test name + * tests/Test-*.px: removed redundant 'name => ...' + 2014-10-01 Tim Ruehsen <[email protected]> * tests/Makefile.am: remove run-px, fixing dist-check diff --git a/tests/Test--httpsonly-r.px b/tests/Test--httpsonly-r.px index 8f67cce..202d0fb 100755 --- a/tests/Test--httpsonly-r.px +++ b/tests/Test--httpsonly-r.px @@ -68,12 +68,11 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--httpsonly-r", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, output => \%expected_downloaded_files); -print $expected_error_code."\n"; exit $the_test->run(); diff --git a/tests/Test--no-content-disposition-trivial.px b/tests/Test--no-content-disposition-trivial.px index b3fbdf2..da8639b 100755 --- a/tests/Test--no-content-disposition-trivial.px +++ b/tests/Test--no-content-disposition-trivial.px @@ -45,7 +45,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--no-content-disposition-trivial", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test--no-content-disposition.px b/tests/Test--no-content-disposition.px index 40b54e3..00833dc 100755 --- a/tests/Test--no-content-disposition.px +++ b/tests/Test--no-content-disposition.px @@ -46,7 +46,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--no-content-disposition", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test--post-file.px b/tests/Test--post-file.px index 1493858..9c866b6 100755 --- a/tests/Test--post-file.px +++ b/tests/Test--post-file.px @@ -15,8 +15,7 @@ my $expected_error_code = 3; ############################################################################### -my $the_test = HTTPTest->new (name => "Test--post-file", - cmdline => $cmdline, +my $the_test = HTTPTest->new (cmdline => $cmdline, errcode => $expected_error_code); exit $the_test->run(); diff --git a/tests/Test--spider-fail.px b/tests/Test--spider-fail.px index 7ffea3b..ceac637 100755 --- a/tests/Test--spider-fail.px +++ b/tests/Test--spider-fail.px @@ -42,7 +42,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--spider-fail", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test--spider-r--no-content-disposition-trivial.px b/tests/Test--spider-r--no-content-disposition-trivial.px index e12032c..1efadd1 100755 --- a/tests/Test--spider-r--no-content-disposition-trivial.px +++ b/tests/Test--spider-r--no-content-disposition-trivial.px @@ -99,7 +99,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--spider-r--no-content-disposition-trivial", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test--spider-r--no-content-disposition.px b/tests/Test--spider-r--no-content-disposition.px index 04057e9..0258d3d 100755 --- a/tests/Test--spider-r--no-content-disposition.px +++ b/tests/Test--spider-r--no-content-disposition.px @@ -100,7 +100,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--spider-r--no-content-disposition", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test--spider-r-HTTP-Content-Disposition.px b/tests/Test--spider-r-HTTP-Content-Disposition.px index a4349de..7c32494 100755 --- a/tests/Test--spider-r-HTTP-Content-Disposition.px +++ b/tests/Test--spider-r-HTTP-Content-Disposition.px @@ -100,7 +100,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--spider-r-HTTP-Content-Disposition", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test--spider-r.px b/tests/Test--spider-r.px index 383bbe0..9a26f3e 100755 --- a/tests/Test--spider-r.px +++ b/tests/Test--spider-r.px @@ -99,7 +99,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--spider-r", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test--spider.px b/tests/Test--spider.px index 8edf7d6..9c2e5e4 100755 --- a/tests/Test--spider.px +++ b/tests/Test--spider.px @@ -42,7 +42,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--spider", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test--start-pos--continue.px b/tests/Test--start-pos--continue.px index 13a3243..f408781 100755 --- a/tests/Test--start-pos--continue.px +++ b/tests/Test--start-pos--continue.px @@ -44,7 +44,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--start-pos--continue", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test--start-pos.px b/tests/Test--start-pos.px index eaf6192..ae1e0a1 100755 --- a/tests/Test--start-pos.px +++ b/tests/Test--start-pos.px @@ -34,7 +34,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test--start-pos", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-204.px b/tests/Test-204.px index 6f3e8dc..a6200b8 100755 --- a/tests/Test-204.px +++ b/tests/Test-204.px @@ -25,7 +25,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-204", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-E-k-K.px b/tests/Test-E-k-K.px index 4c9acc4..86530bd 100755 --- a/tests/Test-E-k-K.px +++ b/tests/Test-E-k-K.px @@ -79,7 +79,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-E-k-K", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-E-k.px b/tests/Test-E-k.px index 66023bd..1282148 100755 --- a/tests/Test-E-k.px +++ b/tests/Test-E-k.px @@ -76,7 +76,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-E-k", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-HTTP-Content-Disposition-1.px b/tests/Test-HTTP-Content-Disposition-1.px index 15dd139..b1fa49c 100755 --- a/tests/Test-HTTP-Content-Disposition-1.px +++ b/tests/Test-HTTP-Content-Disposition-1.px @@ -65,7 +65,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-1", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-HTTP-Content-Disposition-2.px b/tests/Test-HTTP-Content-Disposition-2.px index db460d4..8e57645 100755 --- a/tests/Test-HTTP-Content-Disposition-2.px +++ b/tests/Test-HTTP-Content-Disposition-2.px @@ -65,7 +65,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-2", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-HTTP-Content-Disposition.px b/tests/Test-HTTP-Content-Disposition.px index ed17b08..0778f84 100755 --- a/tests/Test-HTTP-Content-Disposition.px +++ b/tests/Test-HTTP-Content-Disposition.px @@ -46,7 +46,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-N--no-content-disposition-trivial.px b/tests/Test-N--no-content-disposition-trivial.px index 8eb2f37..a5305aa 100755 --- a/tests/Test-N--no-content-disposition-trivial.px +++ b/tests/Test-N--no-content-disposition-trivial.px @@ -38,7 +38,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N--no-content-disposition-trivial", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-N--no-content-disposition.px b/tests/Test-N--no-content-disposition.px index 10a8a79..5336f0c 100755 --- a/tests/Test-N--no-content-disposition.px +++ b/tests/Test-N--no-content-disposition.px @@ -39,7 +39,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N--no-content-disposition", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-N-HTTP-Content-Disposition.px b/tests/Test-N-HTTP-Content-Disposition.px index b1e3ad3..8bc44e6 100755 --- a/tests/Test-N-HTTP-Content-Disposition.px +++ b/tests/Test-N-HTTP-Content-Disposition.px @@ -40,7 +40,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N-HTTP-Content-Disposition", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-N-current.px b/tests/Test-N-current.px index 92df2a1..fbb183b 100755 --- a/tests/Test-N-current.px +++ b/tests/Test-N-current.px @@ -54,7 +54,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N-current", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-N-no-info.px b/tests/Test-N-no-info.px index bd28400..a0a9db9 100755 --- a/tests/Test-N-no-info.px +++ b/tests/Test-N-no-info.px @@ -52,7 +52,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N-no-info", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-N-old.px b/tests/Test-N-old.px index 9241edf..3cf7ccc 100755 --- a/tests/Test-N-old.px +++ b/tests/Test-N-old.px @@ -52,7 +52,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N-old", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-N-smaller.px b/tests/Test-N-smaller.px index 79c3f01..343b5b5 100755 --- a/tests/Test-N-smaller.px +++ b/tests/Test-N-smaller.px @@ -55,7 +55,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N-smaller", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-N.px b/tests/Test-N.px index e74b472..388b33e 100755 --- a/tests/Test-N.px +++ b/tests/Test-N.px @@ -38,7 +38,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-O--no-content-disposition-trivial.px b/tests/Test-O--no-content-disposition-trivial.px index a74fb17..f5f84fe 100755 --- a/tests/Test-O--no-content-disposition-trivial.px +++ b/tests/Test-O--no-content-disposition-trivial.px @@ -36,7 +36,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-O--no-content-disposition-trivial", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-O--no-content-disposition.px b/tests/Test-O--no-content-disposition.px index 2d4d8b1..8f3aa39 100755 --- a/tests/Test-O--no-content-disposition.px +++ b/tests/Test-O--no-content-disposition.px @@ -37,7 +37,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-O--no-content-disposition", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-O-HTTP-Content-Disposition.px b/tests/Test-O-HTTP-Content-Disposition.px index 3bace82..bf46867 100755 --- a/tests/Test-O-HTTP-Content-Disposition.px +++ b/tests/Test-O-HTTP-Content-Disposition.px @@ -37,7 +37,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-O-HTTP-Content-Disposition", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-O-nc.px b/tests/Test-O-nc.px index a3afefc..3450d26 100755 --- a/tests/Test-O-nc.px +++ b/tests/Test-O-nc.px @@ -36,7 +36,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-O-nc", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-O-nonexisting.px b/tests/Test-O-nonexisting.px index de3b0b1..3720448 100755 --- a/tests/Test-O-nonexisting.px +++ b/tests/Test-O-nonexisting.px @@ -36,7 +36,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-O-nonexisting", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-O.px b/tests/Test-O.px index c535108..d3e19e7 100755 --- a/tests/Test-O.px +++ b/tests/Test-O.px @@ -36,7 +36,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-O", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-Restrict-Lowercase.px b/tests/Test-Restrict-Lowercase.px index 1e0e3e0..9bd78e7 100755 --- a/tests/Test-Restrict-Lowercase.px +++ b/tests/Test-Restrict-Lowercase.px @@ -45,7 +45,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-Restrict-Lowercase", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-Restrict-Uppercase.px b/tests/Test-Restrict-Uppercase.px index d73abd3..b023446 100755 --- a/tests/Test-Restrict-Uppercase.px +++ b/tests/Test-Restrict-Uppercase.px @@ -45,7 +45,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-Restrict-Uppercase", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-auth-basic.px b/tests/Test-auth-basic.px index 90af7a3..e2ac172 100755 --- a/tests/Test-auth-basic.px +++ b/tests/Test-auth-basic.px @@ -38,7 +38,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-auth-basic", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-auth-no-challenge-url.px b/tests/Test-auth-no-challenge-url.px index 781e5f3..befad05 100755 --- a/tests/Test-auth-no-challenge-url.px +++ b/tests/Test-auth-no-challenge-url.px @@ -39,7 +39,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-auth-no-challenge-url", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-auth-no-challenge.px b/tests/Test-auth-no-challenge.px index 43788b2..1a0b95d 100755 --- a/tests/Test-auth-no-challenge.px +++ b/tests/Test-auth-no-challenge.px @@ -40,7 +40,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-auth-no-challenge", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-auth-retcode.px b/tests/Test-auth-retcode.px index 4d8e6d6..46bf309 100755 --- a/tests/Test-auth-retcode.px +++ b/tests/Test-auth-retcode.px @@ -28,7 +28,7 @@ my %expected_downloaded_files = (); ############################################################################### -my $the_test = HTTPTest->new (name => "Test-auth-retcode", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-auth-with-content-disposition.px b/tests/Test-auth-with-content-disposition.px index d7152d1..0ddaa33 100755 --- a/tests/Test-auth-with-content-disposition.px +++ b/tests/Test-auth-with-content-disposition.px @@ -39,7 +39,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-auth-with-content-disposition", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-c-full.px b/tests/Test-c-full.px index 22831ef..672351e 100755 --- a/tests/Test-c-full.px +++ b/tests/Test-c-full.px @@ -46,7 +46,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-c-full", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-c-partial.px b/tests/Test-c-partial.px index 04e183d..cdff65e 100755 --- a/tests/Test-c-partial.px +++ b/tests/Test-c-partial.px @@ -56,7 +56,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-c-partial", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-c-shorter.px b/tests/Test-c-shorter.px index bbca4d1..315ca7d 100755 --- a/tests/Test-c-shorter.px +++ b/tests/Test-c-shorter.px @@ -53,7 +53,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-c-shorter", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-c.px b/tests/Test-c.px index 640ca48..4100df9 100755 --- a/tests/Test-c.px +++ b/tests/Test-c.px @@ -43,7 +43,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-c", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-cookies-401.px b/tests/Test-cookies-401.px index 11c76a9..b70d0ac 100755 --- a/tests/Test-cookies-401.px +++ b/tests/Test-cookies-401.px @@ -42,7 +42,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-cookies-401", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-cookies.px b/tests/Test-cookies.px index 0822e34..68168e4 100755 --- a/tests/Test-cookies.px +++ b/tests/Test-cookies.px @@ -103,7 +103,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-cookies", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp--start-pos.px b/tests/Test-ftp--start-pos.px index f19ee22..00a9a00 100755 --- a/tests/Test-ftp--start-pos.px +++ b/tests/Test-ftp--start-pos.px @@ -29,7 +29,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp--start-pos", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-bad-list.px b/tests/Test-ftp-bad-list.px index c57360a..78afd77 100755 --- a/tests/Test-ftp-bad-list.px +++ b/tests/Test-ftp-bad-list.px @@ -56,7 +56,7 @@ my %preexisting_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-bad-list", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-iri-disabled.px b/tests/Test-ftp-iri-disabled.px index a1406fd..4b4772f 100755 --- a/tests/Test-ftp-iri-disabled.px +++ b/tests/Test-ftp-iri-disabled.px @@ -41,7 +41,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-iri-disabled", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-iri-fallback.px b/tests/Test-ftp-iri-fallback.px index 7afb06b..36c22c7 100755 --- a/tests/Test-ftp-iri-fallback.px +++ b/tests/Test-ftp-iri-fallback.px @@ -37,7 +37,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-iri-fallback", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-iri-recursive.px b/tests/Test-ftp-iri-recursive.px index bbe0163..b487f70 100755 --- a/tests/Test-ftp-iri-recursive.px +++ b/tests/Test-ftp-iri-recursive.px @@ -37,7 +37,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-iri-recursive", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-iri.px b/tests/Test-ftp-iri.px index c188668..e196dbe 100755 --- a/tests/Test-ftp-iri.px +++ b/tests/Test-ftp-iri.px @@ -38,7 +38,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-iri", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-list-Multinet.px b/tests/Test-ftp-list-Multinet.px index 4553e5f..e21b2a4 100755 --- a/tests/Test-ftp-list-Multinet.px +++ b/tests/Test-ftp-list-Multinet.px @@ -56,7 +56,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-list-Multinet", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-list-UNIX-hidden.px b/tests/Test-ftp-list-UNIX-hidden.px index d7f1d27..d90d9f8 100755 --- a/tests/Test-ftp-list-UNIX-hidden.px +++ b/tests/Test-ftp-list-UNIX-hidden.px @@ -55,7 +55,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-list-UNIX-hidden", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-list-Unknown-a.px b/tests/Test-ftp-list-Unknown-a.px index d251a86..5360122 100755 --- a/tests/Test-ftp-list-Unknown-a.px +++ b/tests/Test-ftp-list-Unknown-a.px @@ -66,7 +66,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-list-Unknown-a", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-list-Unknown-hidden.px b/tests/Test-ftp-list-Unknown-hidden.px index 7ebf1ec..c300761 100755 --- a/tests/Test-ftp-list-Unknown-hidden.px +++ b/tests/Test-ftp-list-Unknown-hidden.px @@ -58,7 +58,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-list-Unknown-hidden", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-list-Unknown-list-a-fails.px b/tests/Test-ftp-list-Unknown-list-a-fails.px index 845aa24..e52b36a 100755 --- a/tests/Test-ftp-list-Unknown-list-a-fails.px +++ b/tests/Test-ftp-list-Unknown-list-a-fails.px @@ -51,7 +51,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-list-Unknown-list-a-fails", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-list-Unknown.px b/tests/Test-ftp-list-Unknown.px index 3dbd6d3..71e4362 100755 --- a/tests/Test-ftp-list-Unknown.px +++ b/tests/Test-ftp-list-Unknown.px @@ -54,7 +54,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-list-Unknown", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp-pasv-fail.px b/tests/Test-ftp-pasv-fail.px index bfcc88d..f050fdd 100755 --- a/tests/Test-ftp-pasv-fail.px +++ b/tests/Test-ftp-pasv-fail.px @@ -46,7 +46,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-pasv-fail", +my $the_test = FTPTest->new ( server_behavior => {fail_on_pasv => 1}, input => \%urls, cmdline => $cmdline, diff --git a/tests/Test-ftp-recursive.px b/tests/Test-ftp-recursive.px index e35cb8b..88fb85e 100755 --- a/tests/Test-ftp-recursive.px +++ b/tests/Test-ftp-recursive.px @@ -44,7 +44,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp-recursive", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-ftp.px b/tests/Test-ftp.px index e349f37..fdedfbc 100755 --- a/tests/Test-ftp.px +++ b/tests/Test-ftp.px @@ -34,7 +34,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-ftp", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-i-ftp.px b/tests/Test-i-ftp.px index f1dc470..6fd2c05 100755 --- a/tests/Test-i-ftp.px +++ b/tests/Test-i-ftp.px @@ -69,7 +69,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = FTPTest->new (name => "Test-i-ftp", +my $the_test = FTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-i-http.px b/tests/Test-i-http.px index b8042af..0101bd6 100755 --- a/tests/Test-i-http.px +++ b/tests/Test-i-http.px @@ -81,7 +81,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-i-http", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-idn-cmd-utf8.px b/tests/Test-idn-cmd-utf8.px index 8c49244..66f3f6b 100755 --- a/tests/Test-idn-cmd-utf8.px +++ b/tests/Test-idn-cmd-utf8.px @@ -41,7 +41,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-idn-cmd-utf8", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-idn-cmd.px b/tests/Test-idn-cmd.px index 202e75a..deed0c0 100755 --- a/tests/Test-idn-cmd.px +++ b/tests/Test-idn-cmd.px @@ -41,7 +41,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-idn-cmd", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-idn-headers.px b/tests/Test-idn-headers.px index a6260cc..7ec14e3 100755 --- a/tests/Test-idn-headers.px +++ b/tests/Test-idn-headers.px @@ -56,7 +56,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-idn-headers", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-idn-meta.px b/tests/Test-idn-meta.px index 6a27748..bb98844 100755 --- a/tests/Test-idn-meta.px +++ b/tests/Test-idn-meta.px @@ -57,7 +57,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-idn-meta", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-idn-robots-utf8.px b/tests/Test-idn-robots-utf8.px index 1f8d4cc..e1598d8 100755 --- a/tests/Test-idn-robots-utf8.px +++ b/tests/Test-idn-robots-utf8.px @@ -68,7 +68,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-idn-robots-utf8", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-idn-robots.px b/tests/Test-idn-robots.px index deb8256..214ac40 100755 --- a/tests/Test-idn-robots.px +++ b/tests/Test-idn-robots.px @@ -93,7 +93,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-idn-robots", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-iri-disabled.px b/tests/Test-iri-disabled.px index 705cc67..dd4b882 100755 --- a/tests/Test-iri-disabled.px +++ b/tests/Test-iri-disabled.px @@ -186,7 +186,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-iri-disabled", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-iri-forced-remote.px b/tests/Test-iri-forced-remote.px index 596f1f0..75ca27e 100755 --- a/tests/Test-iri-forced-remote.px +++ b/tests/Test-iri-forced-remote.px @@ -198,7 +198,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-iri-forced-remote", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-iri-list.px b/tests/Test-iri-list.px index 91e1ce4..d6c265c 100755 --- a/tests/Test-iri-list.px +++ b/tests/Test-iri-list.px @@ -164,7 +164,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-iri-list", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-iri-percent.px b/tests/Test-iri-percent.px index 769ea76..a111c9e 100755 --- a/tests/Test-iri-percent.px +++ b/tests/Test-iri-percent.px @@ -77,7 +77,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-iri-percent", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-iri.px b/tests/Test-iri.px index eb843a1..94bc88d 100755 --- a/tests/Test-iri.px +++ b/tests/Test-iri.px @@ -213,7 +213,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-iri", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-k.px b/tests/Test-k.px index fcacd96..e80d111 100755 --- a/tests/Test-k.px +++ b/tests/Test-k.px @@ -76,7 +76,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-k", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-meta-robots.px b/tests/Test-meta-robots.px index 77821e7..1500109 100755 --- a/tests/Test-meta-robots.px +++ b/tests/Test-meta-robots.px @@ -104,7 +104,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-meta-robots", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-nonexisting-quiet.px b/tests/Test-nonexisting-quiet.px index e9347b8..ae2698c 100755 --- a/tests/Test-nonexisting-quiet.px +++ b/tests/Test-nonexisting-quiet.px @@ -33,7 +33,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-nonexisting-quiet", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-noop.px b/tests/Test-noop.px index 7ec8e47..a773beb 100755 --- a/tests/Test-noop.px +++ b/tests/Test-noop.px @@ -46,7 +46,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-noop", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-np.px b/tests/Test-np.px index 7e2f250..b434d84 100755 --- a/tests/Test-np.px +++ b/tests/Test-np.px @@ -138,7 +138,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-np", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-proxy-auth-basic.px b/tests/Test-proxy-auth-basic.px index d638976..f4a8c74 100755 --- a/tests/Test-proxy-auth-basic.px +++ b/tests/Test-proxy-auth-basic.px @@ -38,7 +38,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-proxy-auth-basic", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-restrict-ascii.px b/tests/Test-restrict-ascii.px index c3bbe7a..ddd9e77 100755 --- a/tests/Test-restrict-ascii.px +++ b/tests/Test-restrict-ascii.px @@ -58,7 +58,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-restrict-ascii", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-stdouterr.px b/tests/Test-stdouterr.px index 745f9a3..1c6ceda 100755 --- a/tests/Test-stdouterr.px +++ b/tests/Test-stdouterr.px @@ -36,7 +36,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-stdouterr", +my $the_test = HTTPTest->new ( input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/WgetTests.pm b/tests/WgetTests.pm index 02413ec..1c65d54 100644 --- a/tests/WgetTests.pm +++ b/tests/WgetTests.pm @@ -20,7 +20,7 @@ my @unexpected_downloads = (); _errcode => 0, _existing => {}, _input => {}, - _name => "", + _name => $0, _output => {}, _server_behavior => {}, ); @@ -70,6 +70,8 @@ sub run { my $result_message = "Test successful.\n"; my $errcode; + $self->{_name} =~ s{.*/}{}; # remove path + $self->{_name} =~ s{\.[^.]+$}{}; # remove extension printf "Running test $self->{_name}\n"; # Setup -- 2.1.1
signature.asc
Description: This is a digitally signed message part.
