xref: /openbsd-src/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/03-xsstatic.t (revision f1dd7b858388b4a23f4f67a4957ec5ff656ebbe8)
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;
24my @tests = list_static();
25plan skip_all => "No tests" unless @tests;
26plan tests => 6 * @tests;
27my $perl = which_perl();
28perl_lib;
29$| = 1;
30run_tests($perl, @$_) for @tests;
31