summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/devtool.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 3abba0805e..19c5ccf60b 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -439,7 +439,15 @@ class DevtoolTests(DevtoolBase):
439 # Try building 439 # Try building
440 bitbake('mdadm') 440 bitbake('mdadm')
441 # Try making (minor) modifications to the source 441 # Try making (minor) modifications to the source
442 result = runCmd("sed -i 's!^\.TH.*!.TH MDADM 8 \"\" v9.999-custom!' %s" % os.path.join(tempdir, 'mdadm.8.in')) 442 modfile = os.path.join(tempdir, 'mdadm.8.in')
443 result = runCmd("sed -i 's!^\.TH.*!.TH MDADM 8 \"\" v9.999-custom!' %s" % modfile)
444 sedline = ''
445 with open(modfile, 'r') as f:
446 for line in f:
447 if line.startswith('.TH'):
448 sedline = line.rstrip()
449 break
450 self.assertEqual(sedline, '.TH MDADM 8 "" v9.999-custom', 'man .in file not modified (sed failed)')
443 bitbake('mdadm -c package') 451 bitbake('mdadm -c package')
444 pkgd = get_bb_var('PKGD', 'mdadm') 452 pkgd = get_bb_var('PKGD', 'mdadm')
445 self.assertTrue(pkgd, 'Could not query PKGD variable') 453 self.assertTrue(pkgd, 'Could not query PKGD variable')
@@ -447,10 +455,11 @@ class DevtoolTests(DevtoolBase):
447 self.assertTrue(mandir, 'Could not query mandir variable') 455 self.assertTrue(mandir, 'Could not query mandir variable')
448 if mandir[0] == '/': 456 if mandir[0] == '/':
449 mandir = mandir[1:] 457 mandir = mandir[1:]
450 with open(os.path.join(pkgd, mandir, 'man8', 'mdadm.8'), 'r') as f: 458 manfile = os.path.join(pkgd, mandir, 'man8', 'mdadm.8')
459 with open(manfile, 'r') as f:
451 for line in f: 460 for line in f:
452 if line.startswith('.TH'): 461 if line.startswith('.TH'):
453 self.assertEqual(line.rstrip(), '.TH MDADM 8 "" v9.999-custom', 'man file not modified. man searched file path: %s' % os.path.join(pkgd, mandir, 'man8', 'mdadm.8')) 462 self.assertEqual(line.rstrip(), '.TH MDADM 8 "" v9.999-custom', 'man file not modified. man searched file path: %s' % manfile)
454 # Test devtool reset 463 # Test devtool reset
455 stampprefix = get_bb_var('STAMP', 'mdadm') 464 stampprefix = get_bb_var('STAMP', 'mdadm')
456 result = runCmd('devtool reset mdadm') 465 result = runCmd('devtool reset mdadm')