summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/loader.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-10-31 13:15:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:03:55 +0000
commitf995f178de79d6d11422cd879d06371811f50651 (patch)
tree0d844befb24590df492f5e6f0c829b0496b63b53 /meta/lib/oeqa/runtime/loader.py
parent3bc13548df4adb85f09467d200530a9c9f60da04 (diff)
downloadopenembedded-core-contrib-f995f178de79d6d11422cd879d06371811f50651.tar.gz
oeqa/runtime: Add case, context and loader classes for runtime testing
This adds OERuntimeTestCase, OERuntimeTestContext, and OERuntimeTestLoader to be used for runtime testing. As expected there are some changes in runtime context: - Adds the target to be used for runtime testing, the default is a SSH connection to the device under test running a OE image. - Runtime context requires image manifest because several tests are skipped if a package is missing or installed. - Several tests require the output of the ps command and it changes its output and arguments if busybox o procps is installed, so the case must use the correct ps command. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Diffstat (limited to 'meta/lib/oeqa/runtime/loader.py')
-rw-r--r--meta/lib/oeqa/runtime/loader.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/loader.py b/meta/lib/oeqa/runtime/loader.py
new file mode 100644
index 0000000000..041ef976eb
--- /dev/null
+++ b/meta/lib/oeqa/runtime/loader.py
@@ -0,0 +1,16 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.core.loader import OETestLoader
+from oeqa.runtime.case import OERuntimeTestCase
+
+class OERuntimeTestLoader(OETestLoader):
+ caseClass = OERuntimeTestCase
+
+ def _getTestCase(self, testCaseClass, tcName):
+ case = super(OERuntimeTestLoader, self)._getTestCase(testCaseClass, tcName)
+
+ # Adds custom attributes to the OERuntimeTestCase
+ setattr(case, 'target', self.tc.target)
+
+ return case