xref: /openbsd-src/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/03-xsstatic.t (revision 256a93a44f36679bee503f12e49566c2183f6181)
1#!/usr/bin/perl -w
2
3use strict;
4use warnings;
5use Config;
6
7my $release;
8
9BEGIN {
10    $release = ( -d '.git' ? 1 : 0 );
11    chdir 't' or die "chdir(t): $!\n";
12    unshift @INC, 'lib/';
13}
14
15use MakeMaker::Test::Utils;
16use MakeMaker::Test::Setup::XS;
17use Test::More;
18
19plan skip_all => "ExtUtils::CBuilder not installed or couldn't find a compiler"
20  unless have_compiler();
21plan skip_all => 'Shared perl library' if $Config{useshrplib} eq 'true';
22plan skip_all => $^O if $^O =~ m!^(MSWin32|cygwin|haiku|darwin)$!;
23plan skip_all => 'Skipped when not PERL_CORE nor in git repo' unless $ENV{PERL_CORE} or $release;
24plan skip_all => 'Skipped as perl.exp is not in scope' if -s '../../../perl.exp' && $ENV{PERL_CORE};
25my @tests = list_static();
26plan skip_all => "No tests" unless @tests;
27plan tests => 6 * @tests;
28my $perl = which_perl();
29perl_lib;
30$| = 1;
31run_tests($perl, @$_) for @tests;
32