diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2023-04-27 14:08:41 -0700 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2023-05-05 00:45:43 -0700 |
commit | d4d22adf4013c8c576db301a0f2bc84d823b9fa6 (patch) | |
tree | 3b6f62edec9594c773605c16b9d7a049f72648f1 /tests/runner.pm | |
parent | 82fa5ca8368e378a72d19767dc5795eaa790924a (diff) | |
download | curl-d4d22adf4013c8c576db301a0f2bc84d823b9fa6.tar.gz |
runtests: add a runner initialization function
This sets up the runner environment to start running tests.
Ref: #10818
Diffstat (limited to 'tests/runner.pm')
-rw-r--r-- | tests/runner.pm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/runner.pm b/tests/runner.pm index feaa4e529..737f24d60 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -36,6 +36,7 @@ BEGIN { checktestcmd prepro restore_test_env + runner_init runner_clearlocks runner_stopservers runner_test_preprocess @@ -118,6 +119,28 @@ sub stderrfilename { } ####################################################################### +# 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. # sub checktestcmd { |