[OE-core] [PATCH] oeqa/selftest/runtime_test: fix postinst_rootfs_and_boot

Ross Burton ross.burton at intel.com
Mon Nov 6 17:55:58 UTC 2017


This test overrides IMAGE_FEATURES but failed to include package-management,
which is essential for postinsts to work under dpkg.

Also rewrite the file existence check to use a console login not SSH for
simplicity.

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 7ce81c3ff0f..25270b7535b 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -244,7 +244,7 @@ postinst-delayed-t \
                 with self.subTest(init_manager=init_manager, package_class=classes):
                     features = 'MACHINE = "qemux86"\n'
                     features += 'CORE_IMAGE_EXTRA_INSTALL += "%s %s "\n'% (rootfs_pkg, boot_pkg)
-                    features += 'IMAGE_FEATURES += "empty-root-password ssh-server-openssh"\n'
+                    features += 'IMAGE_FEATURES += "package-management empty-root-password"\n'
                     features += 'PACKAGE_CLASSES = "%s"\n' % classes
                     if init_manager == "systemd":
                         features += 'DISTRO_FEATURES_append = " systemd"\n'
@@ -263,6 +263,5 @@ postinst-delayed-t \
 
                     testcommand = 'ls /etc/' + fileboot_name
                     with runqemu('core-image-minimal') as qemu:
-                        ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog)
-                        status, output = ssh.run(testcommand)
+                        status, output = qemu.run_serial("-f /etc/" + fileboot_name)
                         self.assertEqual(status, 0, 'File %s was not created at first boot (%s)' % (fileboot_name, output))
-- 
2.11.0




More information about the Openembedded-core mailing list