]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Trunk test parity
authorJim Jagielski <jim@apache.org>
Fri, 17 Jul 2026 16:04:01 +0000 (16:04 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 17 Jul 2026 16:04:01 +0000 (16:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1936272 13f79535-47bb-0310-9956-ffa450edef68

test/Makefile.in
test/README.pytest
test/conftest.py
test/make_sni.sh

index d9ad04d5d95e759b455533b18ee1197186797a11..ae5bf2b8c9866ade581a46d7eae4400ac98cf0a4 100644 (file)
@@ -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
index 474030bdc883045f091b0c473b3d6e084dd495c3..620f69c8643c5f361a7f2b4f01f8665afc40be9a 100644 (file)
@@ -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
index 9aad6f242bbab5d55f88b6d9f3f94d4ca1d68576..390a33bec5d39a68c397f2280974999a0b3e99ad 100644 (file)
@@ -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()
index 1805c4be5680cb5b48b394383d2b1996d80a481d..b501c43e422f60e81d614bcc0ecc3c2179c37188 100644 (file)
@@ -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