diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2019-03-19 16:45:34 +0100 |
---|---|---|
committer | Laurent Bonnans <laurent.bonnans@here.com> | 2019-03-20 14:13:41 +0100 |
commit | 8b98e1e0f908ef30f5a4459f2bd62442d2b6649b (patch) | |
tree | 59d17466158dbba27c0371294819fa52e94861e1 /lib/oeqa/selftest/cases/updater_native.py | |
parent | ececedcbd58a7cd04eea0a7faf7b04939536a555 (diff) | |
download | meta-updater-8b98e1e0f908ef30f5a4459f2bd62442d2b6649b.tar.gz |
Split oe-selftests by target machines
To allow for more targeted testing
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
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: | ||