Patchwork lib/oeqa/runtime: remove some unnecessary checks from setUpModule

login
register
mail settings
Submitter Stanacar, StefanX
Date Aug. 28, 2013, 9:56 a.m.
Message ID <1377683805-12957-1-git-send-email-stefanx.stanacar@intel.com>
Download mbox | patch
Permalink /patch/56811/
State Accepted
Commit 4e62e9cb7655669c8e4048e678d8858f8b9f5214
Headers show

Comments

Stanacar, StefanX - Aug. 28, 2013, 9:56 a.m.
These checks are unnecessary.
setUpModule is run when a module is loaded and we
shouldn't run commands on the target here, (plus if
ssh doesn't work we error out in setup multiple times, instead
of skipping the real test, which might depend on test_ssh).

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 meta/lib/oeqa/runtime/date.py  | 3 ---
 meta/lib/oeqa/runtime/df.py    | 2 --
 meta/lib/oeqa/runtime/dmesg.py | 2 --
 meta/lib/oeqa/runtime/vnc.py   | 2 +-
 4 files changed, 1 insertion(+), 8 deletions(-)

Patch

diff --git a/meta/lib/oeqa/runtime/date.py b/meta/lib/oeqa/runtime/date.py
index d6c04cb..3b35964 100644
--- a/meta/lib/oeqa/runtime/date.py
+++ b/meta/lib/oeqa/runtime/date.py
@@ -2,9 +2,6 @@  from oeqa.oetest import oeRuntimeTest
 from oeqa.utils.decorators import *
 import re
 
-def setUpModule():
-    skipModuleUnless(oeRuntimeTest.tc.target.run('which date')[0] == 0, "No date in image or no connection")
-
 class DateTest(oeRuntimeTest):
 
     def setUp(self):
diff --git a/meta/lib/oeqa/runtime/df.py b/meta/lib/oeqa/runtime/df.py
index c911989..b6da350 100644
--- a/meta/lib/oeqa/runtime/df.py
+++ b/meta/lib/oeqa/runtime/df.py
@@ -2,8 +2,6 @@  import unittest
 from oeqa.oetest import oeRuntimeTest
 from oeqa.utils.decorators import *
 
-def setUpModule():
-    skipModuleUnless(oeRuntimeTest.tc.target.run('which df')[0] == 0, "No df in image or no connection")
 
 class DfTest(oeRuntimeTest):
 
diff --git a/meta/lib/oeqa/runtime/dmesg.py b/meta/lib/oeqa/runtime/dmesg.py
index 48370fb..a53d1f0 100644
--- a/meta/lib/oeqa/runtime/dmesg.py
+++ b/meta/lib/oeqa/runtime/dmesg.py
@@ -2,8 +2,6 @@  import unittest
 from oeqa.oetest import oeRuntimeTest
 from oeqa.utils.decorators import *
 
-def setUpModule():
-    skipModuleUnless(oeRuntimeTest.tc.target.run('which dmesg')[0] == 0, "No dmesg in image or no connection")
 
 class DmesgTest(oeRuntimeTest):
 
diff --git a/meta/lib/oeqa/runtime/vnc.py b/meta/lib/oeqa/runtime/vnc.py
index 9476184..ce11179 100644
--- a/meta/lib/oeqa/runtime/vnc.py
+++ b/meta/lib/oeqa/runtime/vnc.py
@@ -3,7 +3,7 @@  from oeqa.utils.decorators import *
 import re
 
 def setUpModule():
-    skipModuleUnless(oeRuntimeTest.tc.target.run('which x11vnc')[0] == 0, "No x11vnc in image")
+    skipModuleUnless(oeRuntimeTest.hasPackage('x11vnc'), "No x11vnc package in image")
 
 class VNCTest(oeRuntimeTest):