add unit test harness.
[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
11 my @tests;
12
13 sub wanted {
14   push (@tests,$File::Find::name) if -f && m/.*\.t$/;
15 }
16
17 find(\&wanted, $BINDIR);
18
19 print STDERR "found ",scalar(@tests)," tests\n";
20
21 my $harness = TAP::Harness->new( { verbosity => 1,
22                                   lib => [ $BINDIR.'/..'] });
23
24 $harness->runtests(@tests);
25
26 1;