globalconfig.pm 4.1 KB

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