On Thursday 15 November 2007 16:36:31 chromatic wrote:

> Parrot::Config::Generated is a much more reliable source of information,
> and if the tests truly need information about the local system for
> compiling and linking purposes, they should fetch the information from
> there, not from the Perl 5 configuration which does not necessarily reflect
> the state of the local machine.

Here's a patch that fixes my local failure in 
t/configure/146-auto_snprintf-01.t and as a bonus removes a warning about not 
being able to compile a file in t/configure/107-inter_progs-01.t.  (The 
latter warning is not fatal, nor does it cause failures.)

I don't promise that this is the right solution, particularly on other 
platforms, but it works for me.

-- c

=== t/configure/107-inter_progs-01.t
==================================================================
--- t/configure/107-inter_progs-01.t	(revision 22840)
+++ t/configure/107-inter_progs-01.t	(local)
@@ -51,6 +51,7 @@
 $task        = $conf->steps->[3];
 $step_name   = $task->step;
 @step_params = @{ $task->params };
+$conf->data->slurp();
 
 $step = $step_name->new();
 ok( defined $step, "$step_name constructor returned defined value" );
=== t/configure/146-auto_snprintf-01.t
==================================================================
--- t/configure/146-auto_snprintf-01.t	(revision 22840)
+++ t/configure/146-auto_snprintf-01.t	(local)
@@ -5,7 +5,7 @@
 
 use strict;
 use warnings;
-use Test::More qw(no_plan); # tests =>  2;
+use Test::More tests => 11;
 use Carp;
 use lib qw( lib t/configure/testlib );
 use_ok('config::init::defaults');
@@ -28,13 +28,15 @@
 
 $conf->add_steps($pkg);
 $conf->options->set(%{$args});
-$task = $conf->steps->[1];
+$conf->data->slurp();
+
+$task        = $conf->steps->[1];
 $step_name   = $task->step;
 @step_params = @{ $task->params };
 
-$step = $step_name->new();
+$step = $pkg->new();
 ok(defined $step, "$step_name constructor returned defined value");
-isa_ok($step, $step_name);
+isa_ok($step, $pkg);
 ok($step->description(), "$step_name has description");
 
 ok($step->runstep($conf), "runstep() returned true value");

Reply via email to