diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2017-11-07 15:25:21 +0100 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2017-11-13 17:16:00 +0100 |
commit | 95e2f81a149142b67076a3132e1b00d9f64bd031 (patch) | |
tree | ed010ddb9d30ef4beec9ba7eb9317b7893be4232 /lib/oeqa/selftest/updater.py | |
parent | 06711c8543a3af13203b4352b25b1875c29c16f2 (diff) | |
download | meta-updater-95e2f81a149142b67076a3132e1b00d9f64bd031.tar.gz |
Rename for accuracy.
Diffstat (limited to 'lib/oeqa/selftest/updater.py')
-rw-r--r-- | lib/oeqa/selftest/updater.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/oeqa/selftest/updater.py b/lib/oeqa/selftest/updater.py new file mode 100644 index 0000000..e9048fd --- /dev/null +++ b/lib/oeqa/selftest/updater.py | |||
@@ -0,0 +1,41 @@ | |||
1 | import unittest | ||
2 | import os | ||
3 | import logging | ||
4 | |||
5 | from oeqa.selftest.base import oeSelfTest | ||
6 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var | ||
7 | |||
8 | class UpdaterTests(oeSelfTest): | ||
9 | |||
10 | @classmethod | ||
11 | def setUpClass(cls): | ||
12 | logger = logging.getLogger("selftest") | ||
13 | logger.info('Running bitbake to build aktualizr-native tools and garage-sign-native') | ||
14 | bitbake('aktualizr-native garage-sign-native') | ||
15 | |||
16 | def test_help(self): | ||
17 | image_dir = get_bb_var("D", "aktualizr-native") | ||
18 | bin_dir = get_bb_var("bindir", "aktualizr-native") | ||
19 | gp_path = os.path.join(image_dir, bin_dir[1:], 'garage-push') | ||
20 | result = runCmd('%s --help' % gp_path, ignore_status=True) | ||
21 | self.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output) | ||
22 | |||
23 | def test_java(self): | ||
24 | result = runCmd('which java', ignore_status=True) | ||
25 | self.assertEqual(result.status, 0, "Java not found.") | ||
26 | |||
27 | def test_sign(self): | ||
28 | image_dir = get_bb_var("D", "garage-sign-native") | ||
29 | bin_dir = get_bb_var("bindir", "garage-sign-native") | ||
30 | gs_path = os.path.join(image_dir, bin_dir[1:], 'garage-sign') | ||
31 | result = runCmd('%s --help' % gs_path, ignore_status=True) | ||
32 | self.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output) | ||
33 | |||
34 | def test_push(self): | ||
35 | bitbake('core-image-minimal') | ||
36 | self.write_config('IMAGE_INSTALL_append = " man "') | ||
37 | bitbake('core-image-minimal') | ||
38 | |||
39 | def test_hsm(self): | ||
40 | self.write_config('SOTA_CLIENT_FEATURES="hsm hsm-test"') | ||
41 | bitbake('core-image-minimal') | ||