| 29 | |
| 30 | |
| 31 | class HttpdTestSetup: |
| 32 | |
| 33 | # the modules we want to load |
| 34 | MODULES = [ |
| 35 | "log_config", |
| 36 | "logio", |
| 37 | "unixd", |
| 38 | "version", |
| 39 | "watchdog", |
| 40 | "authn_core", |
| 41 | "authz_host", |
| 42 | "authz_groupfile", |
| 43 | "authz_user", |
| 44 | "authz_core", |
| 45 | "access_compat", |
| 46 | "auth_basic", |
| 47 | "cache", |
| 48 | "cache_disk", |
| 49 | "cache_socache", |
| 50 | "socache_shmcb", |
| 51 | "dumpio", |
| 52 | "reqtimeout", |
| 53 | "filter", |
| 54 | "mime", |
| 55 | "env", |
| 56 | "headers", |
| 57 | "setenvif", |
| 58 | "slotmem_shm", |
| 59 | "status", |
| 60 | "dir", |
| 61 | "alias", |
| 62 | "rewrite", |
| 63 | "deflate", |
| 64 | "proxy", |
| 65 | "proxy_http", |
| 66 | ] |
| 67 | |
| 68 | CURL_STDOUT_SEPARATOR = "===CURL_STDOUT_SEPARATOR===" |
| 69 | |
| 70 | def __init__(self, env: 'HttpdTestEnv'): |
| 71 | self.env = env |
| 72 | self._source_dirs = [os.path.dirname(inspect.getfile(HttpdTestSetup))] |
| 73 | self._modules = HttpdTestSetup.MODULES.copy() |
| 74 | self._optional_modules = [] |
| 75 | |
| 76 | def add_source_dir(self, source_dir): |
| 77 | self._source_dirs.append(source_dir) |
| 78 | |
| 79 | def add_modules(self, modules: List[str]): |
| 80 | self._modules.extend(modules) |
| 81 | |
| 82 | def add_optional_modules(self, modules: List[str]): |
| 83 | self._optional_modules.extend(modules) |
| 84 | |
| 85 | def make(self): |
| 86 | self._make_dirs() |
| 87 | self._make_conf() |
| 88 | if self.env.mpm_module is not None \ |