summaryrefslogtreecommitdiffstats
path: root/test/pyhttpd/env.py
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2023-08-16 12:45:47 +0200
committerStefan Eissing <icing@apache.org>2023-08-16 12:45:47 +0200
commit9b7dbbea0f02303233b2d79d4ebadaf2685e6b31 (patch)
treeac577bd96883edea738e3b63f56c75bc07d9df95 /test/pyhttpd/env.py
parentAdd docs for DavBasePath. (diff)
downloadapache2-9b7dbbea0f02303233b2d79d4ebadaf2685e6b31.tar.xz
apache2-9b7dbbea0f02303233b2d79d4ebadaf2685e6b31.zip
Tests: update pytest for curl 8.1.x bugs
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1911718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/pyhttpd/env.py')
-rw-r--r--test/pyhttpd/env.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/pyhttpd/env.py b/test/pyhttpd/env.py
index 0df1fd7a70..78c3a649ec 100644
--- a/test/pyhttpd/env.py
+++ b/test/pyhttpd/env.py
@@ -509,6 +509,20 @@ class HttpdTestEnv:
return self._curl_version >= self._versiontuple(minv)
return False
+ def curl_is_less_than(self, version):
+ if self._curl_version is None:
+ p = subprocess.run([self._curl, '-V'], capture_output=True, text=True)
+ if p.returncode != 0:
+ return False
+ for l in p.stdout.splitlines():
+ m = re.match(r'curl ([0-9.]+)[- ].*', l)
+ if m:
+ self._curl_version = self._versiontuple(m.group(1))
+ break
+ if self._curl_version is not None:
+ return self._curl_version < self._versiontuple(version)
+ return False
+
def has_nghttp(self):
return self._nghttp != ""