lib/bb/tests: use bb.build.listtasks() instead of __BBTASKS
PATCH 1/1 lib/bb/tests: use bb.build.listtasks() instead of __BBTASKS
Use the new listtasks() function (introduced in 185c4b) to avoid accessing a private variable.
--- bitbake/lib/bb/tests/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/tests/parse.py +1 -1
@@ -201,7 +201,7 @@ deltask ${EMPTYVAR} f = self.parsehelper(self.addtask_deltask) d = bb.parse.handle(f.name, self.d)[''] - self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2', 'do_mytask5'], d.getVar("__BBTASKS")) + self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2', 'do_mytask5'], bb.build.listtasks(d)) self.assertEqual(['do_mytask'], d.getVarFlag("do_mytask5", "deps")) broken_multiline_comment = """
Signature · 1 line
2.34.1
Quoted 5 lines · Ross Burton via lists.openembedded.org
Use the new
listtasks()function (introduced in 185c4b) to avoid accessing a private variable.Signed-off-by Ross Burton <[email protected]>---
Hi Ross,
I believe some oe-selftest will need update after this modification. I have the following error on the autobuilder:
FAIL: test_parse_addtask_deltask (bb.tests.parse.ParseTest.test_parse_addtask_deltask)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/tests/parse.py", line 204, in test_parse_addtask_deltask
self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2', 'do_mytask5'], bb.build.listtasks(d))
AssertionError: ['do_fetch2', 'do_patch2', 'do_myplaintas[39 chars]sk5'] != ('do_fetch2', 'do_patch2', 'do_myplaintas[39 chars]sk5')
https://valkyrie.yoctoproject.org/#/builders/48/builds/502/steps/11/logs/stdio
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 13 lines · Mathieu Dubois-Briand
Quoted 5 lines · Ross Burton via lists.openembedded.org
Use the new
listtasks()function (introduced in 185c4b) to avoid accessing a private variable.Signed-off-by Ross Burton <[email protected]>---
Hi Ross,
I believe some oe-selftest will need update after this modification. I have the following error on the autobuilder:
Quoted 6 lines
FAIL:
test_parse_addtask_deltask(bb.tests.parse.ParseTest.test_parse_addtask_deltask)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/tests/parse.py", line 204, intest_parse_addtask_deltask
self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2', 'do_mytask5'],bb.build.listtasks(d))
AssertionError: ['do_fetch2', 'do_patch2', 'do_myplaintas[39 chars]sk5'] != ('do_fetch2', 'do_patch2', 'do_myplaintas[39 chars]sk5’)
I thought I’d ran the test suite but it looks like it’s moaning about the type of the container. Sorry, I’ll fix up.
Ross