Added the --runtestsopts option to testcurl.pl to override the default

options used by runtests.pl during testing (useful for disabling valgrind).
This commit is contained in:
Dan Fandrich 2005-03-17 00:57:17 +00:00
parent f5cdac38bd
commit 233237740d
2 changed files with 17 additions and 13 deletions

View File

@ -35,24 +35,24 @@ curl:
if CROSSCOMPILING if CROSSCOMPILING
TEST = @echo "NOTICE: we can't run the tests when cross-compiling!" TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
TEST_Q = $(TEST) TEST_Q =
TEST_F = $(TEST) TEST_F =
TEST_T = $(TEST) TEST_T =
else # if not cross-compiling: else # if not cross-compiling:
TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
TEST_Q = $(TEST) -s -a TEST_Q = -s -a
TEST_F = $(TEST) -a -p TEST_F = -a -p
TEST_T = $(TEST) -t TEST_T = -t
endif endif
test: all test: all
$(TEST) $(TEST)
quiet-test: all quiet-test: all
$(TEST_Q) $(TEST) $(TEST_Q)
full-test: all full-test: all
$(TEST_F) $(TEST) $(TEST_F)
torture-test: all torture-test: all
$(TEST_T) $(TEST) $(TEST_T)

View File

@ -46,6 +46,7 @@
# --mktarball=[command] Command to run after completed test # --mktarball=[command] Command to run after completed test
# --name=[name] Set name to report as # --name=[name] Set name to report as
# --nocvsup Don't update from CVS even though it is a CVS tree # --nocvsup Don't update from CVS even though it is a CVS tree
# --runtestsopts=[options] Options to pass to runtests.pl
# --setup=[file name] File name to read setup from (deprecated) # --setup=[file name] File name to read setup from (deprecated)
# --target=[your os] Specify your target environment. # --target=[your os] Specify your target environment.
# #
@ -62,8 +63,8 @@ use Cwd;
use vars qw($version $fixed $infixed $CURLDIR $CVS $pwd $build $buildlog use vars qw($version $fixed $infixed $CURLDIR $CVS $pwd $build $buildlog
$buildlogname $configurebuild $targetos $confsuffix $binext $buildlogname $configurebuild $targetos $confsuffix $binext
$libext); $libext);
use vars qw($name $email $desc $confopts $setupfile $mktarball $nocvsup use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
$crosscompile); $nocvsup $crosscompile);
# version of this script # version of this script
$version='$Revision$'; $version='$Revision$';
@ -104,6 +105,9 @@ while ($ARGV[0]) {
$crosscompile=1; $crosscompile=1;
shift @ARGV; shift @ARGV;
} }
elsif ($ARGV[0] =~ /--runtestopts=/) {
$runtestopts = (split(/=/, shift @ARGV, 2))[1];
}
else { else {
$CURLDIR=shift @ARGV; $CURLDIR=shift @ARGV;
$CVS=0; $CVS=0;
@ -517,8 +521,8 @@ elsif(!$crosscompile) {
} }
if ($configurebuild && !$crosscompile) { if ($configurebuild && !$crosscompile) {
logit "run make test-full"; logit "run make TEST_F=\"$runtestopts\" test-full";
open(F, "make test-full 2>&1 |") or die; open(F, "make TEST_F=\"$runtestopts\" test-full 2>&1 |") or die;
open(LOG, ">$buildlog") or die; open(LOG, ">$buildlog") or die;
while (<F>) { while (<F>) {
s/$pwd//g; s/$pwd//g;