<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/py/conftest.py, branch v2025.07-rc3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/test/py/conftest.py?h=v2025.07-rc3</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/test/py/conftest.py?h=v2025.07-rc3'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2025-05-18T07:16:51Z</updated>
<entry>
<title>test: allow multiple config options in buildconfigspec</title>
<updated>2025-05-18T07:16:51Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-05-03T13:31:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2bac578c5abae233cc855f79791a2846c9a99518'/>
<id>urn:sha1:2bac578c5abae233cc855f79791a2846c9a99518</id>
<content type='text'>
In some cases we have alternative configuration options that supply the
same functionality, e.g CONFIG_NET and CONFIG_NET_LWIP.

Allow to specify all of them as arguments for buildconfigspec() and execute
the text if any of these is fulfilled, e.g.

    @pytest.mark.buildconfigspec('net', 'net_lwip')

Update the documentation.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Acked-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test/py: Allow tests to be filtered by role</title>
<updated>2025-04-03T17:41:55Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-03-15T14:25:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9a04b9a4392fc0ee49596bb63b7706beb29034de'/>
<id>urn:sha1:9a04b9a4392fc0ee49596bb63b7706beb29034de</id>
<content type='text'>
Some test can only be run by a particular board in a lab, e.g. because
they are loaded with an OS image used by the test. Add a way to specify
this in tests.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test/py: Show info about module-loading</title>
<updated>2025-03-15T11:47:05Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-09T16:07:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0043428777f8b4dabd8124aa60f53fc7a14c9369'/>
<id>urn:sha1:0043428777f8b4dabd8124aa60f53fc7a14c9369</id>
<content type='text'>
It is sometimes tricky to figure out what modules test.py is loading
when it starts up. The result can be a silent failure with no clue as to
what when wrong.

Add a section which lists the modules loaded as well as those not
found.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test/py: Drop u_boot_ prefix on test files</title>
<updated>2025-03-15T11:02:04Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-09T16:07:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d9ed4b75add4b4ccc37cf32b54cd9c77f48e3396'/>
<id>urn:sha1:d9ed4b75add4b4ccc37cf32b54cd9c77f48e3396</id>
<content type='text'>
We know this is U-Boot so the prefix serves no purpose other than to
make things longer and harder to read. Drop it and rename the files.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # test_android / test_dfu
</content>
</entry>
<entry>
<title>test/py: Shorten u_boot_console</title>
<updated>2025-03-15T10:38:38Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-09T16:07:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=752c3769874596d012cd8325099d2ae20123f989'/>
<id>urn:sha1:752c3769874596d012cd8325099d2ae20123f989</id>
<content type='text'>
This fixture name is quite long and results in lots of verbose code.
We know this is U-Boot so the 'u_boot_' part is not necessary.

But it is also a bit of a misnomer, since it provides access to all the
information available to tests. It is not just the console.

It would be too confusing to use con as it would be confused with
config and it is probably too short.

So shorten it to 'ubman'.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/
</content>
</entry>
<entry>
<title>test/py: Add a report show test durations</title>
<updated>2025-01-30T20:34:51Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-01-27T14:52:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5e46a06950a9bc6a4e70e20b90a903fe55eca025'/>
<id>urn:sha1:5e46a06950a9bc6a4e70e20b90a903fe55eca025</id>
<content type='text'>
Execution time varies widely with the existing tests. Provides a way to
produce a summary of the time taken for each test, along with a
histogram.

This is enabled with the --timing flag.

Enable it for sandbox in CI.

Example:

   Duration : Number of tests
   ======== : ========================================
       &lt;1ms :  1
       &lt;8ms :  1
      &lt;20ms : # 20
      &lt;30ms : ######## 127
      &lt;50ms : ######################################## 582
      &lt;75ms : ####### 102
     &lt;100ms : ## 39
     &lt;200ms : ##### 86
     &lt;300ms : # 29
     &lt;500ms : ## 42
     &lt;750ms : # 16
      &lt;1.0s : # 15
      &lt;2.0s : # 23
      &lt;3.0s :  13
      &lt;5.0s :  9
      &lt;7.5s :  1
     &lt;10.0s :  6
     &lt;20.0s :  12

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>test/py: Handle u-boot-test-getrole failure</title>
<updated>2025-01-25T22:27:24Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-12-14T18:20:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=64d5a0550a148c9266f5f66538f0d56bb2278bef'/>
<id>urn:sha1:64d5a0550a148c9266f5f66538f0d56bb2278bef</id>
<content type='text'>
This script can fail if there is no toolchain available for the board.
At present this is not handled very nicely, in that only the error
output is reported. It is much more useful to see everything, so
combine stdout and stderr and report them both.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test/py: Provide the correct U_BOOT_SOURCE_DIR to getrole</title>
<updated>2025-01-25T22:27:24Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-12-14T18:20:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ba87a2fcfbfb79813983f106c212684907ca6c55'/>
<id>urn:sha1:ba87a2fcfbfb79813983f106c212684907ca6c55</id>
<content type='text'>
The u-boot-test-getrole script runs before the normal environment
variables have been set up. This is unavoidable since the script is
providing necessary information to test.py

This means that U_BOOT_SOURCE_DIR is not set in the environment.

As a result, Labgrid uses its default source path, configured in its
environment variable. While this may happen to work, it is not correct.
Also, it causes problems when running from Gitlab, where the runner may
not have access to that source path.

Provide the required source path in U_BOOT_SOURCE_DIR so that Labgrid
does the right thing.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Fixes: bf89a8f1fc2 ("test: Introduce the concept of a role")

[1] https://patchwork.ozlabs.org/project/uboot/patch/20241211131858.520639-1-sjg@chromium.org/
</content>
</entry>
<entry>
<title>test: Drop the _test suffix on linker lists</title>
<updated>2025-01-24T20:34:40Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-01-20T21:25:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4ba3ab4901c564725c37e927e2ba29595712cd9d'/>
<id>urn:sha1:4ba3ab4901c564725c37e927e2ba29595712cd9d</id>
<content type='text'>
Most test suites have a _test suffix. This is not necessary as there is
also a ut_ prefix.

Drop the suffix so that (with future work) the suite name can be used as
the linker-list name.

Remove the suffix from the pytest regex as well, moving it to the top of
the file, as it is a constant.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test/py: Always use the current dir as the source tree</title>
<updated>2024-12-17T15:11:43Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-12-11T13:18:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a8f09d62821750aa755a8fe40bb72febc9154f20'/>
<id>urn:sha1:a8f09d62821750aa755a8fe40bb72febc9154f20</id>
<content type='text'>
The logic in get_details() retrieves the default source directory from
the Labgrid settings. This is convenient for interactive use, since it
allows pytests to be run from any directory and still find the source
tree.

However, it is not actually correct.

Gitlab sets the current directory to the source tree and expects that to
be used. At present it is ignored. The result is that Gitlab builds
whatever happens to be in the default source directory, ignoring the
tree it is supposed to be building.

Fix this by using the directory of the source tree, always. This is
obtained by looking at the grandparent of the conftest.py file.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reported-by: Tom Rini &lt;trini@konsulko.com&gt;
Fixes: bf89a8f1fc2 ("test: Introduce the concept of a role")
Tested-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
</feed>
