[tapx-dev] [commit][253] add the --archive param to runtests to use TAP::Harness:: Archive

michael at hexten.net michael at hexten.net
Fri Aug 17 17:14:59 BST 2007


Revision: 253
Author:   michael
Date:     2007-08-17 17:14:59 +0100 (Fri, 17 Aug 2007)

Log Message:
-----------
add the --archive param to runtests to use TAP::Harness::Archive

Modified Paths:
--------------
    trunk/bin/runtests

Modified: trunk/bin/runtests
===================================================================
--- trunk/bin/runtests	2007-08-17 16:14:26 UTC (rev 252)
+++ trunk/bin/runtests	2007-08-17 16:14:59 UTC (rev 253)
@@ -39,7 +39,8 @@
     'directives'  => \my $DIRECTIVES,
     'h|help|?'    => sub { pod2usage( { -verbose => 1 } ); exit },
     'H|man'       => sub { pod2usage( { -verbose => 2 } ); exit },
-    'V|version' => sub { print_version(); exit },
+    'V|version'   => sub { print_version(); exit },
+    'a|archive=s' => \my $ARCHIVE,
 
     #'x|xtension=s' => \my $EXTENSION,
     'T' => \my $TAINT_FAIL,
@@ -57,10 +58,20 @@
 #$MERGE = 1 if $FAILURES || $QUIET || $REALLY_QUIET;
 
 my $harness_class = 'TAP::Harness';
+my %args;
+
 if ($COLOR) {
     require TAP::Harness::Color;
     $harness_class = 'TAP::Harness::Color';
 }
+
+if ($ARCHIVE) {
+    eval { require TAP::Harness::Archive };
+    die "TAP::Harness::Archive is required to use the --archive feature: $@" if $@;
+    $harness_class = 'TAP::Harness::Archive';
+    $args{archive} = $ARCHIVE;
+}
+
 if ($HARNESS) {
     eval "use $HARNESS";
     die "Cannot use harness ($HARNESS): $@" if $@;
@@ -91,7 +102,6 @@
     die "-w and -W are mutually exclusive";
 }
 
-my %args;
 $args{lib}          = get_libs();
 $args{switches}     = get_switches();
 $args{merge}        = $MERGE if $MERGE;




More information about the tapx-dev mailing list