]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Explicitly flush stdin for python3
authorMasashi Honma <masashi.honma@gmail.com>
Fri, 8 Feb 2019 22:51:10 +0000 (07:51 +0900)
committerJouni Malinen <j@w1.fi>
Sat, 9 Feb 2019 23:43:50 +0000 (01:43 +0200)
Without this flush(), test does not run.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
tests/hwsim/vm/parallel-vm.py

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