Author: chromatic
Date: Sat May 26 19:50:39 2007
New Revision: 18658
Modified:
trunk/lib/Parrot/Test.pm
Log:
[t] Let TODOs in Parrot::Test's C compiling functions eat compiling and linking
failures too.
Modified: trunk/lib/Parrot/Test.pm
==============================================================================
--- trunk/lib/Parrot/Test.pm (original)
+++ trunk/lib/Parrot/Test.pm Sat May 26 19:50:39 2007
@@ -842,6 +842,10 @@
$iculibs = $PConfig{icu_shared};
}
+ # set TODO before trying to compile or link
+ local *main::TODO;
+ *main::TODO = \$options{todo} if $options{todo};
+
my ( $cmd, $exit_code );
$cmd =
"$PConfig{cc} $PConfig{ccflags} $PConfig{cc_debug} "
@@ -887,8 +891,6 @@
$exit_code = run_command( $cmd, 'STDOUT' => $out_f, 'STDERR' =>
$out_f );
my $meth = $c_test_map{$func};
- local *main::TODO;
- *main::TODO = \$options{todo} if $options{todo};
my $pass = $builder->$meth( slurp_file($out_f), $expected, $desc );
$builder->diag("'$cmd' failed with exit code $exit_code")
if $exit_code and not $pass;