aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-selftest/lib/oeqa/selftest/external-layer.py14
-rw-r--r--meta/lib/oeqa/selftest/selftest.py19
2 files changed, 33 insertions, 0 deletions
diff --git a/meta-selftest/lib/oeqa/selftest/external-layer.py b/meta-selftest/lib/oeqa/selftest/external-layer.py
new file mode 100644
index 00000000000..224ab36d5aa
--- /dev/null
+++ b/meta-selftest/lib/oeqa/selftest/external-layer.py
@@ -0,0 +1,14 @@
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.decorators import testcase
+
+class ImportedTests(oeSelfTest):
+
+ def test_unconditional_pass(self):
+ """
+ Summary: Doesn't check anything, used to check import test from other layers.
+ Expected: 1. Pass unconditionally
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.comr
+ """
+
+ self.assertEqual(True, True, msg = "Impossible to fail this test")
diff --git a/meta/lib/oeqa/selftest/selftest.py b/meta/lib/oeqa/selftest/selftest.py
new file mode 100644
index 00000000000..bb8ea4b6c2e
--- /dev/null
+++ b/meta/lib/oeqa/selftest/selftest.py
@@ -0,0 +1,19 @@
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.commands import runCmd
+from oeqa.utils.decorators import testcase
+
+class ExternalLayer(oeSelfTest):
+
+ def test_list_imported(self):
+ """
+ Summary: Checks functionality to import tests from other layers.
+ Expected: 1. Must show "test_import_dummy" in the test list.
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+
+ test_name = "external-layer.ImportedTests.test_unconditional_pass"
+ error_msg = "Couldn't find test: %s; Not importing tests from other layers" % test_name
+ result = runCmd("oe-selftest --list-tests")
+ success = True if test_name in result.output else False
+ self.assertEqual(success, True, msg = error_msg)