diff options
author | Ross Burton <ross.burton@intel.com> | 2018-12-03 20:35:15 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-05 12:37:02 +0000 |
commit | 13dd62344b6dc63a27b569959923021980026a23 (patch) | |
tree | 8def986859c54aefb211d901f87280c2deeb3ebb /meta/lib | |
parent | affd7388f31813b7cb5f376905b13be6c4cbf0d1 (diff) | |
download | poky-13dd62344b6dc63a27b569959923021980026a23.tar.gz |
oeqa/selftest/esdk: run selftest inside workdir not /tmp
We've seen issues with rootfs size calculations and we've seen systems
like opensuse which have btrfs mounted on /tmp causing selftest failures.
(From OE-Core rev: 61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/eSDK.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py b/meta/lib/oeqa/selftest/cases/eSDK.py index d03188f2f7..14f75d8c09 100644 --- a/meta/lib/oeqa/selftest/cases/eSDK.py +++ b/meta/lib/oeqa/selftest/cases/eSDK.py | |||
@@ -70,11 +70,12 @@ CORE_IMAGE_EXTRA_INSTALL = "perl" | |||
70 | @classmethod | 70 | @classmethod |
71 | def setUpClass(cls): | 71 | def setUpClass(cls): |
72 | super(oeSDKExtSelfTest, cls).setUpClass() | 72 | super(oeSDKExtSelfTest, cls).setUpClass() |
73 | cls.tmpdir_eSDKQA = tempfile.mkdtemp(prefix='eSDKQA') | 73 | cls.image = 'core-image-minimal' |
74 | 74 | ||
75 | sstate_dir = get_bb_var('SSTATE_DIR') | 75 | bb_vars = get_bb_vars(['SSTATE_DIR', 'WORKDIR'], cls.image) |
76 | cls.tmpdirobj = tempfile.TemporaryDirectory(prefix="selftest-esdk-", dir=bb_vars["WORKDIR"]) | ||
77 | cls.tmpdir_eSDKQA = cls.tempdirobj.name | ||
76 | 78 | ||
77 | cls.image = 'core-image-minimal' | ||
78 | oeSDKExtSelfTest.generate_eSDK(cls.image) | 79 | oeSDKExtSelfTest.generate_eSDK(cls.image) |
79 | 80 | ||
80 | # Install eSDK | 81 | # Install eSDK |
@@ -87,14 +88,14 @@ CORE_IMAGE_EXTRA_INSTALL = "perl" | |||
87 | sstate_config=""" | 88 | sstate_config=""" |
88 | SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" | 89 | SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" |
89 | SSTATE_MIRRORS = "file://.* file://%s/PATH" | 90 | SSTATE_MIRRORS = "file://.* file://%s/PATH" |
90 | """ % sstate_dir | 91 | """ % bb_vars["SSTATE_DIR"] |
91 | with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f: | 92 | with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f: |
92 | f.write(sstate_config) | 93 | f.write(sstate_config) |
93 | 94 | ||
94 | @classmethod | 95 | @classmethod |
95 | def tearDownClass(cls): | 96 | def tearDownClass(cls): |
96 | shutil.rmtree(cls.tmpdir_eSDKQA, ignore_errors=True) | 97 | cls.tmpdirobj.cleanup() |
97 | super(oeSDKExtSelfTest, cls).tearDownClass() | 98 | super().tearDownClass() |
98 | 99 | ||
99 | @OETestID(1602) | 100 | @OETestID(1602) |
100 | def test_install_libraries_headers(self): | 101 | def test_install_libraries_headers(self): |