Skip to content

Commit 313bb8c

Browse files
committed
tests/py-watch: replace subprocess.call with newer variant
As subprocess.call is replaced by subprocess.run if you need to capture output. So let's use the new variant. Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
1 parent 88c758d commit 313bb8c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/py-watch

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ def parse_args(argv):
3737

3838

3939
def dump_trace(proc):
40-
subprocess.call([
40+
out = subprocess.run([
4141
'gdb', '-p', str(proc.pid), '--batch', '-ex',
42-
'thread apply all py-bt'])
42+
'thread apply all py-bt'],
43+
capture_output=True)
44+
print(out.stdout)
45+
print(out.stderr)
4346

4447

4548
def terminate(signo, frame):

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ setenv =
5151
deps = {[base]deps}
5252
changedir = {[base]changedir}
5353
commands =
54-
python profile {envname} pytest -m {[base]markers} --durations=10 {posargs} \
54+
python profile {envname} pytest -sv -m {[base]markers} --durations=10 {posargs} \
5555
--cov=vdsm \
5656
--cov=yajsonrpc \
5757
--cov-report=html:htmlcov-lib \

0 commit comments

Comments
 (0)