This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
NetBSD 5.1 doesn't support some of the new symbols POSIX wants
[perl5.git] / cpan / ExtUtils-MakeMaker / t / xs.t
CommitLineData
7292dc67
RGS
1#!/usr/bin/perl -w
2
3BEGIN {
b78fd716 4 unshift @INC, 't/lib/';
7292dc67
RGS
5}
6chdir 't';
7
5bdf71cc
RGS
8use strict;
9
7292dc67 10use MakeMaker::Test::Utils;
c8d65f10 11use MakeMaker::Test::Setup::XS;
c6ba1525
CBW
12use Test::More
13 have_compiler()
14 ? (tests => 5)
15 : (skip_all => "ExtUtils::CBuilder not installed or couldn't find a compiler");
b37c54af 16use File::Find;
c8d65f10 17use File::Spec;
b37c54af 18use File::Path;
7292dc67 19
c8d65f10
RGS
20my $Is_VMS = $^O eq 'VMS';
21my $perl = which_perl();
22
c8d65f10
RGS
23chdir 't';
24
25perl_lib;
26
27$| = 1;
28
29ok( setup_xs(), 'setup' );
30END {
c6ba1525
CBW
31 chdir File::Spec->updir or die;
32 teardown_xs(), 'teardown' or die;
c8d65f10
RGS
33}
34
35ok( chdir('XS-Test'), "chdir'd to XS-Test" ) ||
36 diag("chdir failed: $!");
37
38my @mpl_out = run(qq{$perl Makefile.PL});
b37c54af
FC
39
40cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
41 diag(@mpl_out);
42
43my $make = make_run();
44my $make_out = run("$make");
45is( $?, 0, ' make exited normally' ) ||
46 diag $make_out;
47
48my $test_out = run("$make test");
49is( $?, 0, ' make test exited normally' ) ||
50 diag $test_out;