summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/devtool.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/devtool.py')
-rw-r--r--meta/lib/oeqa/selftest/devtool.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 7f9efe6368..d32ca28c46 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -1634,18 +1634,19 @@ class DevtoolTests(DevtoolBase):
1634 #verify the modification. 1634 #verify the modification.
1635 features = 'MACHINE = "qemux86"\n' 1635 features = 'MACHINE = "qemux86"\n'
1636 self.write_config(features) 1636 self.write_config(features)
1637 kernel_provider = get_bb_var('PREFERRED_PROVIDER_virtual/kernel')
1637 # Clean up the enviroment 1638 # Clean up the enviroment
1638 bitbake('linux-yocto -c cleansstate') 1639 bitbake('%s -c cleansstate' % kernel_provider)
1639 tempdir = tempfile.mkdtemp(prefix='devtoolqa') 1640 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
1640 self.track_for_cleanup(tempdir) 1641 self.track_for_cleanup(tempdir)
1641 self.track_for_cleanup(self.workspacedir) 1642 self.track_for_cleanup(self.workspacedir)
1642 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') 1643 self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
1643 self.add_command_to_tearDown('bitbake -c clean linux-yocto') 1644 self.add_command_to_tearDown('bitbake -c clean %s' % kernel_provider)
1644 #Step 1 1645 #Step 1
1645 #Here is just generated the config file instead of all the kernel to optimize the 1646 #Here is just generated the config file instead of all the kernel to optimize the
1646 #time of executing this test case. 1647 #time of executing this test case.
1647 bitbake('linux-yocto -c configure') 1648 bitbake('%s -c configure' % kernel_provider)
1648 bbconfig = os.path.join(get_bb_var('B',"linux-yocto"),'.config') 1649 bbconfig = os.path.join(get_bb_var('B', kernel_provider),'.config')
1649 buildir= get_bb_var('TOPDIR') 1650 buildir= get_bb_var('TOPDIR')
1650 #Step 2 1651 #Step 2
1651 runCmd('cp %s %s' % (bbconfig, buildir)) 1652 runCmd('cp %s %s' % (bbconfig, buildir))
@@ -1654,7 +1655,7 @@ class DevtoolTests(DevtoolBase):
1654 1655
1655 tmpconfig = os.path.join(buildir, '.config') 1656 tmpconfig = os.path.join(buildir, '.config')
1656 #Step 3 1657 #Step 3
1657 bitbake('linux-yocto -c clean') 1658 bitbake('%s -c clean' % kernel_provider)
1658 #Step 4.1 1659 #Step 4.1
1659 runCmd('devtool modify virtual/kernel -x %s' % tempdir) 1660 runCmd('devtool modify virtual/kernel -x %s' % tempdir)
1660 self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile')), 1661 self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile')),
@@ -1664,10 +1665,10 @@ class DevtoolTests(DevtoolBase):
1664 diff = runCmd('diff %s %s' % (tmpconfig, configfile)) 1665 diff = runCmd('diff %s %s' % (tmpconfig, configfile))
1665 self.assertEqual(0,diff.status,'Kernel .config file is not the same using bitbake and devtool') 1666 self.assertEqual(0,diff.status,'Kernel .config file is not the same using bitbake and devtool')
1666 #Step 4.3 1667 #Step 4.3
1667 #NOTE: virtual/kernel is mapped to linux-yocto 1668 #NOTE: virtual/kernel is mapped to kernel_provider
1668 result = runCmd('devtool build linux-yocto') 1669 result = runCmd('devtool build %s' % kernel_provider)
1669 self.assertEqual(0,result.status,'Cannot build kernel using `devtool build`') 1670 self.assertEqual(0,result.status,'Cannot build kernel using `devtool build`')
1670 kernelfile = os.path.join(get_bb_var('KBUILD_OUTPUT',"linux-yocto"), 'vmlinux') 1671 kernelfile = os.path.join(get_bb_var('KBUILD_OUTPUT', kernel_provider), 'vmlinux')
1671 self.assertTrue(os.path.exists(kernelfile),'Kernel was not build correctly') 1672 self.assertTrue(os.path.exists(kernelfile),'Kernel was not build correctly')
1672 1673
1673 #Modify the kernel source, this is specific for qemux86 1674 #Modify the kernel source, this is specific for qemux86
@@ -1681,11 +1682,11 @@ class DevtoolTests(DevtoolBase):
1681 modconf = runCmd("sed -i 's/CONFIG_SG_POOL=y/%s/' %s" % (modconfopt, codeconfigfile)) 1682 modconf = runCmd("sed -i 's/CONFIG_SG_POOL=y/%s/' %s" % (modconfopt, codeconfigfile))
1682 self.assertEqual(0,modconf.status,'Modification to %s failed' % codeconfigfile) 1683 self.assertEqual(0,modconf.status,'Modification to %s failed' % codeconfigfile)
1683 #Build again kernel with devtool 1684 #Build again kernel with devtool
1684 rebuild = runCmd('devtool build linux-yocto') 1685 rebuild = runCmd('devtool build %s' % kernel_provider)
1685 self.assertEqual(0,rebuild.status,'Fail to build kernel after modification of source and config') 1686 self.assertEqual(0,rebuild.status,'Fail to build kernel after modification of source and config')
1686 #Step 4.4 1687 #Step 4.4
1687 bzimagename = 'bzImage-' + get_bb_var('KERNEL_VERSION_NAME',"linux-yocto") 1688 bzimagename = 'bzImage-' + get_bb_var('KERNEL_VERSION_NAME', kernel_provider)
1688 bzimagefile = os.path.join(get_bb_var('D',"linux-yocto"),'boot', bzimagename) 1689 bzimagefile = os.path.join(get_bb_var('D', kernel_provider),'boot', bzimagename)
1689 checkmodcode = runCmd("grep '%s' %s" % (modstring, bzimagefile)) 1690 checkmodcode = runCmd("grep '%s' %s" % (modstring, bzimagefile))
1690 self.assertEqual(0,checkmodcode.status,'Modification on kernel source failed') 1691 self.assertEqual(0,checkmodcode.status,'Modification on kernel source failed')
1691 #Step 4.5 1692 #Step 4.5