All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/bb/tests: use bb.build.listtasks() instead of __BBTASKS
@ 2024-12-04 10:19 Ross Burton
  2024-12-04 17:29 ` [bitbake-devel] " Mathieu Dubois-Briand
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2024-12-04 10:19 UTC (permalink / raw)
  To: bitbake-devel

Use the new listtasks() function (introduced in 185c4b) to avoid
accessing a private variable.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 bitbake/lib/bb/tests/parse.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py
index 410679d5a1b..c31ece3d75c 100644
--- a/bitbake/lib/bb/tests/parse.py
+++ b/bitbake/lib/bb/tests/parse.py
@@ -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 = """
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [bitbake-devel] [PATCH] lib/bb/tests: use bb.build.listtasks() instead of __BBTASKS
  2024-12-04 10:19 [PATCH] lib/bb/tests: use bb.build.listtasks() instead of __BBTASKS Ross Burton
@ 2024-12-04 17:29 ` Mathieu Dubois-Briand
  2024-12-04 17:46   ` Ross Burton
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Dubois-Briand @ 2024-12-04 17:29 UTC (permalink / raw)
  To: ross.burton, bitbake-devel

On Wed Dec 4, 2024 at 11:19 AM CET, Ross Burton via lists.openembedded.org wrote:
> Use the new listtasks() function (introduced in 185c4b) to avoid
> accessing a private variable.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---

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

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [bitbake-devel] [PATCH] lib/bb/tests: use bb.build.listtasks() instead of __BBTASKS
  2024-12-04 17:29 ` [bitbake-devel] " Mathieu Dubois-Briand
@ 2024-12-04 17:46   ` Ross Burton
  0 siblings, 0 replies; 3+ messages in thread
From: Ross Burton @ 2024-12-04 17:46 UTC (permalink / raw)
  To: Mathieu Dubois-Briand; +Cc: bitbake-devel@lists.openembedded.org

On 4 Dec 2024, at 17:29, Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> wrote:
> 
> On Wed Dec 4, 2024 at 11:19 AM CET, Ross Burton via lists.openembedded.org wrote:
>> Use the new listtasks() function (introduced in 185c4b) to avoid
>> accessing a private variable.
>> 
>> Signed-off-by: Ross Burton <ross.burton@arm.com>
>> ---
> 
> 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’)

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-04 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 10:19 [PATCH] lib/bb/tests: use bb.build.listtasks() instead of __BBTASKS Ross Burton
2024-12-04 17:29 ` [bitbake-devel] " Mathieu Dubois-Briand
2024-12-04 17:46   ` Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.