1#*************************************************************************** 2# _ _ ____ _ 3# Project ___| | | | _ \| | 4# / __| | | | |_) | | 5# | (__| |_| | _ <| |___ 6# \___|\___/|_| \_\_____| 7# 8# Copyright (C) Daniel Stenberg, <[email protected]>, et al. 9# 10# This software is licensed as described in the file COPYING, which 11# you should have received as part of this distribution. The terms 12# are also available at https://curl.se/docs/copyright.html. 13# 14# You may opt to use, copy, modify, merge, publish, distribute and/or sell 15# copies of the Software, and permit persons to whom the Software is 16# furnished to do so, under the terms of the COPYING file. 17# 18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19# KIND, either express or implied. 20# 21# SPDX-License-Identifier: curl 22# 23########################################################################### 24 25# This module contains global variables used in multiple modules in the test 26# harness but not really "owned" by any one. 27 28package globalconfig; 29 30use strict; 31use warnings; 32 33BEGIN { 34 use base qw(Exporter); 35 36 our @EXPORT = qw( 37 $anyway 38 $automakestyle 39 $CURL 40 $CURLVERSION 41 $CURLVERNUM 42 $DATE 43 $has_shared 44 $LIBDIR 45 $listonly 46 $LOCKDIR 47 $LOGDIR 48 $memanalyze 49 $MEMDUMP 50 $perlcmd 51 $perl 52 $PIDDIR 53 $proxy_address 54 $PROXYIN 55 $pwd 56 $randseed 57 $run_event_based 58 $SERVERCMD 59 $SERVERIN 60 $srcdir 61 $TESTDIR 62 $torture 63 $valgrind 64 $VCURL 65 $verbose 66 %feature 67 %keywords 68 @protocols 69 $bundle 70 $dev_null 71 ); 72} 73use pathhelp qw(exe_ext); 74use Cwd qw(getcwd); 75 76 77####################################################################### 78# global configuration variables 79# 80 81# config variables overridden by command-line options 82our $verbose; # 1 to show verbose test output 83our $torture; # 1 to enable torture testing 84our $proxy_address; # external HTTP proxy address 85our $listonly; # only list the tests 86our $run_event_based; # run curl with --test-event to test the event API 87our $automakestyle; # use automake-like test status output format 88our $anyway; # continue anyway, even if a test fail 89our $CURLVERSION=""; # curl's reported version number 90our $CURLVERNUM=""; # curl's reported version number (without -DEV) 91our $randseed = 0; # random number seed 92 93# paths 94our $pwd = getcwd(); # current working directory 95our $srcdir = $ENV{'srcdir'} || '.'; # root of the test source code 96our $perlcmd="$^X"; 97our $perl="$perlcmd -I. -I$srcdir"; # invoke perl like this 98our $LOGDIR="log"; # root of the log directory; this will be different for 99 # each runner in multiprocess mode 100our $LIBDIR="./libtest"; 101our $TESTDIR="$srcdir/data"; 102our $CURL="../src/curl".exe_ext('TOOL'); # what curl binary to run on the tests 103our $VCURL=$CURL; # what curl binary to use to verify the servers with 104 # VCURL is handy to set to the system one when the one you 105 # just built hangs or crashes and thus prevent verification 106# the path to the script that analyzes the memory debug output file 107our $memanalyze="$perl $srcdir/memanalyze.pl"; 108our $valgrind; # path to valgrind, or empty if disabled 109our $bundle = 0; # use bundled server, libtest, unit binaries 110our $dev_null = ($^O eq 'MSWin32' ? 'NUL' : '/dev/null'); 111 112# paths in $LOGDIR 113our $LOCKDIR = "lock"; # root of the server directory with lock files 114our $PIDDIR = "server"; # root of the server directory with PID files 115our $SERVERIN="server.input"; # what curl sent the server 116our $PROXYIN="proxy.input"; # what curl sent the proxy 117our $MEMDUMP="memdump"; # file that the memory debugging creates 118our $SERVERCMD="server.cmd"; # copy server instructions here 119 120# other config variables 121our @protocols; # array of lowercase supported protocol servers 122our %feature; # hash of enabled features 123our $has_shared; # built as a shared library 124our %keywords; # hash of keywords from the test spec 125 1261; 127