checktestcmd
prepro
restore_test_env
+ runner_init
runner_clearlocks
runner_stopservers
runner_test_preprocess
return "$logdir/stderr$testnum";
}
+#######################################################################
+# Initialize the runner and prepare it to run tests
+#
+sub runner_init {
+ my ($logdir)=@_;
+
+ # Set this directory as ours
+ # TODO: This will need to be uncommented once there are multiple runners
+ #$LOGDIR = $logdir;
+ mkdir("$LOGDIR/$PIDDIR", 0777);
+
+ # enable memory debugging if curl is compiled with it
+ $ENV{'CURL_MEMDEBUG'} = "$LOGDIR/$MEMDUMP";
+ $ENV{'CURL_ENTROPY'}="12345678";
+ $ENV{'CURL_FORCETIME'}=1; # for debug NTLM magic
+ $ENV{'CURL_GLOBAL_INIT'}=1; # debug curl_global_init/cleanup use
+ $ENV{'HOME'}=$pwd;
+ $ENV{'CURL_HOME'}=$ENV{'HOME'};
+ $ENV{'XDG_CONFIG_HOME'}=$ENV{'HOME'};
+ $ENV{'COLUMNS'}=79; # screen width!
+}
+
#######################################################################
# Check for a command in the PATH of the machine running curl.
#
}
}
-# enable memory debugging if curl is compiled with it
-$ENV{'CURL_MEMDEBUG'} = "$LOGDIR/$MEMDUMP";
-$ENV{'CURL_ENTROPY'}="12345678";
-$ENV{'CURL_FORCETIME'}=1; # for debug NTLM magic
-$ENV{'CURL_GLOBAL_INIT'}=1; # debug curl_global_init/cleanup use
-$ENV{'HOME'}=$pwd;
-$ENV{'CURL_HOME'}=$ENV{'HOME'};
-$ENV{'XDG_CONFIG_HOME'}=$ENV{'HOME'};
-$ENV{'COLUMNS'}=79; # screen width!
-
sub catch_zap {
my $signame = shift;
logmsg "runtests.pl received SIG$signame, exiting\n";
cleardir($LOGDIR);
mkdir($LOGDIR, 0777);
-mkdir("$LOGDIR/$PIDDIR", 0777);
#######################################################################
# initialize some variables
}
#######################################################################
-# Setup CI Test Run
-citest_starttestrun();
-
-#######################################################################
-# The main test-loop
+# Scan tests to find suitable candidates
#
my $failed;
exit(0);
}
+#######################################################################
+# Setup CI Test Run
+citest_starttestrun();
+
+#######################################################################
+# Initialize the runner to prepare to run tests
+cleardir($LOGDIR);
+mkdir($LOGDIR, 0777);
+runner_init($LOGDIR);
+
+#######################################################################
+# The main test-loop
+#
# run through each candidate test and execute it
foreach my $testnum (@runtests) {
$count++;