From: Mariano Lopez Date: Mon, 2 May 2016 13:19:18 +0000 (+0000) Subject: oetest.py: Add default pscmd to oeTest X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~25794 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44aa8c3b6747179a0c4c156fc4922d838cdc19a4;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oetest.py: Add default pscmd to oeTest 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 Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index bef9ac49611..6a908ee3798 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -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):