Add author/test-externals.pl to test external distributions that depend on Mouse
[gitmo/Mouse.git] / author / test-externals.pl
CommitLineData
7f42bc91 1#!perl -w
2use strict;
3use FindBin qw($Bin);
4use autodie;
5
6my %dist = (
7 'HTTP-Engine' => q{git://github.com/http-engine/HTTP-Engine.git},
8 'Ark' => q{git://github.com/typester/ark-perl.git},
9);
10
11my $distdir = 'externals';
12
13chdir $Bin;
14mkdir $distdir if not -e $distdir;
15
16$ENV{ANY_MOOSE} = 'Mouse';
17
18while(my($name, $repo) = each %dist){
19 chdir "$Bin/$distdir";
20
21 print "Go $name ($repo)\n";
22
23 if(!(-e "$name")){
24 system "git clone $repo $name";
25 chdir $name;
26 }
27 else{
28 chdir $name;
29 system "git pull";
30 }
31
32 print "$^X Makefile.PL\n";
33 system("$^X Makefile.PL") != 0 or next;
34
35 print "make test\n";
36 system "make test";
37}