[oe-commits] Stefan Stanacar : oeqa/targetcontrol: restart method shouldn't be abstract

git at git.openembedded.org git at git.openembedded.org
Thu May 1 15:35:17 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 1dd1edb5ea551c8a01538b130aa4d0c361eae14d
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=1dd1edb5ea551c8a01538b130aa4d0c361eae14d

Author: Stefan Stanacar <stefanx.stanacar at intel.com>
Date:   Wed Apr 30 13:31:58 2014 +0100

oeqa/targetcontrol: restart method shouldn't be abstract

And drop the un-needed and un-used restart methods.
Only qemu ever used this and actually does it safely.

Signed-off-by: Stefan Stanacar <stefanx.stanacar at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oeqa/controllers/masterimage.py | 3 ---
 meta/lib/oeqa/targetcontrol.py           | 7 ++-----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py
index 1bd0ab4..e8d321f 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -133,9 +133,6 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget):
         bb.plain("%s - reboot/powercycle target" % self.pn)
         self.power_cycle(self.connection)
 
-    def restart(self):
-        pass
-
 
 class GummibootTarget(MasterImageHardwareTarget):
 
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 873a664..02cb370 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -70,9 +70,9 @@ class BaseTarget(object):
     def stop(self):
         pass
 
-    @abstractmethod
     def restart(self, params=None):
-        pass
+        self.stop()
+        self.start(params)
 
     def run(self, cmd, timeout=None):
         return self.connection.run(cmd, timeout)
@@ -170,6 +170,3 @@ class SimpleRemoteTarget(BaseTarget):
         self.connection = None
         self.ip = None
         self.server_ip = None
-
-    def restart(self, params=None):
-        pass



More information about the Openembedded-commits mailing list