~diego-fmpwizard/mysql-sandbox/repl-topo-aggr-support

« back to all changes in this revision

Viewing changes to t/04_test_sbtool.t

  • Committer: Giuseppe Maxia
  • Date: 2009-04-08 12:41:08 UTC
  • Revision ID: g.maxia@gmail.com-20090408124108-g9a03d2hhmh6pe8h
- Changed test_sandbox to use IPC::Open3 instead of qx, when
  available. This will make the 'make test' output more readable.
- added Test_Helper.pm to the test suite

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
BEGIN {
2
 
    $ENV{TEST_SANDBOX_HOME}="$ENV{PWD}/t/test_sb";
3
 
    $ENV{PERL5LIB}="$ENV{PWD}/lib";
4
 
    $ENV{PATH}="$ENV{PWD}/bin:$ENV{PATH}";
5
 
};
6
 
 
7
 
use strict;
8
 
use warnings;
9
 
my $test_version = $ENV{TEST_VERSION} || '5.0.77';
10
 
 
11
 
##
12
 
# accepts either a bare version 
13
 
#   (e.g. 5.0.79)
14
 
# or a tarball 
15
 
#   (e.g. $HOME/downloads/mysql-5.0.79-osx10.5-x86.tar.gz)
16
 
# or the path to a directory containing binaries
17
 
#   (e.g. $HOME/opt/mysql/5.0.79)
18
 
 
19
 
if (   ( -d $test_version) 
20
 
    or (( -f $test_version ) && ($test_version =~ /\.tar\.gz$/) )
21
 
    or ( -d "$ENV{HOME}/opt/mysql/$test_version")) {
22
 
    warn "Testing <$test_version>. Please wait. This will take a few minutes\n";
23
 
    print "1..34\n";
24
 
}
25
 
else {
26
 
    print "1..1\n";
27
 
    print "ok 1 # skip - no binaries found for $test_version"
28
 
           . " - See the README under 'TESTING' for more options.\n";
29
 
    exit;
30
 
}
31
 
 
32
 
$ENV{TAP_MODE} =1;
33
 
system("test_sandbox --versions=$test_version --tests=sbtool");
34
 
 
 
1
use lib './t';
 
2
use Test_Helper;
 
3
test_sandbox( 'test_sandbox --tests=sbtool', 34);