From: David Bremner Date: Sun, 6 Mar 2011 21:49:26 +0000 (-0400) Subject: Allow list of directories on command line for unit tests X-Git-Url: http://git.tremily.us/?p=monkeysphere-validation-agent.git;a=commitdiff_plain;h=9382eaa46824e05a7136cf9db4c906c79af3d454 Allow list of directories on command line for unit tests --- diff --git a/unit-tests/run-tests.pl b/unit-tests/run-tests.pl index e8305ce..3d23289 100644 --- a/unit-tests/run-tests.pl +++ b/unit-tests/run-tests.pl @@ -7,6 +7,7 @@ use FindBin; my $BINDIR; BEGIN { $BINDIR = $FindBin::Bin; } +my @dirs = scalar(@ARGV) > 0 ? @ARGV : ($BINDIR); my @tests; @@ -14,7 +15,7 @@ sub wanted { push (@tests,$File::Find::name) if -f && m/.*\.t$/; } -find(\&wanted, $BINDIR); +find(\&wanted, @dirs); print STDERR "found ",scalar(@tests)," tests\n";