Allow list of directories on command line for unit tests
authorDavid Bremner <bremner@debian.org>
Sun, 6 Mar 2011 21:49:26 +0000 (17:49 -0400)
committerDavid Bremner <bremner@debian.org>
Sun, 6 Mar 2011 21:49:26 +0000 (17:49 -0400)
unit-tests/run-tests.pl

index e8305ce83bc4584468cfd0cae0dffc7bdb163389..3d23289c7f2c0b14aa073f4cf039e3a8d3c61383 100644 (file)
@@ -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";