diff options
author | Jose Perez Carranza <jose.perez.carranza@linux.intel.com> | 2017-09-08 12:08:43 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-12 23:55:29 +0100 |
commit | fae168d2886f7dc1e0df6f85c226b75c87beff36 (patch) | |
tree | deb17ff11ef23c0d01ca0b2556aae814cdf77a30 /meta/lib/oeqa | |
parent | c9b5a880b63ba32996fec4a5cb551161e1d6a0da (diff) | |
download | poky-fae168d2886f7dc1e0df6f85c226b75c87beff36.tar.gz |
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.
(From OE-Core rev: ccccf975c75055639c0ed5052ac0ad53ebbf53ca)
Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 9 |
1 files 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): | |||
1654 | # Clean up the enviroment | 1654 | # Clean up the enviroment |
1655 | bitbake('%s -c clean' % kernel_provider) | 1655 | bitbake('%s -c clean' % kernel_provider) |
1656 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | 1656 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') |
1657 | tempdir_cfg = tempfile.mkdtemp(prefix='config_qa') | ||
1657 | self.track_for_cleanup(tempdir) | 1658 | self.track_for_cleanup(tempdir) |
1659 | self.track_for_cleanup(tempdir_cfg) | ||
1658 | self.track_for_cleanup(self.workspacedir) | 1660 | self.track_for_cleanup(self.workspacedir) |
1659 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | 1661 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') |
1660 | self.add_command_to_tearDown('bitbake -c clean %s' % kernel_provider) | 1662 | self.add_command_to_tearDown('bitbake -c clean %s' % kernel_provider) |
@@ -1663,12 +1665,11 @@ class DevtoolTests(DevtoolBase): | |||
1663 | #time of executing this test case. | 1665 | #time of executing this test case. |
1664 | bitbake('%s -c configure' % kernel_provider) | 1666 | bitbake('%s -c configure' % kernel_provider) |
1665 | bbconfig = os.path.join(get_bb_var('B', kernel_provider),'.config') | 1667 | bbconfig = os.path.join(get_bb_var('B', kernel_provider),'.config') |
1666 | buildir= get_bb_var('TOPDIR') | ||
1667 | #Step 2 | 1668 | #Step 2 |
1668 | runCmd('cp %s %s' % (bbconfig, buildir)) | 1669 | runCmd('cp %s %s' % (bbconfig, tempdir_cfg)) |
1669 | self.assertExists(os.path.join(buildir, '.config'), 'Could not copy .config file from kernel') | 1670 | self.assertExists(os.path.join(tempdir_cfg, '.config'), 'Could not copy .config file from kernel') |
1670 | 1671 | ||
1671 | tmpconfig = os.path.join(buildir, '.config') | 1672 | tmpconfig = os.path.join(tempdir_cfg, '.config') |
1672 | #Step 3 | 1673 | #Step 3 |
1673 | bitbake('%s -c clean' % kernel_provider) | 1674 | bitbake('%s -c clean' % kernel_provider) |
1674 | #Step 4.1 | 1675 | #Step 4.1 |