From 7de5c03439f167ee95fcf3c735e8cc0c6dff60a7 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 28 Mar 2008 16:01:56 +0000 Subject: [PATCH] improvements --- system/TestBox.py | 6 +++++- system/TestPlc.py | 2 +- system/template-qemu/kill-qemu-node | 2 +- system/template-qemu/start-qemu-node | 7 ++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/system/TestBox.py b/system/TestBox.py index 6fc0dba..35de00c 100644 --- a/system/TestBox.py +++ b/system/TestBox.py @@ -41,6 +41,10 @@ class TestBox: return self.test_ssh.mkdir(direname) def kill_all_qemus(self): - self.run_in_buildname("killall qemu") + self.run_in_buildname("template-qemu/kill-qemu-node") + return True + + def list_all_qemus(self): + self.run_in_buildname("template-qemu/kill-qemu-node -l") return True diff --git a/system/TestPlc.py b/system/TestPlc.py index 6ae3e88..1ea0aa2 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -169,7 +169,7 @@ class TestPlc: def list_all_qemus(self,options): for (box,nodes) in self.gather_hostBoxes().iteritems(): # this is the brute force version, kill all qemus on that host box - TestBox(box,options.buildname).run_in_buildname("qemu-%s/kill-qemu-node -l %s"%(node.name(),node.name())) + TestBox(box,options.buildname).list_all_qemus() return True # kill only the right qemus diff --git a/system/template-qemu/kill-qemu-node b/system/template-qemu/kill-qemu-node index ecbec21..27a2317 100755 --- a/system/template-qemu/kill-qemu-node +++ b/system/template-qemu/kill-qemu-node @@ -51,7 +51,7 @@ function kill_pids () { function show_pids () { pids=$(list_pids "$@") if [ -n "$pids" ] ; then - ps $pids + ps $pids | grep -v $COMMAND || echo Nothing to show else echo Nothing to show fi diff --git a/system/template-qemu/start-qemu-node b/system/template-qemu/start-qemu-node index e35b633..eee7a1e 100755 --- a/system/template-qemu/start-qemu-node +++ b/system/template-qemu/start-qemu-node @@ -44,8 +44,5 @@ echo "New $HDA is created..." #Command for running the Qemu Emulator ARGS="-boot d -cdrom ${NODE_ISO} -hda ${HDA} -m ${RAM} -net nic,macaddr=${MACADDR} -net $TAP -nographic -pidfile qemu.pid" echo $$ > shell.pid -echo "Running qemu $ARGS" -$QEMU $ARGS - - -exit +echo "Running $QEMU $ARGS < /dev/null" +exec $QEMU $ARGS < /dev/null -- 2.47.0