summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/bbtests.py
diff options
context:
space:
mode:
authorPavel Zhukov <pavel@zhukoff.net>2023-12-08 14:22:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-09 19:17:11 +0000
commit61805f6d60a33045546a5657a9c9f3b899a209b2 (patch)
treeda020d54bd7e22d3a79f11c9f4889096cb3d64b9 /meta/lib/oeqa/selftest/cases/bbtests.py
parent6543d3c5e9fc0eecf68f9db1614b8c48fd600b73 (diff)
downloadpoky-61805f6d60a33045546a5657a9c9f3b899a209b2.tar.gz
oeqa/selftest/bbtests: Add test for unexpanded variables in the dirname
Regression test for [Yocto #15255] (From OE-Core rev: 4c31cc114f2cf13c11b7ffd60db0eda1b63cc27b) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/bbtests.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/bbtests.py11
1 files changed, 11 insertions, 0 deletions
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\"
362 362
363 result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True) 363 result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True)
364 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) 364 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)
365
366 def test_unexpanded_variable_in_path(self):
367 """
368 Test that bitbake fails if directory contains unexpanded bitbake variable in the name
369 """
370 recipe_name = "gitunpackoffline"
371 self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"')
372 result = bitbake('{}'.format(recipe_name), ignore_status=True)
373 self.assertGreater(result.status, 0, "Build should have failed if ${ is in the path")
374 self.assertTrue(re.search("ERROR: Directory name /.* contains unexpanded bitbake variable. This may cause build failures and WORKDIR polution",
375 result.output), msg = "mkdirhier with unexpanded variable should have failed: %s" % result.output)