asynciomainproxy-ticket
Last change
on this file since ca0690b was
ee6351d,
checked in by Fiona Klute <fiona.klute@…>, 3 years ago
|
Test suite: Use mod_mpm_event by default
The "event" MPM module is more reliable, Valgrind tests showed
occasional mutex errors during shutdown in "worker". The tests still
fall back on the "worker" MPM if "event" is not available (that was
the case on Debian/HURD the last time I checked).
|
-
Property mode set to
100644
|
File size:
896 bytes
|
Line | |
---|
1 | #!/usr/bin/python3 |
---|
2 | import os |
---|
3 | import re |
---|
4 | import shutil |
---|
5 | import subprocess |
---|
6 | from pathlib import Path |
---|
7 | |
---|
8 | required_modules = {'logio', 'unixd', 'log_config'} |
---|
9 | |
---|
10 | apache2 = os.environ['APACHE2'] |
---|
11 | |
---|
12 | result = subprocess.run([apache2, '-l'], check=True, |
---|
13 | stdout=subprocess.PIPE, text=True) |
---|
14 | |
---|
15 | built_in_modules = set() |
---|
16 | mod_re = re.compile(r'^\s+mod_(\w+)\.c') |
---|
17 | for line in result.stdout.splitlines(): |
---|
18 | m = mod_re.match(line) |
---|
19 | if m: |
---|
20 | built_in_modules.add(m.group(1)) |
---|
21 | |
---|
22 | for mod in (required_modules - built_in_modules): |
---|
23 | print(f'LoadModule\t{mod}_module\t${{AP_LIBEXECDIR}}/mod_{mod}.so') |
---|
24 | |
---|
25 | # select mpm module, list is ordered by preference |
---|
26 | mpm_choices = ['event', 'worker'] |
---|
27 | mod_dir = Path(os.environ['AP_LIBEXECDIR']) |
---|
28 | for mpm in mpm_choices: |
---|
29 | mod = mod_dir.joinpath(f'mod_mpm_{mpm}.so') |
---|
30 | if mod.exists(): |
---|
31 | print(f'LoadModule\tmpm_{mpm}_module\t{mod!s}') |
---|
32 | break |
---|
Note: See
TracBrowser
for help on using the repository browser.