From: Jim Jagielski Date: Fri, 17 Jul 2026 16:04:01 +0000 (+0000) Subject: Trunk test parity X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd3e6d49fdd95bbed11a44fd05cba14cd90ceb16;p=thirdparty%2Fapache%2Fhttpd.git Trunk test parity git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1936272 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/Makefile.in b/test/Makefile.in index d9ad04d5d9..ae5bf2b8c9 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -21,6 +21,7 @@ test: $(bin_PROGRAMS) clean: rm -rf gen + find . -name __pycache__ | xargs rm -rf distclean: - rm -f pyhttpd/config.ini \ No newline at end of file + rm -f pyhttpd/config.ini diff --git a/test/README.pytest b/test/README.pytest index 474030bdc8..620f69c864 100644 --- a/test/README.pytest +++ b/test/README.pytest @@ -127,9 +127,9 @@ processes (an ACME test server). Infrastructure -------------- -The test cases rely on the classes provided in 'test/pyhttpd' -for common code in managing a httpd test instance and do -provide some base setups: +The test cases rely on the classes provided in `test/pyhttpd/` (where +`test/pyhttpd/runtests.sh` runs the suite) for common code in managing +a httpd test instance and do provide some base setups: - a small set of virtual hosts with some files - access to paths and definitions (env fixture) - start/stop httpd and inspect the error log diff --git a/test/conftest.py b/test/conftest.py index 9aad6f242b..390a33bec5 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -23,9 +23,25 @@ def pytest_generate_tests(metafunc): metafunc.fixturenames.append('tmp_ct') metafunc.parametrize('repeat', range(count)) + @pytest.fixture(autouse=True, scope="function") def _function_scope(env, request): env.set_current_test_name(request.node.name) yield + env.check_error_log() env.set_current_test_name(None) + +@pytest.fixture(autouse=True, scope="module") +def _module_scope(env): + yield + env.check_error_log() + + +@pytest.fixture(autouse=True, scope="package") +def _package_scope(env): + env.httpd_error_log.clear_ignored_matches() + env.httpd_error_log.clear_ignored_lognos() + yield + assert env.apache_stop() == 0 + env.check_error_log() diff --git a/test/make_sni.sh b/test/make_sni.sh index 1805c4be56..b501c43e42 100644 --- a/test/make_sni.sh +++ b/test/make_sni.sh @@ -90,7 +90,7 @@ if [ $# -gt 0 ]; then NAMES=$* fi -if ! openssl version | grep -q OpenSSL; then +if ! openssl version | grep -Eq 'LibreSSL|OpenSSL'; then echo Aborted - your openssl is very old or misconfigured. exit 1 fi