diff options
| author | cajun-rat <phil@advancedtelematic.com> | 2017-11-16 16:26:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-16 16:26:39 +0100 |
| commit | af1cc1ef3cf5cdff903249eca9111174aafc5924 (patch) | |
| tree | 0a762b5672d86620293311cc212c31f27e310962 /lib/oeqa | |
| parent | f64cbdb8deadacbece998636b7d3bc83e7ac2ec9 (diff) | |
| parent | 50d8ea5e540f1d2f423db77e8a93b0f5bcc1d1ca (diff) | |
| download | meta-updater-af1cc1ef3cf5cdff903249eca9111174aafc5924.tar.gz | |
Merge pull request #176 from advancedtelematic/test/PRO-4229/oe-selftest-hsm
Test/pro 4229/oe selftest hsm
Diffstat (limited to 'lib/oeqa')
| -rw-r--r-- | lib/oeqa/selftest/updater.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/oeqa/selftest/updater.py b/lib/oeqa/selftest/updater.py index 6339e6e..b59eefc 100644 --- a/lib/oeqa/selftest/updater.py +++ b/lib/oeqa/selftest/updater.py | |||
| @@ -57,6 +57,28 @@ class HsmTests(oeSelfTest): | |||
| 57 | 57 | ||
| 58 | class GeneralTests(oeSelfTest): | 58 | class GeneralTests(oeSelfTest): |
| 59 | 59 | ||
| 60 | def test_feature_sota(self): | ||
| 61 | result = get_bb_var('DISTRO_FEATURES').find('sota') | ||
| 62 | self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES'); | ||
| 63 | |||
| 64 | def test_feature_systemd(self): | ||
| 65 | result = get_bb_var('DISTRO_FEATURES').find('systemd') | ||
| 66 | self.assertNotEqual(result, -1, 'Feature "systemd" not set at DISTRO_FEATURES'); | ||
| 67 | |||
| 68 | def test_credentials(self): | ||
| 69 | bitbake('core-image-minimal') | ||
| 70 | credentials = get_bb_var('SOTA_PACKED_CREDENTIALS') | ||
| 71 | # skip the test if the variable SOTA_PACKED_CREDENTIALS is not set | ||
| 72 | if credentials is None: | ||
| 73 | raise unittest.SkipTest("Variable 'SOTA_PACKED_CREDENTIALS' not set.") | ||
| 74 | # Check if the file exists | ||
| 75 | self.assertTrue(os.path.isfile(credentials), "File %s does not exist" % credentials) | ||
| 76 | deploydir = get_bb_var('DEPLOY_DIR_IMAGE') | ||
| 77 | imagename = get_bb_var('IMAGE_LINK_NAME', 'core-image-minimal') | ||
| 78 | # Check if the credentials are included in the output image | ||
| 79 | result = runCmd('tar -jtvf %s/%s.tar.bz2 | grep sota_provisioning_credentials.zip' % (deploydir, imagename), ignore_status=True) | ||
| 80 | self.assertEqual(result.status, 0, "Status not equal to 0. output: %s" % result.output) | ||
| 81 | |||
| 60 | def test_java(self): | 82 | def test_java(self): |
| 61 | result = runCmd('which java', ignore_status=True) | 83 | result = runCmd('which java', ignore_status=True) |
| 62 | self.assertEqual(result.status, 0, "Java not found.") | 84 | self.assertEqual(result.status, 0, "Java not found.") |
