tests: Decode VM output for python3
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This commit is contained in:
parent
0da6d93dbf
commit
689a956049
1 changed files with 4 additions and 1 deletions
|
@ -93,6 +93,7 @@ def vm_read_stdout(vm, i):
|
||||||
out = vm['proc'].stdout.read()
|
out = vm['proc'].stdout.read()
|
||||||
if out == None:
|
if out == None:
|
||||||
return False
|
return False
|
||||||
|
out = out.decode()
|
||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
logger.debug("VM[%d] stdout.read[%s]" % (i, out))
|
logger.debug("VM[%d] stdout.read[%s]" % (i, out))
|
||||||
|
@ -195,6 +196,7 @@ def show_progress(scr):
|
||||||
try:
|
try:
|
||||||
err = vm[i]['proc'].stderr.read()
|
err = vm[i]['proc'].stderr.read()
|
||||||
if err != None:
|
if err != None:
|
||||||
|
err = err.decode()
|
||||||
vm[i]['err'] += err
|
vm[i]['err'] += err
|
||||||
logger.debug("VM[%d] stderr.read[%s]" % (i, err))
|
logger.debug("VM[%d] stderr.read[%s]" % (i, err))
|
||||||
except:
|
except:
|
||||||
|
@ -250,6 +252,7 @@ def show_progress(scr):
|
||||||
try:
|
try:
|
||||||
err = vm[i]['proc'].stderr.read()
|
err = vm[i]['proc'].stderr.read()
|
||||||
if err != None:
|
if err != None:
|
||||||
|
err = err.decode()
|
||||||
vm[i]['err'] += err
|
vm[i]['err'] += err
|
||||||
logger.debug("VM[%d] stderr.read[%s]" % (i, err))
|
logger.debug("VM[%d] stderr.read[%s]" % (i, err))
|
||||||
except:
|
except:
|
||||||
|
@ -404,7 +407,7 @@ def main():
|
||||||
cmd += args.testmodules
|
cmd += args.testmodules
|
||||||
lst = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
lst = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||||
for l in lst.stdout.readlines():
|
for l in lst.stdout.readlines():
|
||||||
name = l.split(' ')[0]
|
name = l.decode().split(' ')[0]
|
||||||
tests.append(name)
|
tests.append(name)
|
||||||
if len(tests) == 0:
|
if len(tests) == 0:
|
||||||
sys.exit("No test cases selected")
|
sys.exit("No test cases selected")
|
||||||
|
|
Loading…
Reference in a new issue