import logging
import os
import sys
+import platform
from typing import Generator
import pytest
env = Env()
report = [
f'Testing curl {env.curl_version()}',
+ f' platform: {platform.platform()}',
+ f' curl: Version: {env.curl_version_string()}',
f' curl: Features: {env.curl_features_string()}',
f' curl: Protocols: {env.curl_protocols_string()}',
f' httpd: {env.httpd_version()}, http:{env.http_port} https:{env.https_port}',
if 'CURL' in os.environ:
self.curl = os.environ['CURL']
self.curl_props = {
+ 'version_string': '',
'version': '',
'os': '',
'fullname': '',
self.curl_is_debug = True
for line in p.stdout.splitlines(keepends=False):
if line.startswith('curl '):
+ self.curl_props['version_string'] = line
m = re.match(r'^curl (?P<version>\S+) (?P<os>\S+) (?P<libs>.*)$', line)
if m:
self.curl_props['fullname'] = m.group(0)
return not Env.curl_uses_lib('ngtcp2') and Env.curl_uses_lib('nghttp3')
return False
+ @staticmethod
+ def curl_version_string() -> str:
+ return Env.CONFIG.curl_props['version_string']
+
@staticmethod
def curl_features_string() -> str:
return Env.CONFIG.curl_props['features_string']