diff options
author | unknown <mats@romeo.(none)> | 2006-08-14 13:52:05 +0200 |
---|---|---|
committer | unknown <mats@romeo.(none)> | 2006-08-14 13:52:05 +0200 |
commit | 25d6e6439ae1ac4de73825ccb2f300d2c28c89d3 (patch) | |
tree | 42c0047700751cd95b85b049f40e14f03a025a44 /unittest | |
parent | 7f6ad986522b7a6078b56899f1cdb567edb16bbc (diff) | |
download | mariadb-git-25d6e6439ae1ac4de73825ccb2f300d2c28c89d3.tar.gz |
Fixing unit test execution script to work with AIX 5.2 and OS X machines.
These are using old version of the Test::Harness modules, so I resort
to a safer way of running executable files.
unittest/README.txt:
Adding reference to Doxygen-generated documentation on the intranet.
unittest/unit.pl:
Using environment HARNESS_PERL_SWITCHES instead of a replacement
straps
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/README.txt | 7 | ||||
-rw-r--r-- | unittest/unit.pl | 26 |
2 files changed, 8 insertions, 25 deletions
diff --git a/unittest/README.txt b/unittest/README.txt index 0d8bb9025d8..5cbc6b02f05 100644 --- a/unittest/README.txt +++ b/unittest/README.txt @@ -37,3 +37,10 @@ directory and add the following to the Makefile.am in that directory Note, it's important to have "-t" at the end of the filename, otherwise the test won't be executed by 'make test' ! + +Documentation +------------- + +There is Doxygen-generated documentation available at: + + https://intranet.mysql.com/~mkindahl/mytap/html/ 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; } } |