diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2014-01-31 08:54:44 -0500 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2014-01-31 08:54:44 -0500 |
commit | 1dd0e4c96376f2c28590dad683161ee8c57c0508 (patch) | |
tree | 4a61176ad008db3d6c835393d6a1332453d297e1 /test.pl.in | |
parent | 35811848da1095525e6937159f6611fc8a87261b (diff) | |
download | monitoring-plugins-1dd0e4c96376f2c28590dad683161ee8c57c0508.tar.gz |
Enable tests in tests/ subdirs
Diffstat (limited to 'test.pl.in')
-rwxr-xr-x | test.pl.in | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -9,9 +9,9 @@ use Getopt::Long; | |||
9 | 9 | ||
10 | use NPTest qw(DetermineTestHarnessDirectory TestsFrom); | 10 | use NPTest qw(DetermineTestHarnessDirectory TestsFrom); |
11 | 11 | ||
12 | my $tstdir; | 12 | my @tstdir; |
13 | 13 | ||
14 | if ( ! GetOptions( "testdir:s" => \$tstdir ) ) | 14 | if ( ! GetOptions( "testdir:s" => \@tstdir ) ) |
15 | { | 15 | { |
16 | print "Usage: ${0} [--testdir=<directory>] [<test_harness.t> ...]\n"; | 16 | print "Usage: ${0} [--testdir=<directory>] [<test_harness.t> ...]\n"; |
17 | exit 1; | 17 | exit 1; |
@@ -25,15 +25,18 @@ if ( scalar( @ARGV ) ) | |||
25 | } | 25 | } |
26 | else | 26 | else |
27 | { | 27 | { |
28 | my $directory = DetermineTestHarnessDirectory( $tstdir ); | 28 | my @directory = DetermineTestHarnessDirectory( @tstdir ); |
29 | 29 | ||
30 | if ( !defined( $directory ) ) | 30 | if ( @directory == 0 ) |
31 | { | 31 | { |
32 | print STDERR "$0: Unable to determine the test harness directory - ABORTING\n"; | 32 | print STDERR "$0: Unable to determine the test harness directory - ABORTING\n"; |
33 | exit 2; | 33 | exit 2; |
34 | } | 34 | } |
35 | 35 | ||
36 | @tests = TestsFrom( $directory, 1 ); | 36 | for my $d ( @directory ) |
37 | { | ||
38 | push (@tests, TestsFrom( $d, 1 )); | ||
39 | } | ||
37 | } | 40 | } |
38 | 41 | ||
39 | if ( ! scalar( @tests ) ) | 42 | if ( ! scalar( @tests ) ) |