From 9579f0cb3a481186e8142c68bb226708a41549cd Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 12 Jun 2018 09:57:37 +0200 Subject: aktualizr-*-prov: read config files from STAGING_DIR_HOST. STAGING_DIR_NATIVE does not get populated as I had previously believed. Native recipes do not get packaged, so although we want to use a native executable, we need to get the config files from the aktualizr-host-tools package built by the aktualizr (target) recipe. Thanks to Andre McCurdy and Khem Raj for insight on how to get this right. --- lib/oeqa/selftest/cases/updater.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 1554835..44e0647 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -115,8 +115,8 @@ class AktualizrToolsTests(OESelftestTestCase): bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS', 'T'], 'aktualizr-native') creds = bb_vars['SOTA_PACKED_CREDENTIALS'] temp_dir = bb_vars['T'] - bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-implicit-prov') - config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' + bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-implicit-prov') + config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' akt_native_run(self, 'aktualizr_cert_provider -c {creds} -r -l {temp} -g {config}' .format(creds=creds, temp=temp_dir, config=config)) @@ -392,8 +392,8 @@ class ImplProvTests(OESelftestTestCase): # Run cert_provider. bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') creds = bb_vars['SOTA_PACKED_CREDENTIALS'] - bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-implicit-prov') - config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' + bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-implicit-prov') + config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -s -g {config}' .format(creds=creds, port=self.qemu.ssh_port, config=config)) @@ -473,8 +473,8 @@ class HsmTests(OESelftestTestCase): # Run cert_provider. bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') creds = bb_vars['SOTA_PACKED_CREDENTIALS'] - bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-hsm-prov') - config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_hsm_prov.toml' + bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-hsm-prov') + config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_hsm_prov.toml' akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -r -s -g {config}' .format(creds=creds, port=self.qemu.ssh_port, config=config)) -- cgit v1.2.3-54-g00ecf From 343b228fe997a8465a8dad7ef3deb19d4f04fdbb Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 14 Jun 2018 12:25:17 +0200 Subject: updater.py: Fix longstanding typo. --- lib/oeqa/selftest/cases/updater.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 44e0647..54b8aa2 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -141,7 +141,7 @@ class AutoProvTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer @@ -204,7 +204,7 @@ class RpiTests(OESelftestTestCase): result = runCmd('bitbake-layers show-layers') # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" if re.search(layer_python, result.output) is None: @@ -277,7 +277,7 @@ class GrubTests(OESelftestTestCase): result = runCmd('bitbake-layers show-layers') # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" if re.search(layer_intel, result.output) is None: @@ -339,7 +339,7 @@ class ImplProvTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer @@ -409,7 +409,7 @@ class HsmTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer @@ -527,7 +527,7 @@ class SecondaryTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer @@ -572,7 +572,7 @@ class PrimaryTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer -- cgit v1.2.3-54-g00ecf From cf23391c408712f65c9e65a8187d1c00d16c30de Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 19 Jun 2018 10:44:50 +0200 Subject: updater.py: Add hack to clean recipes before building. This should not be necessary, but after building for the grub test, the sysroot does not get repopulated as expected for the implicit/HSM tests. --- lib/oeqa/selftest/cases/updater.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 54b8aa2..96058e7 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -348,6 +348,7 @@ class ImplProvTests(OESelftestTestCase): self.meta_qemu = None self.append_config('MACHINE = "qemux86-64"') self.append_config('SOTA_CLIENT_PROV = " aktualizr-implicit-prov "') + runCmd('bitbake -c cleanall aktualizr aktualizr-implicit-prov') self.qemu, self.s = qemu_launch(machine='qemux86-64') def tearDownLocal(self): @@ -419,6 +420,7 @@ class HsmTests(OESelftestTestCase): self.append_config('MACHINE = "qemux86-64"') self.append_config('SOTA_CLIENT_PROV = "aktualizr-hsm-prov"') self.append_config('SOTA_CLIENT_FEATURES = "hsm"') + runCmd('bitbake -c cleanall aktualizr aktualizr-hsm-prov') self.qemu, self.s = qemu_launch(machine='qemux86-64') def tearDownLocal(self): -- cgit v1.2.3-54-g00ecf