mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 03:32:12 +02:00
oeqa/selftest/imagefeatures: add test for man-db
Add a test to verify that manpages are built with api-documentation enabled, and apropos works on the target (so mandb has been ran). (From OE-Core rev: c085c335319bb98e09177c09feb1241a8560b606) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d42904ba0c
commit
f3c5db2465
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user