2
0

globalconfig.pm 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. # This module contains global variables used in multiple modules in the test
  25. # harness but not really "owned" by any one.
  26. package globalconfig;
  27. use strict;
  28. use warnings;
  29. BEGIN {
  30. use base qw(Exporter);
  31. our @EXPORT = qw(
  32. $anyway
  33. $automakestyle
  34. $CURL
  35. $CURLVERSION
  36. $CURLVERNUM
  37. $DATE
  38. $has_shared
  39. $LIBDIR
  40. $listonly
  41. $LOCKDIR
  42. $LOGDIR
  43. $memanalyze
  44. $MEMDUMP
  45. $perl
  46. $PIDDIR
  47. $proxy_address
  48. $PROXYIN
  49. $pwd
  50. $randseed
  51. $run_event_based
  52. $SERVERCMD
  53. $SERVERIN
  54. $srcdir
  55. $TESTDIR
  56. $torture
  57. $valgrind
  58. $VCURL
  59. $verbose
  60. %feature
  61. %keywords
  62. @protocols
  63. );
  64. }
  65. use pathhelp qw(exe_ext);
  66. use Cwd qw(getcwd);
  67. #######################################################################
  68. # global configuration variables
  69. #
  70. # config variables overridden by command-line options
  71. our $verbose; # 1 to show verbose test output
  72. our $torture; # 1 to enable torture testing
  73. our $proxy_address; # external HTTP proxy address
  74. our $listonly; # only list the tests
  75. our $run_event_based; # run curl with --test-event to test the event API
  76. our $automakestyle; # use automake-like test status output format
  77. our $anyway; # continue anyway, even if a test fail
  78. our $CURLVERSION=""; # curl's reported version number
  79. our $CURLVERNUM=""; # curl's reported version number (without -DEV)
  80. our $randseed = 0; # random number seed
  81. # paths
  82. our $pwd = getcwd(); # current working directory
  83. our $srcdir = $ENV{'srcdir'} || '.'; # root of the test source code
  84. our $perl="perl -I$srcdir"; # invoke perl like this
  85. our $LOGDIR="log"; # root of the log directory; this will be different for
  86. # each runner in multiprocess mode
  87. our $LIBDIR="./libtest";
  88. our $TESTDIR="$srcdir/data";
  89. our $CURL="../src/curl".exe_ext('TOOL'); # what curl binary to run on the tests
  90. our $VCURL=$CURL; # what curl binary to use to verify the servers with
  91. # VCURL is handy to set to the system one when the one you
  92. # just built hangs or crashes and thus prevent verification
  93. # the path to the script that analyzes the memory debug output file
  94. our $memanalyze="$perl $srcdir/memanalyze.pl";
  95. our $valgrind; # path to valgrind, or empty if disabled
  96. # paths in $LOGDIR
  97. our $LOCKDIR = "lock"; # root of the server directory with lock files
  98. our $PIDDIR = "server"; # root of the server directory with PID files
  99. our $SERVERIN="server.input"; # what curl sent the server
  100. our $PROXYIN="proxy.input"; # what curl sent the proxy
  101. our $MEMDUMP="memdump"; # file that the memory debugging creates
  102. our $SERVERCMD="server.cmd"; # copy server instructions here
  103. # other config variables
  104. our @protocols; # array of lowercase supported protocol servers
  105. our %feature; # hash of enabled features
  106. our $has_shared; # built as a shared library
  107. our %keywords; # hash of keywords from the test spec
  108. 1;