globalconfig.pm 3.9 KB

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