Regression test for [Yocto #15255] Signed-off-by: Pavel Zhukov <pa...@zhukoff.net> --- meta/lib/oeqa/selftest/cases/bbtests.py | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index d242352ea2..0da59e0f58 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py @@ -362,3 +362,14 @@ INHERIT:remove = \"report-error\" result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True) self.assertTrue(re.search("Recipe uses a floating tag/branch .* for repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" % result.output) + + def test_unexpanded_variable_in_path(self): + """ + Test that bitbake fails if directory contains unexpanded bitbake variable in the name + """ + recipe_name = "gitunpackoffline" + self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"') + result = bitbake('{}'.format(recipe_name), ignore_status=True) + self.assertGreater(result.status, 0, "Build should have failed if ${ is in the path") + self.assertTrue(re.search("ERROR: Directory name /.* contains unexpanded bitbake variable. This may cause build failures and WORKDIR polution", + result.output), msg = "mkdirhier with unexpanded variable should have failed: %s" % result.output) -- 2.41.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192060): https://lists.openembedded.org/g/openembedded-core/message/192060 Mute This Topic: https://lists.openembedded.org/mt/103054441/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-