MCPcopy Create free account
hub / github.com/apache/httpd / _add_aptest

Method _add_aptest

test/pyhttpd/env.py:185–198  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

183 os.chmod(py_file, st.st_mode | stat.S_IEXEC)
184
185 def _add_aptest(self):
186 local_dir = os.path.dirname(inspect.getfile(HttpdTestSetup))
187 p = subprocess.run([self.env.apxs, '-c', 'mod_aptest.c'],
188 capture_output=True,
189 cwd=os.path.join(local_dir, 'mod_aptest'))
190 rv = p.returncode
191 if rv != 0:
192 log.error(f"compiling mod_aptest failed: {p.stderr}")
193 raise Exception(f"compiling mod_aptest failed: {p.stderr}")
194
195 modules_conf = os.path.join(self.env.server_dir, 'conf/modules.conf')
196 with open(modules_conf, 'a') as fd:
197 # load our test module which is not installed
198 fd.write(f"LoadModule aptest_module \"{local_dir}/mod_aptest/.libs/mod_aptest.so\"\n")
199
200 def _build_clients(self):
201 clients_dir = os.path.join(

Callers 1

makeMethod · 0.95

Calls 2

joinMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected