summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-03-07 20:09:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-08 16:41:55 +0000
commitf3c5db246586ba4c705dcfd2804d89ed904d9651 (patch)
treea35425fed03bfca8de8da915860c258405d72d49 /meta/lib/oeqa
parentd42904ba0cf0eac28ef79b0e6015150d376d134d (diff)
downloadpoky-f3c5db246586ba4c705dcfd2804d89ed904d9651.tar.gz
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>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/imagefeatures.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index af38150613..bdd4d3200e 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"
299 result = glob.glob(images) 299 result = glob.glob(images)
300 with open(result[1],"r") as f: 300 with open(result[1],"r") as f:
301 self.assertEqual(len(f.read().strip()),0) 301 self.assertEqual(len(f.read().strip()),0)
302
303 def test_mandb(self):
304 """
305 Test that an image containing manpages has working man and apropos commands.
306 """
307 config = """
308DISTRO_FEATURES:append = " api-documentation"
309CORE_IMAGE_EXTRA_INSTALL = "man-pages kmod-doc"
310"""
311 self.write_config(config)
312 bitbake("core-image-minimal")
313
314 with runqemu('core-image-minimal', ssh=False, runqemuparams='nographic') as qemu:
315 # This manpage is provided by man-pages
316 status, output = qemu.run_serial("apropos 8859")
317 self.assertEqual(status, 1, 'Failed to run apropos: %s' % (output))
318 self.assertIn("iso_8859_15", output)
319
320 # This manpage is provided by kmod
321 status, output = qemu.run_serial("man --pager=cat modprobe")
322 self.assertEqual(status, 1, 'Failed to run man: %s' % (output))
323 self.assertIn("force-modversion", output)