summaryrefslogtreecommitdiff
path: root/unittest
diff options
context:
space:
mode:
authormats@romeo.(none) <>2006-08-30 14:10:53 +0200
committermats@romeo.(none) <>2006-08-30 14:10:53 +0200
commitd67b341a3744f52fdce594e6d314dc6852b1e8f6 (patch)
treef0f9d966a3f390f4e2826d143b94f814b547e7e8 /unittest
parent6129be9421c2801120a736fc1e4d5771567176d9 (diff)
downloadmariadb-git-d67b341a3744f52fdce594e6d314dc6852b1e8f6.tar.gz
Changes to make unit tests work on OS X and AIX
Diffstat (limited to 'unittest')
-rw-r--r--unittest/unit.pl26
1 files changed, 1 insertions, 25 deletions
diff --git a/unittest/unit.pl b/unittest/unit.pl
index 3092a874192..28ebb44846d 100644
--- a/unittest/unit.pl
+++ b/unittest/unit.pl
@@ -1,19 +1,5 @@
#!/usr/bin/perl
-# Override _command_line in the standard Perl test harness to prevent
-# it from using "perl" to run the test scripts.
-package MySQL::Straps;
-
-use base qw(Test::Harness::Straps);
-
-use strict;
-
-sub _command_line {
- return $_[1]
-}
-
-package main;
-
use Test::Harness qw(&runtests $verbose);
use File::Find;
@@ -37,9 +23,6 @@ unit - Run unit tests in directory
my $cmd = shift;
-# $Test::Harness::Verbose = 1;
-# $Test::Harness::Debug = 1;
-
if (defined $cmd && exists $dispatch{$cmd}) {
$dispatch{$cmd}->(@ARGV);
} else {
@@ -95,14 +78,7 @@ sub run_cmd (@) {
if (@files > 0) {
# Removing the first './' from the file names
foreach (@files) { s!^\./!! }
-
- # Install the strap above instead of the default strap. Since
- # we are replacing the straps under the feet of Test::Harness,
- # we need to do some basic initializations in the new straps.
- $Test::Harness::Strap = MySQL::Straps->new;
- $Test::Harness::Strap->{callback} = \&Test::Harness::strap_callback
- if defined &Test::Harness::strap_callback;
-
+ $ENV{'HARNESS_PERL_SWITCHES'} .= q" -e 'exec @ARGV'";
runtests @files;
}
}