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; use NPTest qw(DetermineTestHarnessDirectory TestsFrom); -my $tstdir; +my @tstdir; -if ( ! GetOptions( "testdir:s" => \$tstdir ) ) +if ( ! GetOptions( "testdir:s" => \@tstdir ) ) { print "Usage: ${0} [--testdir=<directory>] [<test_harness.t> ...]\n"; exit 1; @@ -25,15 +25,18 @@ if ( scalar( @ARGV ) ) } else { - my $directory = DetermineTestHarnessDirectory( $tstdir ); + my @directory = DetermineTestHarnessDirectory( @tstdir ); - if ( !defined( $directory ) ) + if ( @directory == 0 ) { print STDERR "$0: Unable to determine the test harness directory - ABORTING\n"; exit 2; } - @tests = TestsFrom( $directory, 1 ); + for my $d ( @directory ) + { + push (@tests, TestsFrom( $d, 1 )); + } } if ( ! scalar( @tests ) ) |