diff options
author | Fabien Mahot <fabien.mahot@smile.fr> | 2023-06-14 17:47:49 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-07-12 05:13:59 -1000 |
commit | 84ef58ae3905d0e3d15d0c88f495a9aba5b12751 (patch) | |
tree | 25b37cdc9eeb3ee76332b528124f8bc5ce0c5582 /meta/lib/oeqa/selftest/cases | |
parent | e146653c21d6c681acd89c37bc66aa4255d64020 (diff) | |
download | poky-84ef58ae3905d0e3d15d0c88f495a9aba5b12751.tar.gz |
oeqa/selftest/bbtests: add non-existent prefile/postfile tests
Fixes [YOCTO #10725]
(From OE-Core rev: 74fed908b807056cbb10c20d62d494f3089f52ee)
Signed-off-by: Fabien Mahot <fabien.mahot@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b0c33655fad5b2e7d96a45b6210527dfb766797b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/bbtests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index e659be5341..0b88316950 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py | |||
@@ -185,6 +185,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" | |||
185 | self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output) | 185 | self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output) |
186 | 186 | ||
187 | def test_prefile(self): | 187 | def test_prefile(self): |
188 | # Test when the prefile does not exist | ||
189 | result = runCmd('bitbake -r conf/prefile.conf', ignore_status=True) | ||
190 | self.assertEqual(1, result.status, "bitbake didn't error and should have when a specified prefile didn't exist: %s" % result.output) | ||
191 | # Test when the prefile exists | ||
188 | preconf = os.path.join(self.builddir, 'conf/prefile.conf') | 192 | preconf = os.path.join(self.builddir, 'conf/prefile.conf') |
189 | self.track_for_cleanup(preconf) | 193 | self.track_for_cleanup(preconf) |
190 | ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"") | 194 | ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"") |
@@ -195,6 +199,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" | |||
195 | self.assertIn('localconf', result.output) | 199 | self.assertIn('localconf', result.output) |
196 | 200 | ||
197 | def test_postfile(self): | 201 | def test_postfile(self): |
202 | # Test when the postfile does not exist | ||
203 | result = runCmd('bitbake -R conf/postfile.conf', ignore_status=True) | ||
204 | self.assertEqual(1, result.status, "bitbake didn't error and should have when a specified postfile didn't exist: %s" % result.output) | ||
205 | # Test when the postfile exists | ||
198 | postconf = os.path.join(self.builddir, 'conf/postfile.conf') | 206 | postconf = os.path.join(self.builddir, 'conf/postfile.conf') |
199 | self.track_for_cleanup(postconf) | 207 | self.track_for_cleanup(postconf) |
200 | ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"") | 208 | ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"") |