<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/tests/parse.py, branch 5.2_M3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2025-02-05T12:11:01+00:00</updated>
<entry>
<title>bitbake: parse: Forbid ambiguous assignments to ${.}, ${+}, and ${:} variables</title>
<updated>2025-02-05T12:11:01+00:00</updated>
<author>
<name>Nikolai Merinov</name>
<email>n.merinov@inango-systems.com</email>
</author>
<published>2025-02-04T07:13:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b65452bda3cadf53b2a262df3eb43adea88d2401'/>
<id>urn:sha1:b65452bda3cadf53b2a262df3eb43adea88d2401</id>
<content type='text'>
Old code that parse variable names in assignment commands behave differently for
variables that ends with special symbol for single-character variable names and
multi-character variable names. For example:

  A+="1"   # Change variable ${A}, '+' glued to '='
  A+ = "1" # Change variable ${A+}

  +="1"    # Change variable ${+}, the '+' symbol not part of assignment operator
  + = "1"  # Change variable ${+}

New code would always assume that '.=', '+=', and ':=' is assignment operator.
As result code like the following would raise parsing error

  +="value"

While code with extra spaces would work as before

  + = "value" # Change variable ${+}

This change allow to catch issues in code that generate bitbake configuration
files in a manner like "echo ${VARNAME}+=${VALUE} &gt;&gt; conf/local.conf"

(Bitbake rev: 93059aad13a12cd69d86368795c88e5349197d5d)

Signed-off-by: Nikolai Merinov &lt;n.merinov@inango-systems.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests/parse: Add test for unclosed functions</title>
<updated>2025-01-28T14:34:36+00:00</updated>
<author>
<name>Savvas Etairidis</name>
<email>falital@hotmail.com</email>
</author>
<published>2024-09-25T07:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=934828e9638c2ac727618dbe0801ca073668c3a7'/>
<id>urn:sha1:934828e9638c2ac727618dbe0801ca073668c3a7</id>
<content type='text'>
This test covers the handling of unclosed functions.
It tests that both whitespace and tabs generate the
correct exception if added before a closing bracket.
Additionally that a residue blocks generates a error
is tested as well.

