summaryrefslogtreecommitdiffstats
path: root/lib/oeqa/selftest/cases/updater_native.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oeqa/selftest/cases/updater_native.py')
-rw-r--r--lib/oeqa/selftest/cases/updater_native.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/oeqa/selftest/cases/updater_native.py b/lib/oeqa/selftest/cases/updater_native.py
new file mode 100644
index 0000000..1fc9cb8
--- /dev/null
+++ b/lib/oeqa/selftest/cases/updater_native.py
@@ -0,0 +1,47 @@
1# pylint: disable=C0111,C0325
2import logging
3
4from oeqa.selftest.case import OESelftestTestCase
5from oeqa.utils.commands import runCmd, bitbake, get_bb_var
6from testutils import akt_native_run
7
8
9class SotaToolsTests(OESelftestTestCase):
10
11 @classmethod
12 def setUpClass(cls):
13 super(SotaToolsTests, cls).setUpClass()
14 logger = logging.getLogger("selftest")
15 logger.info('Running bitbake to build aktualizr-native tools')
16 bitbake('aktualizr-native')
17
18 def test_push_help(self):
19 akt_native_run(self, 'garage-push --help')
20
21 def test_deploy_help(self):
22 akt_native_run(self, 'garage-deploy --help')
23
24 def test_garagesign_help(self):
25 akt_native_run(self, 'garage-sign --help')
26
27
28class GeneralTests(OESelftestTestCase):
29
30 def test_feature_sota(self):
31 result = get_bb_var('DISTRO_FEATURES').find('sota')
32 self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES')
33
34 def test_feature_usrmerge(self):
35 result = get_bb_var('DISTRO_FEATURES').find('usrmerge')
36 self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES')
37
38 def test_feature_systemd(self):
39 result = get_bb_var('DISTRO_FEATURES').find('systemd')
40 self.assertNotEqual(result, -1, 'Feature "systemd" not set at DISTRO_FEATURES')
41
42 def test_java(self):
43 result = runCmd('which java', ignore_status=True)
44 self.assertEqual(result.status, 0,
45 "Java not found. Do you have a JDK installed on your host machine?")
46
47# vim:set ts=4 sw=4 sts=4 expandtab: