tests: Explicitly flush stdin for python3

Without this flush(), test does not run.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This commit is contained in:
Masashi Honma 2019-02-09 07:51:10 +09:00 committed by Jouni Malinen
parent 3069be8fe3
commit 45d3e2edbd

View file

@ -214,6 +214,7 @@ def show_progress(scr):
else: else:
name = tests.pop(0) name = tests.pop(0)
vm[i]['proc'].stdin.write(name.encode() + b'\n') vm[i]['proc'].stdin.write(name.encode() + b'\n')
vm[i]['proc'].stdin.flush()
scr.addstr(name) scr.addstr(name)
logger.debug("VM[%d] start test %s" % (i, name)) logger.debug("VM[%d] start test %s" % (i, name))
@ -270,11 +271,13 @@ def show_progress(scr):
updated = True updated = True
if not rerun_tests: if not rerun_tests:
vm[i]['proc'].stdin.write(b'\n') vm[i]['proc'].stdin.write(b'\n')
vm[i]['proc'].stdin.flush()
scr.addstr("shutting down") scr.addstr("shutting down")
logger.info("VM[%d] shutting down" % i) logger.info("VM[%d] shutting down" % i)
else: else:
name = rerun_tests.pop(0) name = rerun_tests.pop(0)
vm[i]['proc'].stdin.write(name.encode() + b'\n') vm[i]['proc'].stdin.write(name.encode() + b'\n')
vm[i]['proc'].stdin.flush()
scr.addstr(name + "(*)") scr.addstr(name + "(*)")
logger.debug("VM[%d] start test %s (*)" % (i, name)) logger.debug("VM[%d] start test %s (*)" % (i, name))