]> xenbits.xensource.com Git - xtf.git/commit
runner: More extensive Python 3 universal_newline fixes
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 5 Jan 2024 21:48:39 +0000 (21:48 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 8 Jan 2024 14:40:12 +0000 (14:40 +0000)
commita02ff8d75019ffe1082d694b7516156ec7ddcf30
tree7faeed5bcd0285e44688468e5faebb430f797c72
parentf29c54eb143ca72efaef22857b9fe54fb1566bb6
runner: More extensive Python 3 universal_newline fixes

When pv32pae is disabled e.g. due to CET being active, under Python 3, we
still get:

  Executing 'xl create -p tests/example/test-pv32pae-example.cfg'
  b'Parsing config from tests/example/test-pv32pae-example.cfg\nlibxl: error: ...\n'
  Error: Failed to create VM

out, rather than `xl create`'s stdout/stderr rendered nicely.

All subprocess invocations we make will want universal_newlines, so wrap the
functions to have it active by default, but still allow it to be explicitly
turned off by passing universal_newlines = None.

Reinstate the use of check_output() now that we've upped the minimum python
version to 2.7.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xtf-runner