diff options
Diffstat (limited to 'web/attachments/130868-test.pl')
-rw-r--r-- | web/attachments/130868-test.pl | 51 |
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 | |||
8 | use strict; | ||
9 | |||
10 | use Getopt::Long; | ||
11 | |||
12 | use NPTest qw(DetermineTestHarnessDirectory TestsFrom); | ||
13 | |||
14 | my $tstdir; | ||
15 | |||
16 | if ( ! GetOptions( "testdir:s" => \$tstdir ) ) | ||
17 | { | ||
18 | print "Usage: ${0} [--testdir=<directory>] [<test_harness.t> ...]\n"; | ||
19 | exit 1; | ||
20 | } | ||
21 | |||
22 | my @tests; | ||
23 | |||
24 | if ( scalar( @ARGV ) ) | ||
25 | { | ||
26 | @tests = @ARGV; | ||
27 | } | ||
28 | else | ||
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 | |||
41 | if ( ! scalar( @tests ) ) | ||
42 | { | ||
43 | print STDERR "$0: Unable to determine the test harnesses to run - ABORTING\n"; | ||
44 | exit 3; | ||
45 | } | ||
46 | |||
47 | use Test::Harness; | ||
48 | |||
49 | #$Test::Harness::verbose=1; | ||
50 | |||
51 | runtests( @tests ); | ||