Add author/test-externals.pl to test external distributions that depend on Mouse
gfx [Mon, 28 Sep 2009 01:21:21 +0000 (10:21 +0900)]
author/test-externals.pl [new file with mode: 0755]

diff --git a/author/test-externals.pl b/author/test-externals.pl
new file mode 100755 (executable)
index 0000000..4b8d498
--- /dev/null
@@ -0,0 +1,37 @@
+#!perl -w
+use strict;
+use FindBin qw($Bin);
+use autodie;
+
+my %dist = (
+    'HTTP-Engine' => q{git://github.com/http-engine/HTTP-Engine.git},
+    'Ark'         => q{git://github.com/typester/ark-perl.git},
+);
+
+my $distdir = 'externals';
+
+chdir $Bin;
+mkdir $distdir if not -e $distdir;
+
+$ENV{ANY_MOOSE} = 'Mouse';
+
+while(my($name, $repo) = each %dist){
+    chdir "$Bin/$distdir";
+
+    print "Go $name ($repo)\n";
+
+    if(!(-e "$name")){
+        system "git clone $repo $name";
+        chdir $name;
+    }
+    else{
+        chdir $name;
+        system "git pull";
+    }
+
+    print "$^X Makefile.PL\n";
+    system("$^X Makefile.PL") != 0 or next;
+
+    print "make test\n";
+    system "make test";
+}