]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oetest.py: Add default pscmd to oeTest
authorMariano Lopez <mariano.lopez@linux.intel.com>
Mon, 2 May 2016 13:19:18 +0000 (13:19 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 May 2016 22:23:43 +0000 (23:23 +0100)
pscmd is used by some tests to get the process
running on the target. If the test are exported
there won't be any pscmd attibute in the oeTest.

This adds "ps" as default pscmd.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/oetest.py

index bef9ac49611464cc51de376815b7c8a1992e9fe3..6a908ee3798f098a4ee2d343b97fd0a7fa202852 100644 (file)
@@ -54,6 +54,7 @@ def filterByTagExp(testsuite, tagexp):
 @LogResults
 class oeTest(unittest.TestCase):
 
+    pscmd = "ps"
     longMessage = True
 
     @classmethod
@@ -373,7 +374,8 @@ class RuntimeTestContext(TestContext):
 
     def loadTests(self):
         super(RuntimeTestContext, self).loadTests()
-        setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps")
+        if oeTest.hasPackage("procps"):
+            oeRuntimeTest.pscmd = "ps -ef"
 
 class ImageTestContext(RuntimeTestContext):
     def __init__(self, d, target, host_dumper):