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