[Buildroot] [RFC] testing: add python-crossbar tests
yegorslists at googlemail.com
yegorslists at googlemail.com
Thu Feb 15 13:38:05 UTC 2018
From: Yegor Yefremov <yegorslists at googlemail.com>
This test invokes "crossbar version" command, that checks
all dependencies found in setup.py files and prints some
system related information.
Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
---
.../testing/tests/package/test_python_crossbar.py | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_python_crossbar.py
diff --git a/support/testing/tests/package/test_python_crossbar.py b/support/testing/tests/package/test_python_crossbar.py
new file mode 100644
index 0000000..a67bdea
--- /dev/null
+++ b/support/testing/tests/package/test_python_crossbar.py
@@ -0,0 +1,27 @@
+from tests.package.test_python import TestPythonBase
+
+class TestPythonCrossbar(TestPythonBase):
+ def version_test(self, timeout=-1):
+ cmd = self.interpreter + " -m crossbar version"
+ _, exit_code = self.emulator.run(cmd, timeout)
+ self.assertEqual(exit_code, 0)
+
+class TestPythonPy2Crossbar(TestPythonCrossbar):
+ config = TestPythonBase.config + \
+"""
+BR2_PACKAGE_PYTHON=y
+BR2_PACKAGE_PYTHON_CROSSBAR=y
+"""
+ def test_run(self):
+ self.login()
+ self.version_test(60)
+
+class TestPythonPy3Crossbar(TestPythonCrossbar):
+ config = TestPythonBase.config + \
+"""
+BR2_PACKAGE_PYTHON3=y
+BR2_PACKAGE_PYTHON_CROSSBAR=y
+"""
+ def test_run(self):
+ self.login()
+ self.version_test(60)
--
2.1.4
More information about the buildroot
mailing list