summaryrefslogtreecommitdiffstats
path: root/web/attachments/130868-test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/130868-test.pl')
-rw-r--r--web/attachments/130868-test.pl51
1 files changed, 51 insertions, 0 deletions
diff --git a/web/attachments/130868-test.pl b/web/attachments/130868-test.pl
new file mode 100644
index 0000000..22d0576
--- /dev/null
+++ b/web/attachments/130868-test.pl
@@ -0,0 +1,51 @@
1#!/usr/bin/perl -w -I .. -I ../..
2#
3# Wrapper for running the test harnesses
4#
5# $Id$
6#
7
8use strict;
9
10use Getopt::Long;
11
12use NPTest qw(DetermineTestHarnessDirectory TestsFrom);
13
14my $tstdir;
15
16if ( ! GetOptions( "testdir:s" => \$tstdir ) )
17{
18 print "Usage: ${0} [--testdir=<directory>] [<test_harness.t> ...]\n";
19 exit 1;
20}
21
22my @tests;
23
24if ( scalar( @ARGV ) )
25{
26 @tests = @ARGV;
27}
28else
29{
30 my $directory = DetermineTestHarnessDirectory( $tstdir );
31
32 if ( !defined( $directory ) )
33 {
34 print STDERR "$0: Unable to determine the test harness directory - ABORTING\n";
35 exit 2;
36 }
37
38 @tests = TestsFrom( $directory, 1 );
39}
40
41if ( ! scalar( @tests ) )
42{
43 print STDERR "$0: Unable to determine the test harnesses to run - ABORTING\n";
44 exit 3;
45}
46
47use Test::Harness;
48
49#$Test::Harness::verbose=1;
50
51runtests( @tests );