Add a test to verify that manpages are built with api-documentation enabled, and apropos works on the target (so mandb has been ran).
Signed-off-by: Ross Burton <[email protected]> --- meta/lib/oeqa/selftest/cases/imagefeatures.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index af38150613b..bdd4d3200e2 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py @@ -299,3 +299,25 @@ SKIP_RECIPE[busybox] = "Don't build this" result = glob.glob(images) with open(result[1],"r") as f: self.assertEqual(len(f.read().strip()),0) + + def test_mandb(self): + """ + Test that an image containing manpages has working man and apropos commands. + """ + config = """ +DISTRO_FEATURES:append = " api-documentation" +CORE_IMAGE_EXTRA_INSTALL = "man-pages kmod-doc" +""" + self.write_config(config) + bitbake("core-image-minimal") + + with runqemu('core-image-minimal', ssh=False, runqemuparams='nographic') as qemu: + # This manpage is provided by man-pages + status, output = qemu.run_serial("apropos 8859") + self.assertEqual(status, 1, 'Failed to run apropos: %s' % (output)) + self.assertIn("iso_8859_15", output) + + # This manpage is provided by kmod + status, output = qemu.run_serial("man --pager=cat modprobe") + self.assertEqual(status, 1, 'Failed to run man: %s' % (output)) + self.assertIn("force-modversion", output) -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#178119): https://lists.openembedded.org/g/openembedded-core/message/178119 Mute This Topic: https://lists.openembedded.org/mt/97457967/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
