Changeset 3be92d3 in mod_gnutls for test/mgstest/tests.py


Ignore:
Timestamp:
Dec 18, 2019, 5:42:58 PM (11 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
master, proxy-ticket
Children:
d5c572b
Parents:
779406c
Message:

Optionally log gnutls-cli stderr output to another stream/file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/mgstest/tests.py

    r779406c r3be92d3  
    7777                f'description={self.description!r})')
    7878
    79     def run(self, timeout=5.0):
     79    def run(self, timeout=5.0, conn_log=None):
    8080        # note: "--logfile" option requires GnuTLS version >= 3.6.7
    8181        command = ['gnutls-cli', '--logfile=/dev/stderr']
     
    8787            conn = HTTPSubprocessConnection(command, self.host, self.port,
    8888                                            output_filter=filter_cert_log,
     89                                            stderr_log=conn_log,
    8990                                            timeout=timeout)
    9091        elif self.transport == Transports.PLAIN:
     
    370371
    371372
    372 def run_test_conf(test_config, timeout=5.0):
     373def run_test_conf(test_config, timeout=5.0, conn_log=None):
    373374    conns = None
    374375
     
    390391            print(f'Running test connection {i}.')
    391392        sys.stdout.flush()
    392         test_conn.run(timeout=timeout)
     393        test_conn.run(timeout=timeout, conn_log=conn_log)
Note: See TracChangeset for help on using the changeset viewer.