4c3731cb85da91ed503ca5722c4aa9e70f468bdc
[monkeysphere-validation-agent.git] / unit-tests / run-tests.pl
1 #!/usr/bin/perl
2 use strict;
3
4 use TAP::Harness;
5 use File::Find;
6 use FindBin;
7 my $BINDIR;
8 BEGIN { $BINDIR = $FindBin::Bin; }
9
10 my @dirs = scalar(@ARGV) > 0 ? @ARGV : ($BINDIR);
11
12 my @tests;
13
14 sub wanted {
15   push (@tests,$File::Find::name) if -f && m/.*\.t$/;
16 }
17
18 find(\&wanted, @dirs);
19
20 @tests=sort @tests;
21
22 print STDERR "found ",scalar(@tests)," tests\n";
23
24 my $harness = TAP::Harness->new( { verbosity => 1,
25                                   lib => [ $BINDIR.'/..'] });
26
27 $harness->runtests(@tests);
28
29 1;