[Rt-commit] r5434 - in Test-Chimps: trunk/bin
zev at bestpractical.com
zev at bestpractical.com
Fri Jun 23 17:34:09 EDT 2006
Author: zev
Date: Fri Jun 23 17:34:07 2006
New Revision: 5434
Modified:
Test-Chimps/ (props changed)
Test-Chimps/trunk/bin/poll_and_submit.pl
Log:
r4211 at galvatron (orig r15): zev | 2006-06-21 14:59:43 -0400
r4207 at galvatron: zev | 2006-06-21 14:48:49 -0400
test intervening revisions
Modified: Test-Chimps/trunk/bin/poll_and_submit.pl
==============================================================================
--- Test-Chimps/trunk/bin/poll_and_submit.pl (original)
+++ Test-Chimps/trunk/bin/poll_and_submit.pl Fri Jun 23 17:34:07 2006
@@ -30,59 +30,63 @@
my $info_out = `svn info $config->{$project}->{svn_uri}`;
$info_out =~ m/Revision: (\d+)/;
- my $revision = $1;
+ my $latest_revision = $1;
$info_out =~ m/Last Changed Author: (\w+)/;
my $author = $1;
- next unless $revision > $config->{$project}->{revision};
+ my $old_revision = $config->{$project}->{revision}
- $config->{$project}->{revision} = $revision;
+ next unless $latest_revision > $old_revision;
- checkout_project($config->{$project});
-
- my $start_time = time;
- my $model = Test::TAP::Model::Visual->new_with_tests(glob("t/*.t t/*/t/*.t"));
- my $duration = time - $start_time;
-
- foreach my $var (@added_to_env) {
- print "unsetting environment variable $var\n";
- delete $ENV{$var};
- }
- @added_to_env = ();
-
- foreach my $libdir (@added_to_inc) {
- print "removing $libdir from \@INC\n";
- shift @INC;
- }
- @added_to_inc = ();
+ foreach my $revision (($old_revision + 1) .. $revision) {
+ $config->{$project}->{revision} = $revision;
- chdir(File::Spec->rootdir);
-
- foreach my $tmpdir (@checkout_paths) {
- remove_tmpdir($tmpdir);
- }
- @checkout_paths = ();
+ checkout_project($config->{$project}, $revision);
+
+ my $start_time = time;
+ my $model = Test::TAP::Model::Visual->new_with_tests(glob("t/*.t t/*/t/*.t"));
+ my $duration = time - $start_time;
+
+ foreach my $var (@added_to_env) {
+ print "unsetting environment variable $var\n";
+ delete $ENV{$var};
+ }
+ @added_to_env = ();
+
+ foreach my $libdir (@added_to_inc) {
+ print "removing $libdir from \@INC\n";
+ shift @INC;
+ }
+ @added_to_inc = ();
+
+ chdir(File::Spec->rootdir);
+
+ foreach my $tmpdir (@checkout_paths) {
+ remove_tmpdir($tmpdir);
+ }
+ @checkout_paths = ();
- my $report = Test::Smoke::Report->new(model => $model,
- extra_data =>
- { category => $project,
- subcategory => 'repository snapshot / ' . $config{osname},
- project => scalar fileparse($config->{$project}->{svn_uri}),
- revision => $revision,
- author => $author,
- timestamp => scalar gmtime,
- duration => $duration});
-
- my $client = Test::Smoke::Report::Client->new(reports => [$report],
- server => 'http://galvatron.mit.edu/cgi-bin/report_server.pl');
-
- my ($status, $msg) = $client->send;
-
- if ($status) {
- print "Sumbitted smoke report for $project revision $revision\n";
- DumpFile("/home/zev/bps/poll-config.yml", $config);
- } else {
- print "Error: the server responded: $msg\n";
+ my $report = Test::Smoke::Report->new(model => $model,
+ extra_data =>
+ { category => $project,
+ subcategory => 'repository snapshot / ' . $config{osname},
+ project => scalar fileparse($config->{$project}->{svn_uri}),
+ revision => $revision,
+ author => $author,
+ timestamp => scalar gmtime,
+ duration => $duration});
+
+ my $client = Test::Smoke::Report::Client->new(reports => [$report],
+ server => 'http://galvatron.mit.edu/cgi-bin/report_server.pl');
+
+ my ($status, $msg) = $client->send;
+
+ if ($status) {
+ print "Sumbitted smoke report for $project revision $revision\n";
+ DumpFile("/home/zev/bps/poll-config.yml", $config);
+ } else {
+ print "Error: the server responded: $msg\n";
+ }
}
}
sleep 60;
@@ -90,11 +94,12 @@
sub checkout_project {
my $project = shift;
+ my $revision = shift;
my $tmpdir = tempdir("smoke-svn-XXXXXXX", TMPDIR => 1);
unshift @checkout_paths, $tmpdir;
- system("svn", "co", $project->{svn_uri}, $tmpdir);
+ system("svn", "co", "-r", $revision, $project->{svn_uri}, $tmpdir);
if (defined $project->{env}) {
foreach my $var (keys %{$project->{env}}) {
More information about the Rt-commit
mailing list