From 9382eaa46824e05a7136cf9db4c906c79af3d454 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 6 Mar 2011 17:49:26 -0400 Subject: [PATCH] Allow list of directories on command line for unit tests --- unit-tests/run-tests.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"; -- 2.26.2