Changeset e2200db in mod_gnutls for test/mgstest
- Timestamp:
- Jan 26, 2020, 1:23:49 PM (13 months ago)
- Branches:
- asyncio, master, proxy-ticket
- Children:
- 264ab17
- Parents:
- 72ebe64
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mgstest/services.py
r72ebe64 re2200db 121 121 122 122 def wait_ready(self, timeout=None): 123 """Wait for the started service to be ready. The function passed to 124 the constructor as "check" is called to determine whether it is.""" 123 """Wait for the started service to be ready. 124 125 The function passed to the constructor as "check" is called to 126 determine whether it is. Waiting also ends if self.process 127 terminates. 128 129 Returns: None if the service is ready, or the return code if 130 the process has terminated. 131 132 Raises a TimeoutError if the given timeout has been exceeded. 133 134 """ 125 135 if not self.check: 126 return 136 return None 127 137 128 138 slept = 0 129 139 while not timeout or slept < timeout: 140 if self.process and self.process.poll(): 141 return self.process.returncode 130 142 if self.check(): 131 return 143 return None 132 144 else: 133 145 sleep(self._step) … … 165 177 valgrind_log=None): 166 178 self.config = Path(config).resolve() 167 self.forking = True168 179 base_cmd = [self.apache2, '-f', str(self.config), '-k'] 169 start_cmd = base_cmd + ['start'] 170 stop_cmd = base_cmd + ['stop'] 180 start_cmd = base_cmd + ['start', '-DFOREGROUND'] 171 181 if valgrind_log: 172 182 start_cmd = ['valgrind', '-s', '--leak-check=full', 173 183 '--track-origins=yes', '--vgdb=no', 174 184 f'--log-file={valgrind_log}'] \ 175 + start_cmd + ['-DFOREGROUND'] 176 self.forking = False 185 + start_cmd 177 186 if not check: 178 187 check = self.pidfile_check 179 188 super(ApacheService, self).__init__(start=start_cmd, 180 stop= stop_cmd,181 forking= self.forking,189 stop=base_cmd + ['stop'], 190 forking=False, 182 191 env=env, 183 192 pidfile=pidfile,
Note: See TracChangeset
for help on using the changeset viewer.