You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2026/09/24 15:32:42 UTC

svn commit: r1938497 - httpd/httpd/trunk/test/modules/md

Author: jorton
Date: Thu Sep 24 15:32:42 2026
New Revision: 1938497

Log:
* test/modules/md/dns01.py, test/modules/md/dns01_v2.py (curl_bin):
  Use the curl binary the test framework is configured with.

Co-Authored-By: Claude Opus 5 (1M context) <no...@anthropic.com>
GitHub: PR #768

Modified:
   httpd/httpd/trunk/test/modules/md/dns01.py
   httpd/httpd/trunk/test/modules/md/dns01_v2.py

Modified: httpd/httpd/trunk/test/modules/md/dns01.py
==============================================================================
--- httpd/httpd/trunk/test/modules/md/dns01.py	Thu Sep 24 15:32:32 2026	(r1938496)
+++ httpd/httpd/trunk/test/modules/md/dns01.py	Thu Sep 24 15:32:42 2026	(r1938497)
@@ -1,12 +1,28 @@
 #!/usr/bin/env python3
 
+import os
 import subprocess
 import sys
 
-curl = "curl"
+from configparser import ConfigParser, ExtendedInterpolation
+
 challtestsrv = "localhost:8055"
 
 
+def curl_bin():
+    """The curl binary the test framework is configured to use."""
+    if 'CURL' in os.environ:
+        return os.environ['CURL']
+    pyhttpd_dir = os.path.join(os.path.dirname(__file__), '..', '..', 'pyhttpd')
+    config_ini = os.getenv("PYHTTPD_CONFIG", os.path.join(pyhttpd_dir, 'config.ini'))
+    config = ConfigParser(interpolation=ExtendedInterpolation())
+    config.read(config_ini)
+    return config.get('global', 'curl_bin', fallback='curl')
+
+
+curl = curl_bin()
+
+
 def run(args):
     sys.stderr.write(f"run: {' '.join(args)}\n")
     p = subprocess.Popen(args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Modified: httpd/httpd/trunk/test/modules/md/dns01_v2.py
==============================================================================
--- httpd/httpd/trunk/test/modules/md/dns01_v2.py	Thu Sep 24 15:32:32 2026	(r1938496)
+++ httpd/httpd/trunk/test/modules/md/dns01_v2.py	Thu Sep 24 15:32:42 2026	(r1938497)
@@ -1,12 +1,28 @@
 #!/usr/bin/env python3
 
+import os
 import subprocess
 import sys
 
-curl = "curl"
+from configparser import ConfigParser, ExtendedInterpolation
+
 challtestsrv = "localhost:8055"
 
 
+def curl_bin():
+    """The curl binary the test framework is configured to use."""
+    if 'CURL' in os.environ:
+        return os.environ['CURL']
+    pyhttpd_dir = os.path.join(os.path.dirname(__file__), '..', '..', 'pyhttpd')
+    config_ini = os.getenv("PYHTTPD_CONFIG", os.path.join(pyhttpd_dir, 'config.ini'))
+    config = ConfigParser(interpolation=ExtendedInterpolation())
+    config.read(config_ini)
+    return config.get('global', 'curl_bin', fallback='curl')
+
+
+curl = curl_bin()
+
+
 def run(args):
     sys.stderr.write(f"run: {' '.join(args)}\n")
     p = subprocess.Popen(args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)