| 164 | f"DSOs: {self.env.dso_modules}") |
| 165 | |
| 166 | def _make_htdocs(self): |
| 167 | if not os.path.exists(self.env.server_docs_dir): |
| 168 | os.makedirs(self.env.server_docs_dir) |
| 169 | dest_dir = os.path.join(self.env.server_dir, 'htdocs') |
| 170 | # remove anything from another run/test suite |
| 171 | if os.path.isdir(dest_dir): |
| 172 | shutil.rmtree(dest_dir) |
| 173 | for d in self._source_dirs: |
| 174 | srcdocs = os.path.join(d, 'htdocs') |
| 175 | if os.path.isdir(srcdocs): |
| 176 | shutil.copytree(srcdocs, dest_dir, dirs_exist_ok=True) |
| 177 | # make all contained .py scripts executable |
| 178 | for dirpath, _dirnames, filenames in os.walk(dest_dir): |
| 179 | for fname in filenames: |
| 180 | if re.match(r'.+\.py', fname): |
| 181 | py_file = os.path.join(dirpath, fname) |
| 182 | st = os.stat(py_file) |
| 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)) |