Permalink
Browse files

allow specifying prove args.

  • Loading branch information...
1 parent caf5a90 commit 86e2227d808ff371088a21f4f326d6d960e27b2a @gugod gugod committed Jan 17, 2009
Showing with 31 additions and 8 deletions.
  1. +3 −0 Changes
  2. +2 −2 Makefile.PL
  3. +26 −6 lib/Test/Continuous.pm
View
3 Changes
@@ -1,5 +1,8 @@
Revision history for Test-Continuously
+0.61:
+- Make runtests function delegate unused @ARGV to App::Prove
+
0.60:
- Report comments in TAP output. So diag or dubious test file can be seen.
- code refactoring.
View
4 Makefile.PL
@@ -9,7 +9,8 @@ abstract 'Run your tests suite continusouly when developing.';
build_requires 'Test::More' => '0.42';
requires(
- "App::Prove" => "3.09",
+ "App::Prove" => "3.14",
+ "TAP::Harness" => "3.14",
"Archive::Tar" => 0,
"File::Modified" => 0,
"File::Spec" => 0,
@@ -18,7 +19,6 @@ requires(
"IO::File" => 0,
"Log::Dispatch" => 0,
"Module::ExtractUse" => 0,
- "TAP::Harness" => "3.09",
"TAP::Parser" => 0,
);
View
32 lib/Test/Continuous.pm
@@ -1,10 +1,11 @@
-use warnings;
use strict;
+use warnings;
+
package Test::Continuous;
use 5.008;
-our $VERSION = '0.60';
+our $VERSION = '0.61';
use Exporter::Lite;
use App::Prove;
@@ -28,6 +29,7 @@ our @EXPORT = qw(&runtests);
*{App::Prove::_exit} = sub {};
}
+my @prove_args;
my @tests;
my @changes;
my @files;
@@ -80,9 +82,12 @@ sub _run_once {
$prove->process_args(
"--formatter" => "Test::Continuous::Formatter",
"--archive" => $file,
- "-Q",
"-m",
- "--norc", "--nocolor", "-b", "-l", @tests
+ "-b",
+ "-l",
+ "--norc",
+ @prove_args,
+ @tests
);
$prove->run;
@@ -132,7 +137,16 @@ sub _analyze_tap_archive {
}
sub runtests {
- @tests = @ARGV ? @ARGV : <t/*.t>;
+ if (@ARGV) {
+ # print "ARGV: " . join ",",@ARGV, "\n";
+ while (-f $ARGV[-1]) {
+ push @tests, pop @ARGV;
+ }
+ @prove_args = @ARGV;
+ } else {
+ @tests = <t/*.t>;
+ }
+
print "[MSG] Will run continuously test $_\n" for @tests;
my $d = File::Modified->new( files => [ _files ] );
while(1) {
@@ -155,13 +169,19 @@ Test::Continuous - Run your tests suite continusouly when developing.
=head1 VERSION
-This document describes Test::Continuous version 0.0.4
+This document describes Test::Continuous version 0.61
=head1 SYNOPSIS
+Very simple usage:
+
% cd MyModule/
% perl -MTest::Continuous -e runtests
+If you want to provide prove arguments:
+
+ % perl -MTest::Continuous -e runtests -- --verbose --shuffle
+
=head1 DESCRIPTION
I<Continuous Testing> is a concept and tool to re-run software tests

0 comments on commit 86e2227

Please sign in to comment.