root/test/t/000_prereq.t

Revision f8c9e04954c5bb407bc793ab6c42158e03fd3ce2, 474 bytes (checked in by Theo Schlossnagle <jesus@omniti.com>, 2 years ago)

be more clear about test perl prereqs

  • Property mode set to 100644
Line 
1 use Test::More tests => 10;
2 my @progs = qw/pg_ctl initdb psql rm/;
3
4 use strict;
5
6 use_ok('testconfig');
7 use_ok('apiclient');
8 use_ok('stomp');
9 use_ok('XML::LibXML');
10 use_ok('JSON');
11
12 foreach my $prog (@progs) {
13   my $found = 0;
14   foreach my $dir (split /:/, $ENV{PATH}) {
15     $found = $dir if -x "$dir/$prog";
16   }
17   BAIL_OUT("$prog is required, but not in your path") unless($found);
18   ok($found, "found $prog ($found)");
19 }
20 mkdir "logs";
21 ok(-d "logs", "logs dir exists");
22
23 1;
Note: See TracBrowser for help on using the browser.