summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-07-12 13:38:53 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-16 10:04:16 +0100
commit7f57d3c524068531eee1945ea6f700db9c4bbf1e (patch)
tree938de51cbec8a4e1313e8a404c2cb39a7b55cdea
parentb69f91f786d58c1e91875cbab2d748bc102ab939 (diff)
downloadpoky-7f57d3c524068531eee1945ea6f700db9c4bbf1e.tar.gz
lib/oeqa/oetest.py: provide a ps command for all tests
Many tests will use 'ps' but we need to know if it's busybox or standard ps. Drop the existing check from the connman test. (From OE-Core rev: 1515d33d2c5b7275a3ac20e07c1db1d8273de796) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/oetest.py5
-rw-r--r--meta/lib/oeqa/runtime/connman.py5
2 files changed, 2 insertions, 8 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 24548e9267..5777ff8852 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -9,7 +9,8 @@ def runTests(tc):
9 9
10 # set the context object passed from the test class 10 # set the context object passed from the test class
11 setattr(oeRuntimeTest, "tc", tc) 11 setattr(oeRuntimeTest, "tc", tc)
12 12 # set ps command to use
13 setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeRuntimeTest.hasPackage("procps") else "ps")
13 # prepare test suite, loader and runner 14 # prepare test suite, loader and runner
14 suite = unittest.TestSuite() 15 suite = unittest.TestSuite()
15 testloader = unittest.TestLoader() 16 testloader = unittest.TestLoader()
@@ -30,7 +31,6 @@ class oeRuntimeTest(unittest.TestCase):
30 testFailures = [] 31 testFailures = []
31 testSkipped = [] 32 testSkipped = []
32 testErrors = [] 33 testErrors = []
33 pscmd = "ps"
34 34
35 def __init__(self, methodName='runTest'): 35 def __init__(self, methodName='runTest'):
36 self.target = oeRuntimeTest.tc.target 36 self.target = oeRuntimeTest.tc.target
@@ -74,7 +74,6 @@ class oeRuntimeTest(unittest.TestCase):
74 74
75 75
76 76
77
78def getmodule(pos=2): 77def getmodule(pos=2):
79 # stack returns a list of tuples containg frame information 78 # stack returns a list of tuples containg frame information
80 # First element of the list the is current frame, caller is 1 79 # First element of the list the is current frame, caller is 1
diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py
index 835e1355c3..5ef96f6b06 100644
--- a/meta/lib/oeqa/runtime/connman.py
+++ b/meta/lib/oeqa/runtime/connman.py
@@ -17,11 +17,6 @@ class ConnmanTest(oeRuntimeTest):
17 17
18 @skipUnlessPassed('test_connmand_help') 18 @skipUnlessPassed('test_connmand_help')
19 def test_connmand_running(self): 19 def test_connmand_running(self):
20 status = self.target.run('ls -l `which ps` | grep busybox')[0]
21 if status == 0:
22 oeRuntimeTest.pscmd = 'ps'
23 else:
24 oeRuntimeTest.pscmd = 'ps -ef'
25 (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand') 20 (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
26 self.assertEqual(status, 0, msg="no connmand process, ps output: %s" % self.target.run(oeRuntimeTest.pscmd)[1]) 21 self.assertEqual(status, 0, msg="no connmand process, ps output: %s" % self.target.run(oeRuntimeTest.pscmd)[1])
27 22