diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-03-21 15:28:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-21 15:28:55 +0100 |
commit | d39d8b167797243fcf067c6faa6b4220d697c71c (patch) | |
tree | d4aca54f1e8ff8e2a3409c2df2506f1f17152d3e /lib/oeqa/selftest/cases/updater_native.py | |
parent | 1e569e4def74e8b161833c4874888a7e514b67b1 (diff) | |
parent | e1867d7a7bd52d79fa3d051bb7b16f50934b88e6 (diff) | |
download | meta-updater-d39d8b167797243fcf067c6faa6b4220d697c71c.tar.gz |
Merge pull request #507 from advancedtelematic/feat/OTA-2142/aktualizr-resource-control
aktualizr resource control
Diffstat (limited to 'lib/oeqa/selftest/cases/updater_native.py')
-rw-r--r-- | lib/oeqa/selftest/cases/updater_native.py | 47 |
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 | ||
2 | import logging | ||
3 | |||
4 | from oeqa.selftest.case import OESelftestTestCase | ||
5 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var | ||
6 | from testutils import akt_native_run | ||
7 | |||
8 | |||
9 | class 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 | |||
28 | class 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: | ||