[Rt-commit] r5561 - in Test-Chimps-Client/trunk: . bin lib/Test/Chimps

zev at bestpractical.com zev at bestpractical.com
Wed Jul 12 16:24:01 EDT 2006


Author: zev
Date: Wed Jul 12 16:24:00 2006
New Revision: 5561

Added:
   Test-Chimps-Client/trunk/examples/
   Test-Chimps-Client/trunk/examples/chimps-client.pl   (contents, props changed)
   Test-Chimps-Client/trunk/examples/chimps-smoker.pl   (contents, props changed)
Removed:
   Test-Chimps-Client/trunk/bin/
Modified:
   Test-Chimps-Client/trunk/   (props changed)
   Test-Chimps-Client/trunk/lib/Test/Chimps/Client.pm

Log:
 r11446 at galvatron:  zev | 2006-07-12 16:23:50 -0400
 * moved binaries to examples until they get proper command-line switch 
 handling.  Changed server information to be generic


Added: Test-Chimps-Client/trunk/examples/chimps-client.pl
==============================================================================
--- (empty file)
+++ Test-Chimps-Client/trunk/examples/chimps-client.pl	Wed Jul 12 16:24:00 2006
@@ -0,0 +1,45 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+use Test::Chimps::Client;
+use Test::TAP::Model::Visual;
+
+my $model;
+{
+  local $SIG{ALRM} = sub { die "10 minute timeout exceeded" };
+  alarm 600;
+  print "running tests for $project\n";
+  eval {
+    $model = Test::TAP::Model::Visual->new_with_tests(glob("t/*.t t/*/t/*.t"));
+  };
+  alarm 0;                      # cancel alarm
+}
+        
+if ($@) {
+  print "Tests aborted: $@\n";
+}
+
+my $duration = $model->structure->{end_time} - $model->structure->{start_time};
+
+my $client = Test::Chimps::Client->new(
+  model  => $model,
+  server => 'http://example.com/cgi-bin/chimps-server.pl',
+  {
+    project   => $project,
+    revision  => $revision,
+    committer => $committer,
+    duration  => $duration,
+    osname    => $Config{osname},
+    osvers    => $Config{osvers},
+    archname  => $Config{archname}
+  }
+);
+
+my ($status, $msg) = $client->send;
+
+if (! $status) {
+  print "Error: $msg\n";
+  exit(1);
+}

Added: Test-Chimps-Client/trunk/examples/chimps-smoker.pl
==============================================================================
--- (empty file)
+++ Test-Chimps-Client/trunk/examples/chimps-smoker.pl	Wed Jul 12 16:24:00 2006
@@ -0,0 +1,13 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+use Test::Chimps::Smoker;
+  
+my $poller = Test::Chimps::Smoker->new(
+  server      => 'http://example.com/cgi-bin/chimps-server.pl',
+  config_file => "$ENV{HOME}/poll-config.yml",
+);
+
+$poller->smoke;

Modified: Test-Chimps-Client/trunk/lib/Test/Chimps/Client.pm
==============================================================================
--- Test-Chimps-Client/trunk/lib/Test/Chimps/Client.pm	(original)
+++ Test-Chimps-Client/trunk/lib/Test/Chimps/Client.pm	Wed Jul 12 16:24:00 2006
@@ -185,8 +185,8 @@
 
 =head1 ACKNOWLEDGEMENTS
 
-The code in this distribution is based on smokeserv-client.pl from
-the PUGS distribution.
+Some code in this module is based on smokeserv-client.pl from the
+PUGS distribution.
 
 =head1 COPYRIGHT & LICENSE
 


More information about the Rt-commit mailing list