<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/py/conftest.py, branch v2026.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>test/py: Correct handling of exceptions</title>
<updated>2025-06-12T17:32:29+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-05-29T14:14:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2ab10ed2399b0c1c790733884935c94ad65aa2a8'/>
<id>2ab10ed2399b0c1c790733884935c94ad65aa2a8</id>
<content type='text'>
If an Unexpected exception is thrown in a test, an undefined variable
error is reported. Fix this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Fixes: 85d7dae377a ("test: Detect dead connections")
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If an Unexpected exception is thrown in a test, an undefined variable
error is reported. Fix this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Fixes: 85d7dae377a ("test: Detect dead connections")
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Use the correct fixture name in exception handler</title>
<updated>2025-06-12T17:32:29+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-05-29T14:14:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ef82e45c2ef5278493576708d6aafd686ba77af9'/>
<id>ef82e45c2ef5278493576708d6aafd686ba77af9</id>
<content type='text'>
If a BootFail exception is thrown in a test, it is not handled
correctly. Use the correct fixture variable 'ubman_fix' to resolve this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Fixes: d9ed4b75add ("test/py: Drop u_boot_ prefix on test files")
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a BootFail exception is thrown in a test, it is not handled
correctly. Use the correct fixture variable 'ubman_fix' to resolve this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Fixes: d9ed4b75add ("test/py: Drop u_boot_ prefix on test files")
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: allow multiple config options in buildconfigspec</title>
<updated>2025-05-18T07:16:51+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-05-03T13:31:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2bac578c5abae233cc855f79791a2846c9a99518'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Allow tests to be filtered by role</title>
<updated>2025-04-03T17:41:55+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-03-15T14:25:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9a04b9a4392fc0ee49596bb63b7706beb29034de'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Show info about module-loading</title>
<updated>2025-03-15T11:47:05+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-09T16:07:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0043428777f8b4dabd8124aa60f53fc7a14c9369'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Drop u_boot_ prefix on test files</title>
<updated>2025-03-15T11:02:04+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-09T16:07:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d9ed4b75add4b4ccc37cf32b54cd9c77f48e3396'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Shorten u_boot_console</title>
<updated>2025-03-15T10:38:38+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-09T16:07:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=752c3769874596d012cd8325099d2ae20123f989'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Add a report show test durations</title>
<updated>2025-01-30T20:34:51+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-01-27T14:52:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5e46a06950a9bc6a4e70e20b90a903fe55eca025'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Handle u-boot-test-getrole failure</title>
<updated>2025-01-25T22:27:24+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-12-14T18:20:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=64d5a0550a148c9266f5f66538f0d56bb2278bef'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Provide the correct U_BOOT_SOURCE_DIR to getrole</title>
<updated>2025-01-25T22:27:24+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-12-14T18:20:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ba87a2fcfbfb79813983f106c212684907ca6c55'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/
</pre>
</div>
</content>
</entry>
</feed>
