Changeset 72ebe64 in mod_gnutls
- Timestamp:
- Jan 26, 2020, 12:56:53 PM (3 years ago)
- Branches:
- asyncio, main, master, proxy-ticket
- Children:
- e2200db
- Parents:
- f042405
- Location:
- test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mgstest/services.py
rf042405 r72ebe64 162 162 apache2 = os.environ.get('APACHE2', 'apache2') 163 163 164 def __init__(self, config, env=None, pidfile=None, check=None): 164 def __init__(self, config, env=None, pidfile=None, check=None, 165 valgrind_log=None): 165 166 self.config = Path(config).resolve() 167 self.forking = True 166 168 base_cmd = [self.apache2, '-f', str(self.config), '-k'] 169 start_cmd = base_cmd + ['start'] 170 stop_cmd = base_cmd + ['stop'] 171 if valgrind_log: 172 start_cmd = ['valgrind', '-s', '--leak-check=full', 173 '--track-origins=yes', '--vgdb=no', 174 f'--log-file={valgrind_log}'] \ 175 + start_cmd + ['-DFOREGROUND'] 176 self.forking = False 167 177 if not check: 168 178 check = self.pidfile_check 169 super(ApacheService, self).__init__(start= base_cmd + ['start'],170 stop= base_cmd + ['stop'],171 forking= True,179 super(ApacheService, self).__init__(start=start_cmd, 180 stop=stop_cmd, 181 forking=self.forking, 172 182 env=env, 173 183 pidfile=pidfile, -
test/runtest.py
rf042405 r72ebe64 111 111 pidaffix = f'-{testname}' 112 112 113 valgrind_log = None 114 if args.valgrind: 115 valgrind_log = os.path.join('logs', f'valgrind-{testname}.log') 116 113 117 # Define the available services 114 118 apache = ApacheService(config=os.path.join(testdir, 'apache.conf'), 115 pidfile=f'apache2{pidaffix}.pid') 119 pidfile=f'apache2{pidaffix}.pid', 120 valgrind_log=valgrind_log) 116 121 backend = ApacheService(config=os.path.join(testdir, 'backend.conf'), 117 122 pidfile=f'backend{pidaffix}.pid') … … 217 222 default=temp_logfile(), 218 223 help='write HTTP responses to this file') 224 parser.add_argument('--valgrind', action='store_true', 225 help='run primary Apache instance with Valgrind') 219 226 220 227 # enable bash completion if argcomplete is available
Note: See TracChangeset
for help on using the changeset viewer.