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:11:38 -1000 |
| commit | 00fabc39398d05dbbe20a512eba336d9e30aca15 (patch) | |
| tree | 4eabaaa83cf0c36f5a13d0ae416111d14150c491 /meta/lib/oeqa | |
| parent | bb2ce4dcf6a5c549a6ef29a5a1be0fb224e68477 (diff) | |
| download | poky-00fabc39398d05dbbe20a512eba336d9e30aca15.tar.gz | |
oeqa/selftest/bbtests: add non-existent prefile/postfile tests
Fixes [YOCTO #10725]
(From OE-Core rev: ef732d6dd735ad06c229eb4e2a4aca295490ec53)
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')
| -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 b42bbb651d..d91c8ea82b 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py | |||
| @@ -188,6 +188,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" | |||
| 188 | self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output) | 188 | self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output) |
| 189 | 189 | ||
| 190 | def test_prefile(self): | 190 | def test_prefile(self): |
| 191 | # Test when the prefile does not exist | ||
| 192 | result = runCmd('bitbake -r conf/prefile.conf', ignore_status=True) | ||
| 193 | self.assertEqual(1, result.status, "bitbake didn't error and should have when a specified prefile didn't exist: %s" % result.output) | ||
| 194 | # Test when the prefile exists | ||
| 191 | preconf = os.path.join(self.builddir, 'conf/prefile.conf') | 195 | preconf = os.path.join(self.builddir, 'conf/prefile.conf') |
| 192 | self.track_for_cleanup(preconf) | 196 | self.track_for_cleanup(preconf) |
| 193 | ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"") | 197 | ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"") |
| @@ -198,6 +202,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" | |||
| 198 | self.assertIn('localconf', result.output) | 202 | self.assertIn('localconf', result.output) |
| 199 | 203 | ||
| 200 | def test_postfile(self): | 204 | def test_postfile(self): |
| 205 | # Test when the postfile does not exist | ||
| 206 | result = runCmd('bitbake -R conf/postfile.conf', ignore_status=True) | ||
| 207 | self.assertEqual(1, result.status, "bitbake didn't error and should have when a specified postfile didn't exist: %s" % result.output) | ||
| 208 | # Test when the postfile exists | ||
| 201 | postconf = os.path.join(self.builddir, 'conf/postfile.conf') | 209 | postconf = os.path.join(self.builddir, 'conf/postfile.conf') |
| 202 | self.track_for_cleanup(postconf) | 210 | self.track_for_cleanup(postconf) |
| 203 | ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"") | 211 | ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"") |
