VM: Use -serial none in no-graphics kvm mode...

...so that the console doesn't get messed up due to the serial port being
redirected from stdin.

BUG=8729
TEST=./bin/cros_run_parallel_vm_tests suite_Smoke suite_Smoke; checked console

Change-Id: I5a0cedba2b0ac7f453b4574666c645e84b30b379

Review URL: http://codereview.chromium.org/4501001
This commit is contained in:
Darin Petkov 2010-11-04 14:06:57 -07:00
parent de285e0238
commit 4b029a27f8
2 changed files with 2 additions and 7 deletions

View File

@ -64,10 +64,6 @@ class ParallelTestRunner(object):
"""
ssh_port = self._base_ssh_port
spawned_tests = []
# Test runs shouldn't need anything from stdin. However, it seems that
# running with stdin leaves the terminal in a bad state so redirect from
# /dev/null.
dev_null = open('/dev/null')
for test in self._tests:
args = [ os.path.join(os.path.dirname(__file__), 'cros_run_vm_test'),
'--snapshot', # The image is shared so don't modify it.
@ -84,8 +80,7 @@ class ParallelTestRunner(object):
if self._order_output:
output = tempfile.NamedTemporaryFile(prefix='parallel_vm_test_')
Info('Piping output to %s.' % output.name)
proc = subprocess.Popen(args, stdin=dev_null, stdout=output,
stderr=output)
proc = subprocess.Popen(args, stdout=output, stderr=output)
test_info = { 'test': test,
'proc': proc,
'output': output }

View File

@ -40,7 +40,7 @@ function start_kvm() {
local nographics=""
local usesnapshot=""
if [ ${FLAGS_no_graphics} -eq ${FLAGS_TRUE} ]; then
nographics="-nographic"
nographics="-nographic -serial none"
fi
if [ ${FLAGS_snapshot} -eq ${FLAGS_TRUE} ]; then