Skip to contentSkip to conversation

selftest: Add test to check imports from other layers

PATCH New [email protected] 1 participant 2 messages Jul 20, 2016

lore
Share & tools
lore
#0 lore raw

v3 cover selftest: Add test to check imports from other layers

From: Mariano Lopez <[email protected]>

This patch adds a test to check selftest itself, the feature to import tests from other layers.

Changes in v2:

- Renamed tests based on Benjamin's comment

Changes in v3:

- Refactor test to not use oe-selftest within oe-selftest

The following changes since commit 1bf1e2c208ad137b9b91ca0687d6fb9486045dfd:

bitbake: toaster-tests: add class SeleniumTestCaseBase for browser tests (2016-07-20 10:38:52 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib mariano/bug9770v3
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug9770v3

Mariano Lopez (1):
selftest/seltest.py: Add test to check imports from other layers

 meta-selftest/lib/oeqa/selftest/external-layer.py | 14 +++++++
 meta/lib/oeqa/selftest/selftest.py                | 50 +++++++++++++++++++++++
 2 files changed, 64 insertions(+)
 create mode 100644 meta-selftest/lib/oeqa/selftest/external-layer.py
 create mode 100644 meta/lib/oeqa/selftest/selftest.py
Signature · 1 line
2.6.6
#1 lore raw

PATCH v3 1/1 selftest/seltest.py: Add test to check imports from other layers

From: Mariano Lopez <[email protected]>

This tests adds a check of selftest itself to verify if can add test from other layers.

[YOCTO #9770]

---
 meta-selftest/lib/oeqa/selftest/external-layer.py | 14 +++++++
 meta/lib/oeqa/selftest/selftest.py                | 50 +++++++++++++++++++++++
 2 files changed, 64 insertions(+)
 create mode 100644 meta-selftest/lib/oeqa/selftest/external-layer.py
 create mode 100644 meta/lib/oeqa/selftest/selftest.py
meta-selftest/lib/oeqa/selftest/external-layer.py new file +14 -0
new file mode 100644
index 0000000..224ab36
@@ -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 <[email protected]
+        """
+
+        self.assertEqual(True, True, msg = "Impossible to fail this test")
meta/lib/oeqa/selftest/selftest.py new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.6.6