[OE-core] [PATCH] selftest/devtool: Avoid writing on TOPDIR on kernel test case
jose.perez.carranza at linux.intel.com
jose.perez.carranza at linux.intel.com
Fri Sep 8 19:08:43 UTC 2017
From: Jose Perez Carranza <jose.perez.carranza at linux.intel.com>
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>
---
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 c17131a56d..d5d09186f7 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
--
2.12.3
More information about the Openembedded-core
mailing list