[YOCTO #15470]

(Bitbake rev: 29e67acb87ae76879efe9688a69c961a96df10f1)

Signed-off-by: Savvas Etairidis &lt;falital@hotmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests/parse: add test for ?= and ??= operators for variable flags</title>
<updated>2025-01-14T09:51:45+00:00</updated>
<author>
<name>Yoann Congal</name>
<email>yoann.congal@smile.fr</email>
</author>
<published>2025-01-11T14:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a68fb2be37b88a0131236cbe5d20433cf12209a4'/>
<id>urn:sha1:a68fb2be37b88a0131236cbe5d20433cf12209a4</id>
<content type='text'>
Run the test with:
 $ bitbake-selftest bb.tests.parse.ParseTest.test_parse_defaulttest
.
----------------------------------------------------------------------
Ran 1 test in 0.001s

OK

This is a test case for [YOCTO #15685]

(Bitbake rev: d12c80125d810df54379cc4f019a95ab9064ad2c)

Signed-off-by: Yoann Congal &lt;yoann.congal@smile.fr&gt;
Reviewed-by: Ghislain Mangé &lt;ghislain.mange@smile.fr&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb/tests: use bb.build.listtasks() instead of __BBTASKS</title>
<updated>2024-12-13T10:44:35+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2024-11-27T16:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d6f210f69046b881646206e6dac842294ea312e3'/>
<id>urn:sha1:d6f210f69046b881646206e6dac842294ea312e3</id>
<content type='text'>
Use the new listtasks() function (introduced in 185c4b) to avoid
accessing a private variable.

Also use assertSequenceEqual() directly as we don't really care about
the actual type returned, only that it's a sequence.

(Bitbake rev: 452289efc6d3608ceca321286fd5bf417a6e1bed)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: build: Ensure addtask before/after tasknames have prefix applied</title>
<updated>2024-08-13T14:47:55+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-08-12T14:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=997b11a5a12fec2bf43c431052f431edc51c8fe6'/>
<id>urn:sha1:997b11a5a12fec2bf43c431052f431edc51c8fe6</id>
<content type='text'>
"addtask do_XXX before YYY after ZZZ "

where YYY or ZZZ is missing the "do_" prefix don't work as expected. Ajust the
code so that it doesn't just silently do the wrong thing but works as expected.

Expand a test case to cover this.

(Bitbake rev: 21670b9bb8936ec44aedff26163948bbc2ceb44a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: BBHandler/ast: Improve addtask handling</title>
<updated>2024-08-13T14:47:55+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-08-12T14:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5226f46342cae47cb96fafb725dc082ef206f9e8'/>
<id>urn:sha1:5226f46342cae47cb96fafb725dc082ef206f9e8</id>
<content type='text'>
The recent addtask improvement to handle comments complicated the regex significantly
and there are already a number of corner cases in that code which aren't handled well.

Instead of trying to complicate the regex further, switch to code logic instead. This
means the following cases are now handled:

* addtask with multiple task names
* addtask with multiple before constraints
* addtask with multiple after constraints

The testcase is updated to match the improvements.

(Bitbake rev: 417016b83c21fca7616b2ee768d5d08e1edd1e06)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: BBHandler: Handle comments in addtask/deltask</title>
<updated>2024-08-13T14:47:55+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-08-06T19:30:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=60cba6a0735d8f8ef690fc2e5db9148066cb18f6'/>
<id>urn:sha1:60cba6a0735d8f8ef690fc2e5db9148066cb18f6</id>
<content type='text'>
Technically our syntax would allow for comments after an addtask/deltask.
Currently these get silently processed in various ways by the code which
is bad.

Tweak the regex to drop any comments and add test cases to ensure this
continues to work in the future.

[YOCTO #15250]

(Bitbake rev: 64f8796e55a8826ffec0d76b993c8256713f67a3)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: ast: Fix EXPORT_FUNCTIONS bug</title>
<updated>2024-01-10T13:55:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-01-09T13:47:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c665a2c93337fc372207af604c21bdea5babb4e5'/>
<id>urn:sha1:c665a2c93337fc372207af604c21bdea5babb4e5</id>
<content type='text'>
If you have two classes, both of which set EXPORT_FUNCTIONS for the same funciton
and a standard funciton definition for the function that is exported, the export
function can sometimes overwrite the standard one.

The issue is that the internal flag the code uses isn't ovweritten if the variable
is giving a new value. Fix the issue by using a comment in the code that is injected
so that we know if it is ours or not.

Also add some testing for EXPORT_FUNCTIONS, not perfect but a start.

(Bitbake rev: 66306d5151acb0a26a171c338d8f60eb9eb16c6b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: tests: Use assertLogs to test logging output</title>
<updated>2023-06-27T14:28:56+00:00</updated>
<author>
<name>Peter Hoyes</name>
<email>Peter.Hoyes@arm.com</email>
</author>
<published>2023-06-16T12:36:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fd1d2c6dc73e084918b4290214652bcff9b99261'/>
<id>urn:sha1:fd1d2c6dc73e084918b4290214652bcff9b99261</id>
<content type='text'>
By default, pytest captures all stdout and exposes it using its built-in
fixtures (capsys, caplog etc), so stdout does not support getvalue().

To support running tests using both unittest and pytest, use assertLogs
to capture logging and assert on the log output instead.

(Bitbake rev: 2d28caa01bab9540d2bbaf713ae3e5c563d003f5)

Signed-off-by: Peter Hoyes &lt;Peter.Hoyes@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: ConfHandler: Allow variable flag name with a single character</title>
<updated>2023-04-13T11:01:45+00:00</updated>
<author>
<name>Kai Kang</name>
<email>kai.kang@windriver.com</email>
</author>
<published>2023-04-11T09:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a99566dac13f0ec1e91fd79c5b78395f3ee0ef56'/>
<id>urn:sha1:a99566dac13f0ec1e91fd79c5b78395f3ee0ef56</id>
<content type='text'>
Update regex pattern to allow variable flag name with a single character.

Regression tests have also been updated in `bb.parse` and
`bin/bitbake-selftest -k ParseTest` has been successfully executed.

Eliminate a trailing space as well.

(Bitbake rev: bb9e523291a3cad6e1596ee6a1e715b5e5feba8f)

Signed-off-by: Kai Kang &lt;kai.kang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
