From 51588936d4a8cde3c9bb05800240c0a0f5dedf8d Mon Sep 17 00:00:00 2001 From: Stefan Stanacar Date: Thu, 22 Aug 2013 14:47:21 +0300 Subject: lib/oeqa: make it possible to restart the target Tweak QemuRunner so we can actually restart the qemu target in a test (if we want more memory for example). Also add a restart method to the base test class so that tests can use it. (From OE-Core rev: 9de7fe11967576f4a8b24e653c6b9a02e5f6d85b) Signed-off-by: Stefan Stanacar Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/lib/oeqa/oetest.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meta/lib/oeqa/oetest.py') diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 7f6baa4038..4a406e75ca 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -81,6 +81,13 @@ class oeRuntimeTest(unittest.TestCase): else: return False + @classmethod + def restartTarget(self,params=None): + + if oeRuntimeTest.tc.qemu.restart(params): + oeRuntimeTest.tc.target.host = oeRuntimeTest.tc.qemu.ip + else: + raise Exception("Restarting target failed") def getmodule(pos=2): -- cgit v1.2.3-54-g00ecf