4
0

test.pl.in 820 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/usr/bin/perl -w -I .. -I ../..
  2. #
  3. # Wrapper for running the test harnesses
  4. #
  5. # $Id$
  6. #
  7. use strict;
  8. use Getopt::Long;
  9. use NPTest qw(DetermineTestHarnessDirectory TestsFrom);
  10. my $tstdir;
  11. if ( ! GetOptions( "testdir:s" => \$tstdir ) )
  12. {
  13. print "Usage: ${0} [--testdir=<directory>] [<test_harness.t> ...]\n";
  14. exit 1;
  15. }
  16. my @tests;
  17. if ( scalar( @ARGV ) )
  18. {
  19. @tests = @ARGV;
  20. }
  21. else
  22. {
  23. my $directory = DetermineTestHarnessDirectory( $tstdir );
  24. if ( !defined( $directory ) )
  25. {
  26. print STDERR "$0: Unable to determine the test harness directory - ABORTING\n";
  27. exit 2;
  28. }
  29. @tests = TestsFrom( $directory, 1 );
  30. }
  31. if ( ! scalar( @tests ) )
  32. {
  33. print STDERR "$0: Unable to determine the test harnesses to run - ABORTING\n";
  34. exit 3;
  35. }
  36. use Test::Harness;
  37. #$Test::Harness::verbose=1;
  38. runtests( @tests );