From e0f2275894daeb268180648ceb5488f45757d592 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Fri, 16 Nov 2018 11:01:50 +0100 Subject: aktualizr: Bump to latest and fix names. Signed-off-by: Patrick Vacek --- lib/oeqa/selftest/cases/updater.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/oeqa/selftest/cases/updater.py') diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index e4b2fa5..eb43994 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -103,7 +103,7 @@ class AktualizrToolsTests(OESelftestTestCase): bitbake('aktualizr-native') def test_cert_provider_help(self): - akt_native_run(self, 'aktualizr_cert_provider --help') + akt_native_run(self, 'aktualizr-cert-provider --help') def test_cert_provider_local_output(self): logger = logging.getLogger("selftest") @@ -115,7 +115,7 @@ class AktualizrToolsTests(OESelftestTestCase): bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-ca-implicit-prov') config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov_ca.toml' - akt_native_run(self, 'aktualizr_cert_provider -c {creds} -r -l {temp} -g {config}' + akt_native_run(self, 'aktualizr-cert-provider -c {creds} -r -l {temp} -g {config}' .format(creds=creds, temp=temp_dir, config=config)) # Might be nice if these names weren't hardcoded. @@ -424,14 +424,14 @@ class ImplProvTests(OESelftestTestCase): self.assertIn(b'Fetched metadata: no', stdout, 'Device already provisioned!? ' + stderr.decode() + stdout.decode()) - # Run cert_provider. + # Run aktualizr-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_HOST', 'libdir'], 'aktualizr-ca-implicit-prov') config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov_ca.toml' print('Provisining at root@localhost:%d' % self.qemu.ssh_port) - akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -s -u -r -g {config}' + akt_native_run(self, 'aktualizr-cert-provider -c {creds} -t root@localhost -p {port} -s -u -r -g {config}' .format(creds=creds, port=self.qemu.ssh_port, config=config)) verifyProvisioned(self, machine) @@ -509,13 +509,13 @@ class HsmTests(OESelftestTestCase): self.assertNotEqual(retcode, 0, 'softhsm2-tool succeeded before initialization: ' + stdout.decode() + stderr.decode()) - # Run cert_provider. + # Run aktualizr-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_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 -u -g {config}' + akt_native_run(self, 'aktualizr-cert-provider -c {creds} -t root@localhost -p {port} -r -s -u -g {config}' .format(creds=creds, port=self.qemu.ssh_port, config=config)) # Verify that HSM is able to initialize. -- cgit v1.2.3-54-g00ecf From 3fe92dd6cdbcb23439e8dc1988fff009b3d066b1 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 19 Nov 2018 14:06:55 +0100 Subject: selftest: introduce QEMU_USE_KVM The qemucommand.py script uses kvm-ok to determine whether KVM is available. However, kvm-ok is very Ubuntu specific and not readily available on Fedora. Use QEMU_USE_KVM variable which is also used in OpenEmbedded selftests. The variable must contain True to enable KVM for machines containing x86 in its name, or contain a list of machines. For meta-updater this makes sure KVM is used for all tests: QEMU_USE_KVM = "intel-corei7-64 qemux86-64" Signed-off-by: Stefan Agner --- lib/oeqa/selftest/cases/updater.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/oeqa/selftest/cases/updater.py') diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index eb43994..499ddb7 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -655,7 +655,13 @@ def qemu_launch(efi=False, machine=None, imagename=None): args.dir = 'tmp/deploy/images' args.efi = efi args.machine = machine - args.kvm = None # Autodetect + qemu_use_kvm = get_bb_var("QEMU_USE_KVM") + if qemu_use_kvm and \ + (qemu_use_kvm == 'True' and 'x86' in machine or \ + get_bb_var('MACHINE') in qemu_use_kvm.split()): + args.kvm = True + else: + args.kvm = None # Autodetect args.no_gui = True args.gdb = False args.pcap = None -- cgit v1.2.3-54-g00ecf From de6008d854ddc94589a050e7eac00ccd1cf072a6 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 26 Nov 2018 15:05:59 +0100 Subject: oe-selftest: rpi-basic-image is deprecated. Use core-image-minimal. Signed-off-by: Patrick Vacek --- lib/oeqa/selftest/cases/updater.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/oeqa/selftest/cases/updater.py') diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 499ddb7..7e55d07 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -285,9 +285,9 @@ class RpiTests(OESelftestTestCase): def test_rpi(self): logger = logging.getLogger("selftest") - logger.info('Running bitbake to build rpi-basic-image') + logger.info('Running bitbake to build core-image-minimal') self.append_config('SOTA_CLIENT_PROV = "aktualizr-auto-prov"') - bitbake('rpi-basic-image') + bitbake('core-image-minimal') credentials = get_bb_var('SOTA_PACKED_CREDENTIALS') # Skip the test if the variable SOTA_PACKED_CREDENTIALS is not set. if credentials is None: @@ -295,7 +295,7 @@ class RpiTests(OESelftestTestCase): # Check if the file exists. self.assertTrue(os.path.isfile(credentials), "File %s does not exist" % credentials) deploydir = get_bb_var('DEPLOY_DIR_IMAGE') - imagename = get_bb_var('IMAGE_LINK_NAME', 'rpi-basic-image') + imagename = get_bb_var('IMAGE_LINK_NAME', 'core-image-minimal') # Check if the credentials are included in the output image. result = runCmd('tar -jtvf %s/%s.tar.bz2 | grep sota_provisioning_credentials.zip' % (deploydir, imagename), ignore_status=True) -- cgit v1.2.3-54-g00ecf From 8f08a3b489206a2137600941eb45198cf15cecc9 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 28 Nov 2018 16:23:11 +0100 Subject: sota.conf: use usrmerge OSTree needs UsrMove to be implemented, meaning that everything should be in /usr. OpenEmbedded has a distro feature usrmerge which implements exactly that, and makes sure that no package install anything in /bin, /sbin or /lib. Make use of it. Signed-off-by: Stefan Agner --- conf/distro/sota.conf.inc | 2 +- lib/oeqa/selftest/cases/updater.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/oeqa/selftest/cases/updater.py') diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc index ea1ca95..8de9597 100644 --- a/conf/distro/sota.conf.inc +++ b/conf/distro/sota.conf.inc @@ -4,7 +4,7 @@ # # require conf/distro/sota.conf.inc -DISTRO_FEATURES_append = " sota" +DISTRO_FEATURES_append = " sota usrmerge" DISTRO_FEATURES_NATIVE_append = " sota" INHERIT += " sota" # Prelinking increases the size of downloads and causes build errors diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 7e55d07..92bf6fc 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -36,6 +36,10 @@ class GeneralTests(OESelftestTestCase): result = get_bb_var('DISTRO_FEATURES').find('sota') self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES') + def test_feature_usrmerge(self): + result = get_bb_var('DISTRO_FEATURES').find('usrmerge') + self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES') + def test_feature_systemd(self): result = get_bb_var('DISTRO_FEATURES').find('systemd') self.assertNotEqual(result, -1, 'Feature "systemd" not set at DISTRO_FEATURES') -- cgit v1.2.3-54-g00ecf