Skip to content

Commit

Permalink
restore building of client apps, run websocket tests on 2.4.60
Browse files Browse the repository at this point in the history
  • Loading branch information
icing committed Jul 10, 2024
1 parent 41ec546 commit d2a709a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/modules/http2/test_800_websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def ws_run(env: H2TestEnv, path, authority=None, do_input=None, inbytes=None,


@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
@pytest.mark.skipif(condition=not H2TestEnv().httpd_is_at_least("2.5.0"),
reason=f'need at least httpd 2.5.0 for this')
@pytest.mark.skipif(condition=not H2TestEnv().httpd_is_at_least("2.4.60"),
reason=f'need at least httpd 2.4.60 for this')
@pytest.mark.skipif(condition=ws_version < ws_version_min,
reason=f'websockets is {ws_version}, need at least {ws_version_min}')
class TestWebSockets:
Expand Down
11 changes: 11 additions & 0 deletions test/pyhttpd/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def make(self):
self._make_modules_conf()
self._make_htdocs()
self._add_aptest()
self._build_clients()
self.env.clear_curl_headerfiles()

def _make_dirs(self):
Expand Down Expand Up @@ -196,6 +197,16 @@ def _add_aptest(self):
# load our test module which is not installed
fd.write(f"LoadModule aptest_module \"{local_dir}/mod_aptest/.libs/mod_aptest.so\"\n")

def _build_clients(self):
clients_dir = os.path.join(
os.path.dirname(os.path.dirname(inspect.getfile(HttpdTestSetup))),
'clients')
p = subprocess.run(['make'], capture_output=True, cwd=clients_dir)
rv = p.returncode
if rv != 0:
log.error(f"compiling test clients failed: {p.stderr}")
raise Exception(f"compiling test clients failed: {p.stderr}")


class HttpdTestEnv:

Expand Down

0 comments on commit d2a709a

Please sign in to comment.