diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-07 13:22:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-26 09:14:44 +0100 |
commit | f48d1a75e148911d7e0ebbb47ea7eb250120f4cd (patch) | |
tree | a2ebc6b1c791952c2dac8c32c0ed1e9d1b5caf2b /meta | |
parent | 4d41954e944510b0c44d3714a8a31c2deac4cfd3 (diff) | |
download | poky-f48d1a75e148911d7e0ebbb47ea7eb250120f4cd.tar.gz |
oeqa/bbtests: Fix race over DL_DIR and SSTATE_DIR
Running "-c cleanall" on shared DL_DIR and SSTATE_DIR is antisocial.
It leads to hard to debug races where we wonder why files disappear
and reappear from those directories.
Fix this by using a specific set of directories for these tests. This
avoids a long standing bug on the autobuilder where aspell and man
sources would disappear.
[YOCTO #6276]
(From OE-Core rev: 6b089c4a79dc3aae00c8a6e7ab0f6ba4b4b5f138)
(From OE-Core rev: f1447c256e027553442cf507e217323f7868000c)
(From OE-Core rev: e4434982e0d2c086ee946d3742c257daf31e8bfd)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/bbtests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py index 68f97bd8e3..c4d6e80bcd 100644 --- a/meta/lib/oeqa/selftest/bbtests.py +++ b/meta/lib/oeqa/selftest/bbtests.py | |||
@@ -97,6 +97,8 @@ class BitbakeTests(oeSelfTest): | |||
97 | def test_invalid_recipe_src_uri(self): | 97 | def test_invalid_recipe_src_uri(self): |
98 | data = 'SRC_URI = "file://invalid"' | 98 | data = 'SRC_URI = "file://invalid"' |
99 | self.write_recipeinc('man', data) | 99 | self.write_recipeinc('man', data) |
100 | self.write_config("DL_DIR = \"${TOPDIR}/download-selftest\"") | ||
101 | self.write_config("SSTATE_DIR = \"${TOPDIR}/download-selftest\"") | ||
100 | bitbake('-ccleanall man') | 102 | bitbake('-ccleanall man') |
101 | result = bitbake('-c fetch man', ignore_status=True) | 103 | result = bitbake('-c fetch man', ignore_status=True) |
102 | bitbake('-ccleanall man') | 104 | bitbake('-ccleanall man') |
@@ -107,6 +109,8 @@ class BitbakeTests(oeSelfTest): | |||
107 | 109 | ||
108 | @testcase(171) | 110 | @testcase(171) |
109 | def test_rename_downloaded_file(self): | 111 | def test_rename_downloaded_file(self): |
112 | self.write_config("DL_DIR = \"${TOPDIR}/download-selftest\"") | ||
113 | self.write_config("SSTATE_DIR = \"${TOPDIR}/download-selftest\"") | ||
110 | data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"' | 114 | data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"' |
111 | self.write_recipeinc('aspell', data) | 115 | self.write_recipeinc('aspell', data) |
112 | bitbake('-ccleanall aspell') | 116 | bitbake('-ccleanall aspell') |
@@ -169,6 +173,8 @@ class BitbakeTests(oeSelfTest): | |||
169 | 173 | ||
170 | @testcase(1035) | 174 | @testcase(1035) |
171 | def test_continue(self): | 175 | def test_continue(self): |
176 | self.write_config("DL_DIR = \"${TOPDIR}/download-selftest\"") | ||
177 | self.write_config("SSTATE_DIR = \"${TOPDIR}/download-selftest\"") | ||
172 | self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" ) | 178 | self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" ) |
173 | runCmd('bitbake -c cleanall man xcursor-transparent-theme') | 179 | runCmd('bitbake -c cleanall man xcursor-transparent-theme') |
174 | result = runCmd('bitbake man xcursor-transparent-theme -k', ignore_status=True) | 180 | result = runCmd('bitbake man xcursor-transparent-theme -k', ignore_status=True) |