1#*************************************************************************** 2# _ _ ____ _ 3# Project ___| | | | _ \| | 4# / __| | | | |_) | | 5# | (__| |_| | _ <| |___ 6# \___|\___/|_| \_\_____| 7# 8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, 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 $perl 51 $PIDDIR 52 $proxy_address 53 $PROXYIN 54 $pwd 55 $randseed 56 $run_event_based 57 $SERVERCMD 58 $SERVERIN 59 $srcdir 60 $TESTDIR 61 $torture 62 $valgrind 63 $VCURL 64 $verbose 65 %feature 66 %keywords 67 @protocols 68 $bundle 69 ); 70} 71use pathhelp qw(exe_ext); 72use Cwd qw(getcwd); 73 74 75####################################################################### 76# global configuration variables 77# 78 79# config variables overridden by command-line options 80our $verbose; # 1 to show verbose test output 81our $torture; # 1 to enable torture testing 82our $proxy_address; # external HTTP proxy address 83our $listonly; # only list the tests 84our $run_event_based; # run curl with --test-event to test the event API 85our $automakestyle; # use automake-like test status output format 86our $anyway; # continue anyway, even if a test fail 87our $CURLVERSION=""; # curl's reported version number 88our $CURLVERNUM=""; # curl's reported version number (without -DEV) 89our $randseed = 0; # random number seed 90 91# paths 92our $pwd = getcwd(); # current working directory 93our $srcdir = $ENV{'srcdir'} || '.'; # root of the test source code 94our $perl="perl -I. -I$srcdir"; # invoke perl like this 95our $LOGDIR="log"; # root of the log directory; this will be different for 96 # each runner in multiprocess mode 97our $LIBDIR="./libtest"; 98our $TESTDIR="$srcdir/data"; 99our $CURL="../src/curl".exe_ext('TOOL'); # what curl binary to run on the tests 100our $VCURL=$CURL; # what curl binary to use to verify the servers with 101 # VCURL is handy to set to the system one when the one you 102 # just built hangs or crashes and thus prevent verification 103# the path to the script that analyzes the memory debug output file 104our $memanalyze="$perl $srcdir/memanalyze.pl"; 105our $valgrind; # path to valgrind, or empty if disabled 106our $bundle = 0; # use bundled server, libtest, unit binaries 107 108# paths in $LOGDIR 109our $LOCKDIR = "lock"; # root of the server directory with lock files 110our $PIDDIR = "server"; # root of the server directory with PID files 111our $SERVERIN="server.input"; # what curl sent the server 112our $PROXYIN="proxy.input"; # what curl sent the proxy 113our $MEMDUMP="memdump"; # file that the memory debugging creates 114our $SERVERCMD="server.cmd"; # copy server instructions here 115 116# other config variables 117our @protocols; # array of lowercase supported protocol servers 118our %feature; # hash of enabled features 119our $has_shared; # built as a shared library 120our %keywords; # hash of keywords from the test spec 121 1221; 123