[oe-commits] [openembedded-core] 07/24: selftest/devtool: Avoid writing on TOPDIR on kernel test case

git at git.openembedded.org git at git.openembedded.org
Tue Sep 12 15:54:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit ccccf975c75055639c0ed5052ac0ad53ebbf53ca
Author: Jose Perez Carranza <jose.perez.carranza at linux.intel.com>
AuthorDate: Fri Sep 8 12:08:43 2017 -0700

    selftest/devtool: Avoid writing on TOPDIR on kernel test case
    
    Use a tempdir to copy the .config file from the kernel instead of being
    copied to build directory.
    
    Signed-off-by: Jose Perez Carranza <jose.perez.carranza at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/selftest/cases/devtool.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index c17131a..d5d0918 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -1654,7 +1654,9 @@ class DevtoolTests(DevtoolBase):
         # Clean up the enviroment
         bitbake('%s -c clean' % kernel_provider)
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+        tempdir_cfg = tempfile.mkdtemp(prefix='config_qa')
         self.track_for_cleanup(tempdir)
+        self.track_for_cleanup(tempdir_cfg)
         self.track_for_cleanup(self.workspacedir)
         self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
         self.add_command_to_tearDown('bitbake -c clean %s' % kernel_provider)
@@ -1663,12 +1665,11 @@ class DevtoolTests(DevtoolBase):
         #time of executing this test case.
         bitbake('%s -c configure' % kernel_provider)
         bbconfig = os.path.join(get_bb_var('B', kernel_provider),'.config')
-        buildir= get_bb_var('TOPDIR')
         #Step 2
-        runCmd('cp %s %s' % (bbconfig, buildir))
-        self.assertExists(os.path.join(buildir, '.config'), 'Could not copy .config file from kernel')
+        runCmd('cp %s %s' % (bbconfig, tempdir_cfg))
+        self.assertExists(os.path.join(tempdir_cfg, '.config'), 'Could not copy .config file from kernel')
 
-        tmpconfig = os.path.join(buildir, '.config')
+        tmpconfig = os.path.join(tempdir_cfg, '.config')
         #Step 3
         bitbake('%s -c clean' % kernel_provider)
         #Step 4.1

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list