# New Ticket Created by Cosimo Streppone # Please include the string: [perl #47127] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=47127 >
Hi, I'm trying to get my feet wet with parrot. Just found out this test failure. After some research, I think this is caused by the different configurations of my system's underlying /usr/bin/perl, where $Config{libs} includes '-lgdbm', and parrot Configure.pl result, which correctly finds that `has_gdbm=0', so no '-lgdbm' should be used. The problem in `t/configure/111-auto_gcc-01.t' seems to be that it loads and tests `init::defaults', which in turn does: $conf->data->set(libs => $Config{libs}); where $Config{libs} is read from /usr/bin/perl's Config.pm, which has `-lgdbm'. In the attached patch I tried to find a workaround for this problem, but I have no idea of the correct way to proceed. Also noticed the recent change on t/configure/117_inter-shlibs-01.t that seems to relate to this problem. I would appreciate a feedback on this, since I'm trying to find a way through parrot test suite and source code. Thanks! -- Cosimo
Index: t/configure/111-auto_gcc-01.t =================================================================== --- t/configure/111-auto_gcc-01.t (revisione 22664) +++ t/configure/111-auto_gcc-01.t (copia locale) @@ -21,24 +21,20 @@ my $conf = Parrot::Configure->new(); +# Save the correctly configure'd libs string +$conf->data->slurp(); +my $libs = $conf->data->get('libs'); + test_step_thru_runstep($conf, q{init::defaults}, $args); -my ($task, $step_name, @step_params, $step, $ret); -my $pkg = q{auto::gcc}; +# Restore correct `libs', or otherwise auto::gcc tests may fail +# if system underlying perl %Config (invoked by init::defaults) +# happens to have a differently configured `libs' from the current +# valid one (without gdbm). This is the case on my Ubuntu 7.04. +$conf->data->set(libs => $libs); -$conf->add_steps($pkg); -$conf->options->set(%{$args}); -$task = $conf->steps->[1]; -$step_name = $task->step; [EMAIL PROTECTED] = @{ $task->params }; +test_step_thru_runstep($conf, q{auto::gcc}, $args); -$step = $step_name->new(); -ok(defined $step, "$step_name constructor returned defined value"); -isa_ok($step, $step_name); -ok($step->description(), "$step_name has description"); - -ok($step->runstep($conf), "runstep returned true value"); - pass("Keep Devel::Cover happy"); pass("Completed all tests in $0"); Index: config/auto/gdbm.pm =================================================================== --- config/auto/gdbm.pm (revisione 22664) +++ config/auto/gdbm.pm (copia locale) @@ -27,7 +27,7 @@ my $self = shift; my %data; $data{description} = q{Determining if your platform supports gdbm}; - $data{args} = [ qw( verbose without-gmp ) ]; + $data{args} = [ qw( verbose without-gdbm ) ]; $data{result} = q{}; return \%data; } @@ -38,7 +38,7 @@ my ( $verbose, $without ) = $conf->options->get( qw| verbose - without-gmp + without-gdbm | );