Changeset 99c61f9 in mod_gnutls
- Timestamp:
- Jan 28, 2020, 3:37:37 AM (3 years ago)
- Branches:
- asyncio, master, proxy-ticket
- Children:
- e46d203
- Parents:
- c5f8e85
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
rc5f8e85 r99c61f9 87 87 AM_PATH_PYTHON([3]) 88 88 AX_PYTHON_MODULE([yaml], [fatal]) 89 90 dnl Enable testing with Valgrind? Default is "no". 91 AC_ARG_ENABLE([valgrind-test], 92 AS_HELP_STRING([--enable-valgrind-test], [Enable running \ 93 tests with Valgrind (slow)]), 94 [use_valgrind=$enableval], [use_valgrind=no]) 95 AC_MSG_CHECKING([whether to run tests with Valgrind]) 96 AC_MSG_RESULT([$use_valgrind]) 97 AC_PATH_PROG([VALGRIND], [valgrind], [no]) 98 AS_IF([test "${use_valgrind}" != "no" -a "${VALGRIND}" = "no"], 99 [AC_MSG_ERROR([Valgrind test are enabled, but "valgrind" not \ 100 found in PATH!])]) 101 AM_CONDITIONAL([ENABLE_VALGRIND], [test "${use_valgrind}" != "no"]) 89 102 90 103 dnl Optionally disable flock -
test/Makefile.am
rc5f8e85 r99c61f9 1 1 SUBDIRS = tests 2 3 VALGRIND_SUPPRESS = suppressions.valgrind 4 EXTRA_DIST = $(VALGRIND_SUPPRESS) 5 6 if ENABLE_VALGRIND 7 valgrind = --valgrind \ 8 $(foreach supp,$(VALGRIND_SUPPRESS),--valgrind-suppressions "$(srcdir)/$(supp)") 9 else 10 valgrind = 11 endif 2 12 3 13 # Generate the test scripts 4 14 test-%.bash: test-template.bash.in | tests/%/ 5 testname="$(*)"; sed s/@NUMBER@/$${testname%%_*}/ < $< > $@ 15 testname="$(*)"; \ 16 sed -e s/_NUM_/$${testname%%_*}/ -e 's,_VALGRIND_,$(valgrind),' < $< > $@ 6 17 chmod a+x $@ 7 18 … … 264 275 test_doc = README.md sample_fail.yml sample_test.yml 265 276 266 EXTRA_DIST = $(apache_data) $(cert_templates) $(shared_identities:=/uid.in) \277 EXTRA_DIST += $(apache_data) $(cert_templates) $(shared_identities:=/uid.in) \ 267 278 authority/server/crl.template $(test_doc) 268 279 … … 318 329 endif 319 330 331 if ENABLE_VALGRIND 332 AM_TESTS_ENVIRONMENT += export VALGRIND="@VALGRIND@"; 333 endif 334 320 335 if ENABLE_NETNS 321 336 AM_TESTS_ENVIRONMENT += export UNSHARE="@UNSHARE@"; \ -
test/mgstest/services.py
rc5f8e85 r99c61f9 158 158 159 159 def __init__(self, config, env=None, pidfile=None, check=None, 160 valgrind_log=None ):160 valgrind_log=None, valgrind_suppress=[]): 161 161 self.config = Path(config).resolve() 162 162 base_cmd = [self.apache2, '-f', str(self.config), '-k'] 163 163 start_cmd = base_cmd + ['start', '-DFOREGROUND'] 164 164 if valgrind_log: 165 start_cmd = ['valgrind', '-s', '--leak-check=full', 165 valgrind = os.environ.get('VALGRIND', 'valgrind') 166 suppress = [f'--suppressions={s}' for s in valgrind_suppress] 167 start_cmd = [valgrind, '-s', '--leak-check=full', 166 168 '--track-origins=yes', '--vgdb=no', 167 169 f'--log-file={valgrind_log}'] \ 168 + s tart_cmd170 + suppress + start_cmd 169 171 if not check: 170 172 check = self.pidfile_check -
test/runtest.py
rc5f8e85 r99c61f9 118 118 apache = ApacheService(config=os.path.join(testdir, 'apache.conf'), 119 119 pidfile=f'apache2{pidaffix}.pid', 120 valgrind_log=valgrind_log) 120 valgrind_log=valgrind_log, 121 valgrind_suppress=args.valgrind_suppressions) 121 122 backend = ApacheService(config=os.path.join(testdir, 'backend.conf'), 122 123 pidfile=f'backend{pidaffix}.pid') … … 221 222 parser.add_argument('--valgrind', action='store_true', 222 223 help='run primary Apache instance with Valgrind') 224 parser.add_argument('--valgrind-suppressions', action='append', 225 default=[], 226 help='use Valgrind suppressions file') 223 227 224 228 # enable bash completion if argcomplete is available -
test/test-template.bash.in
rc5f8e85 r99c61f9 1 1 #!/bin/bash 2 . ${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number @NUMBER@2 . ${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number _NUM_ _VALGRIND_
Note: See TracChangeset
for help on using the changeset viewer.