Update of /cvsroot/module-build/Module-Build/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5963/t
Modified Files:
xs.t
Log Message:
Capture shell error message when compiler is not found.
Index: xs.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- xs.t 24 Mar 2005 01:16:59 -0000 1.17
+++ xs.t 24 Mar 2005 01:44:34 -0000 1.18
@@ -6,11 +6,18 @@
use Module::Build;
use File::Spec;
+my $common_pl = File::Spec->catfile('t', 'common.pl');
+require $common_pl;
+
{ local $SIG{__WARN__} = sub {};
- if ( !Module::Build->current->feature('C_support') ) {
+
+ my $have_c_compiler;
+ stderr_of( sub {$have_c_compiler = Module::Build->current->have_c_compiler} );
+
+ if ( !Module::Build->current->feature('C_support') ) {
print("1..0 # Skipped: C_support not enabled\n");
exit(0);
- } elsif ( !Module::Build->current->have_c_compiler ) {
+ } elsif ( !$have_c_compiler ) {
print("1..0 # Skipped: C_support enabled, but no compiler found\n");
exit(0);
}
@@ -18,9 +25,6 @@
plan tests => 12;
-my $common_pl = File::Spec->catfile('t', 'common.pl');
-require $common_pl;
-
######################### End of black magic.
# Pretend we're in the t/XSTest/ subdirectory
|