summaryrefslogtreecommitdiffstats
path: root/support/testing/tests
diff options
context:
space:
mode:
Diffstat (limited to 'support/testing/tests')
-rw-r--r--support/testing/tests/init/test_systemd.py12
-rw-r--r--support/testing/tests/package/test_rust.py18
2 files changed, 24 insertions, 6 deletions
diff --git a/support/testing/tests/init/test_systemd.py b/support/testing/tests/init/test_systemd.py
index 48fac1490f..a324ba8569 100644
--- a/support/testing/tests/init/test_systemd.py
+++ b/support/testing/tests/init/test_systemd.py
@@ -21,6 +21,18 @@ class InitSystemSystemdBase(InitSystemBase):
def check_init(self):
super(InitSystemSystemdBase, self).check_init("/lib/systemd/systemd")
+ # Test all units are OK
+ output, _ = self.emulator.run("systemctl --no-pager --failed --no-legend")
+ self.assertEqual(len(output), 0)
+
+ # Test we can reach the DBus daemon
+ _, exit_code = self.emulator.run("busctl --no-pager")
+ self.assertEqual(exit_code, 0)
+
+ # Test we can read at least one line from the journal
+ output, _ = self.emulator.run("journalctl --no-pager --lines 1 --quiet")
+ self.assertEqual(len(output), 1)
+
class TestInitSystemSystemdRoNetworkd(InitSystemSystemdBase):
config = InitSystemSystemdBase.config + \
diff --git a/support/testing/tests/package/test_rust.py b/support/testing/tests/package/test_rust.py
index 8035f8b83a..e6c0de2214 100644
--- a/support/testing/tests/package/test_rust.py
+++ b/support/testing/tests/package/test_rust.py
@@ -53,12 +53,6 @@ class TestRustBase(infra.basetest.BRTest):
self.b.build()
shutil.rmtree(workdir)
- def test_run(self):
- self.build_test_prog()
- self.login()
- _, exit_code = self.emulator.run(self.crate)
- self.assertEqual(exit_code, 0)
-
class TestRustBin(TestRustBase):
config = \
@@ -82,6 +76,12 @@ class TestRustBin(TestRustBase):
BR2_PACKAGE_HOST_RUSTC=y
"""
+ def test_run(self):
+ self.build_test_prog()
+ self.login()
+ _, exit_code = self.emulator.run(self.crate)
+ self.assertEqual(exit_code, 0)
+
class TestRust(TestRustBase):
config = \
@@ -105,3 +105,9 @@ class TestRust(TestRustBase):
BR2_PACKAGE_HOST_RUSTC=y
BR2_PACKAGE_HOST_RUST=y
"""
+
+ def test_run(self):
+ self.build_test_prog()
+ self.login()
+ _, exit_code = self.emulator.run(self.crate)
+ self.assertEqual(exit_code, 0)
OpenPOWER on IntegriCloud