diff options
| author | Patrick Vacek <patrickvacek@gmail.com> | 2019-05-20 17:47:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-20 17:47:50 +0200 |
| commit | cdf070e20556a13ecda308833fd5c314d20547ab (patch) | |
| tree | f62f36ca4b7b2f26644f9d7f2fdb7e6fdee0154d /lib/oeqa/selftest/cases/updater_native.py | |
| parent | 195135f3d01fecc099bfec43d56b87c28c9aa8a0 (diff) | |
| parent | 99992959999ce9f6ad5fdae5a96262a5e0e59b5e (diff) | |
| download | meta-updater-cdf070e20556a13ecda308833fd5c314d20547ab.tar.gz | |
Merge pull request #514 from advancedtelematic/fix/rocko/backport
Fix/rocko/backport
Diffstat (limited to 'lib/oeqa/selftest/cases/updater_native.py')
| -rw-r--r-- | lib/oeqa/selftest/cases/updater_native.py | 43 |
1 files changed, 43 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..de98a09 --- /dev/null +++ b/lib/oeqa/selftest/cases/updater_native.py | |||
| @@ -0,0 +1,43 @@ | |||
| 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_systemd(self): | ||
| 35 | result = get_bb_var('DISTRO_FEATURES').find('systemd') | ||
| 36 | self.assertNotEqual(result, -1, 'Feature "systemd" not set at DISTRO_FEATURES') | ||
| 37 | |||
| 38 | def test_java(self): | ||
| 39 | result = runCmd('which java', ignore_status=True) | ||
| 40 | self.assertEqual(result.status, 0, | ||
| 41 | "Java not found. Do you have a JDK installed on your host machine?") | ||
| 42 | |||
| 43 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
