Changeset 2189
- Timestamp:
- 05/01/08 22:10:37 (7 months ago)
- Files:
-
- branches/release-37/t/driver-tests.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-37/t/driver-tests.pl
r2186 r2189 18 18 19 19 BEGIN { 20 my $driver = __FILE__; # /path/to/99-driver.t => driver 21 $driver =~ s!.+[\\/]!!; 22 $driver =~ s/^\d+-//; 23 $driver =~ s/\.t$//; 24 $ENV{MT_CONFIG} = "$driver-test.cfg"; 25 } 26 27 use constant TESTS => 187; 20 # Set config to driver-test.cfg when run as /path/to/99-driver.t 21 $ENV{MT_CONFIG} = "$1-test.cfg" 22 if __FILE__ =~ m{ [\\/] \d+- ([^\\/]+) \.t \z }xms; 23 } 28 24 29 25 use Test::More; 30 26 use lib 't/lib'; 31 27 use MT::Test qw(:testdb :time); 28 29 BEGIN { 30 plan skip_all => "Configuration file $ENV{MT_CONFIG} not found" 31 if !-r $ENV{MT_CONFIG}; 32 } 33 34 plan tests => 187; 32 35 33 36 package Zot; … … 43 46 44 47 package main; 45 46 if (-r $ENV{MT_CONFIG}) {47 plan tests => TESTS();48 }49 else {50 print "Please configure for this test by creating $ENV{MT_CONFIG} with your database, username, and password\n";51 plan skip_all => "$ENV{MT_CONFIG} configuration not found";52 }53 48 54 49 my(@foo, @bar);
