diff options
author | Michael Widenius <monty@askmonty.org> | 2011-05-06 14:01:51 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-05-06 14:01:51 +0300 |
commit | 6b8788e425f649bcdb0f882c81b081795005fbe7 (patch) | |
tree | b86046e090988ff9d0f4ac8709f8ab65412b404f /unittest/unit.pl | |
parent | 5cf6ccd29eb9fbdb1993810424cc48ece8e2ac81 (diff) | |
download | mariadb-git-6b8788e425f649bcdb0f882c81b081795005fbe7.tar.gz |
Reverted unittest/unit.pl back to Test::Harness as some of our build machines didn't support the new recommended TAP::Harness module
unittest/mytap/tap.c:
Fixed output for some tests that didn't call plan()
Diffstat (limited to 'unittest/unit.pl')
-rw-r--r-- | unittest/unit.pl | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/unittest/unit.pl b/unittest/unit.pl index 23ec954f720..9900f47f374 100644 --- a/unittest/unit.pl +++ b/unittest/unit.pl @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -use TAP::Harness; +use Test::Harness; use File::Find; use Getopt::Long; @@ -37,11 +37,10 @@ unit - Run unit tests in directory =cut my $big= $ENV{'MYTAP_CONFIG'} eq 'big'; -my $verbose= 0; my $result = GetOptions ( "big!" => \$big, - "verbose!" => \$verbose, + "verbose!" => \$Test::Harness::verbose, ); $ENV{'MYTAP_CONFIG'} = $big ? 'big' : ''; @@ -103,14 +102,8 @@ sub run_cmd (@) { if (@files > 0) { # Removing the first './' from the file names foreach (@files) { s!^\./!! } - - my %args = ( - verbosity => $verbose, - timer => 1, - exec => [ "/bin/sh", "-c" ], - ); - my $harness= TAP::Harness->new( \%args ); - $harness->runtests(@files); + $ENV{'HARNESS_PERL_SWITCHES'} .= ' -e "exec @ARGV"'; + $Test::Harness::Timer = 1; + runtests @files; } } - |