[Catalyst-commits] r10420 - trunk/examples/SmokeServer/script
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Tue Jun 2 16:13:52 GMT 2009
Author: caelum
Date: 2009-06-02 16:13:51 +0000 (Tue, 02 Jun 2009)
New Revision: 10420
Modified:
trunk/examples/SmokeServer/script/cpan_installdeps.pl
trunk/examples/SmokeServer/script/cpan_smoke.pl
Log:
hacky thing for dists with weird dirs and fix for old layouts
Modified: trunk/examples/SmokeServer/script/cpan_installdeps.pl
===================================================================
--- trunk/examples/SmokeServer/script/cpan_installdeps.pl 2009-06-02 13:25:20 UTC (rev 10419)
+++ trunk/examples/SmokeServer/script/cpan_installdeps.pl 2009-06-02 16:13:51 UTC (rev 10420)
@@ -56,8 +56,11 @@
CPAN::Shell->notest(install => $name);
}
- system 'make realclean >/dev/null 2>&1';
- system './Build realclean >/dev/null 2>&1';
+ if (-e 'Makefile') {
+ system 'make realclean >/dev/null 2>&1';
+ } else {
+ system './Build realclean >/dev/null 2>&1';
+ }
}
print "************ DONE ***************\n";
Modified: trunk/examples/SmokeServer/script/cpan_smoke.pl
===================================================================
--- trunk/examples/SmokeServer/script/cpan_smoke.pl 2009-06-02 13:25:20 UTC (rev 10419)
+++ trunk/examples/SmokeServer/script/cpan_smoke.pl 2009-06-02 16:13:51 UTC (rev 10420)
@@ -4,7 +4,7 @@
use warnings;
use FindBin qw($Bin);
use lib "$Bin/../lib";
-use lib 'lib'; # in dist dirs
+use lib 'blib/lib'; # in dist dirs
use Test::TAP::Model;
use Test::TAP::Model::Smoke;
use File::Find::Rule;
@@ -34,7 +34,7 @@
system q{
cd ~/repos/Catalyst-Runtime/5.80/trunk;
svn up;
- perl Makefile.PL;
+ perl Makefile.PL INSTALLMAN1DIR=none INSTALLMAN3DIR=none;
make
make install
};
@@ -48,18 +48,43 @@
for my $dist_dir (@dists) {
chdir "$dir/$dist_dir" or die $!;
- my ($dist) = $dist_dir =~ /^(.+)-\d/;
+ my ($dist, $dist_version) = $dist_dir =~ /^(.+)-?(\d.*)?/;
next if exists $SKIP{$dist};
- my ($author_dir) = File::Find::Rule->file->name("${dist_dir}.*")->in("$Bin/../cpan/authors");
- my $uploader = (splitdir $author_dir)[-2];
- my ($dist_version) = $dist_dir =~ /^${dist}-(.*)/;
+ my $tarball;
+
+ if (not $dist_version) {
+ (my $re = $dist_dir) =~ s/[^A-Za-z0-9]/./g;
+ ($tarball) = File::Find::Rule->file->name(qr/^$re/i)->in("$Bin/../cpan/authors");
+ ($dist_version) = $tarball =~ /-([^-]+)(?:\.tar\.gz|\.zip)\z/i;
+ } else {
+ ($tarball) = File::Find::Rule->file->name("${dist_dir}.*")->in("$Bin/../cpan/authors");
+ }
+
+ my $uploader = (splitdir $tarball)[-2];
+
my @test_files = File::Find::Rule->file->name('*.t')->in('t/');
print "*** Now testing $dist version $dist_version\n";
+ if (-e 'Makefile.PL') {
+ system
+ "($^X Makefile.PL INSTALLMAN1DIR=none INSTALLMAN3DIR=none;
+ make) >/dev/null 2>&1";
+ } else {
+ system qq{
+ ($^X Build.PL --install_path libdoc="" --install_path bindoc="";
+ ./Build) >/dev/null 2>&1};
+ }
+
my $model = Test::TAP::Model->new_with_tests(@test_files);
+ if (-e 'Makefile') {
+ system "make realclean >/dev/null 2>&1";
+ } else {
+ system "./Build realclean >/dev/null 2>&1";
+ }
+
print $log (($model->ok ? 'PASS' : 'FAIL') . " $dist $dist_version "
. $model->ratio . "\n");
More information about the Catalyst-commits
mailing list