tools: tweak depsolve() helper to show stderr from depsolve
So that we see any error output during the tests in "realtime". With subprocess check=True and capture_output=True on exit_code != 0 no stderr as part of the exception by default so this change helps seeing issues from depsolve-dnf more easily.
This commit is contained in:
parent
ffeb0169ff
commit
f892351b00
1 changed files with 2 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import os
|
|||
import pathlib
|
||||
import socket
|
||||
import subprocess as sp
|
||||
import sys
|
||||
from tempfile import TemporaryDirectory
|
||||
|
||||
import pytest
|
||||
|
|
@ -41,9 +42,7 @@ def depsolve(pkgs, repos, root_dir, cache_dir, command):
|
|||
]
|
||||
}
|
||||
}
|
||||
p = sp.run([command], input=json.dumps(req).encode(), check=True, capture_output=True)
|
||||
if p.stderr:
|
||||
print(p.stderr.decode())
|
||||
p = sp.run([command], input=json.dumps(req).encode(), check=True, stdout=sp.PIPE, stderr=sys.stderr)
|
||||
|
||||
return json.loads(p.stdout.decode())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue