1#!/usr/bin/perl -w 2 3# Test that we can build modules as miniperl. 4# This mostly means no XS modules. 5 6use strict; 7use lib 't/lib'; 8 9use Config; 10use Test::More; 11 12# In a BEGIN block so the END tests aren't registered. 13BEGIN { 14 plan skip_all => "miniperl test only necessary for the perl core" 15 if !$ENV{PERL_CORE}; 16 17 plan skip_all => "no toolchain installed when cross-compiling" 18 if $ENV{PERL_CORE} && $Config{'usecrosscompile'}; 19 20 plan "no_plan"; 21} 22 23BEGIN { 24 ok !$INC{"ExtUtils/MakeMaker.pm"}, "MakeMaker is not yet loaded"; 25} 26 27# Disable all XS from here on 28use MakeMaker::Test::NoXS; 29 30use ExtUtils::MakeMaker; 31 32use MakeMaker::Test::Utils; 33use MakeMaker::Test::Setup::BFD; 34 35 36my $perl = which_perl(); 37my $makefile = makefile_name(); 38my $make = make_run(); 39 40 41# Setup our test environment 42{ 43 chdir 't'; 44 45 perl_lib; 46 47 ok( setup_recurs(), 'setup' ); 48 END { 49 ok( chdir File::Spec->updir ); 50 ok( teardown_recurs(), 'teardown' ); 51 } 52 53 ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) || 54 diag("chdir failed: $!"); 55} 56 57 58# Run make once 59{ 60 run_ok(qq{$perl Makefile.PL}); 61 run_ok($make); 62} 63