Subject: | App-Info-0.49 : Test failure in util.t and apache2.t: ------ perl, v5.8.8 built for i386-linux-thread-multi linux 2.6.17-1.2187_FC5 |
Date: | Sat, 16 Sep 2006 01:33:02 +0200 |
To: | bug-App-Info [...] rt.cpan.org |
From: | Christoph Schmalhofer <christoph.schmalhofer [...] gmx.net> |
Test failures are caused by random sort order of files.
See Patches below.
Regards Christoph Schmalhofer
# Failed test 'files_for_dir should return all files in a directory'
# in t/util.t at line 120.
# Structures begin differing at:
# $got->[2] = 'mod_perl.so'
# $expected->[2] = 'mod_dir.so'
# Failed test 'files_for_dir should use the filter I pass'
# in t/util.t at line 124.
# Structures begin differing at:
# $got->[0] = 'mod_perl.so'
# $expected->[0] = 'mod_dir.so'
# Looks like you failed 2 tests of 22.
t/apache2..........NOK 26
# Failed test 'Check so mods'
# in t/apache2.t at line 62.
# Structures begin differing at:
# $got->[0] = 'mod_perl'
# $expected->[0] = 'mod_dir'
# Looks like you failed 1 test of 31.
t/apache2..........dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 26
Failed 1/31 tests, 96.77% okay
Patches:
--- apache2.t 2006-04-08 07:35:26.000000000 +0200
+++ apache2.t.chs 2006-09-16 01:02:39.000000000 +0200
@@ -59,7 +59,7 @@
is( $apache->so_lib_dir, $conf_dir, 'Test so lib dir' );
is( $apache->inc_dir, $inc_dir, 'Test inc dir' );
is_deeply( scalar $apache->static_mods, \@mods, 'Check static mods' );
-is_deeply( scalar $apache->shared_mods, \@so_mods, 'Check so mods' );
+is_deeply( [sort $apache->shared_mods], \@so_mods, 'Check so mods' );
is( $apache->magic_number, '20020903:11', 'Test magic number' );
is( $apache->port, '80', 'Test port' );
ok( $apache->mod_so, 'Test mod_so' );
--- util.t 2006-04-08 07:35:26.000000000 +0200
+++ util.t.chs 2006-09-16 01:00:33.000000000 +0200
@@ -117,11 +117,11 @@
(-d '.svn' ? '.svn' : ()),
qw(mod_dir.so mod_include.so mod_perl.so not_mod.txt)
);
-is_deeply scalar $util->files_in_dir(catdir(qw(t testmod))), \@dirs,
+is_deeply [sort $util->files_in_dir(catdir(qw(t testmod)))], \@dirs,
'files_for_dir should return all files in a directory';
@dirs = grep { /^mod_/ } @dirs;
-is_deeply scalar $util->files_in_dir( catdir(qw(t testmod)), sub {
/^mod_/ } ),
+is_deeply [sort $util->files_in_dir( catdir(qw(t testmod)), sub {
/^mod_/ } )],
\@dirs,
'files_for_dir should use the filter I pass';
Message body is not shown because sender requested not to inline it.