u-boot/test
Tom Rini 8573ea4105 Merge patch series "labgrid: Provide an integration with Labgrid"
Simon Glass <sjg@chromium.org> says:

Labgrid provides access to a hardware lab in an automated way. It is
possible to boot U-Boot on boards in the lab without physically touching
them. It relies on relays, USB UARTs and SD muxes, among other things.

By way of background, about 4 years ago I wrong a thing called Labman[1]
which allowed my lab of about 30 devices to be operated remotely, using
tbot for the console and build integration. While it worked OK and I
used it for many bisects, I didn't take it any further.

It turns out that there was already an existing program, called Labgrid,
which I did not know about at time (thank you Tom for telling me). It is
more rounded than Labman and has a number of advantages:

- does not need udev rules, mostly
- has several existing users who rely on it
- supports multiple machines exporting their devices

It lacks a 'lab check' feature and a few other things, but these can be
remedied.

On and off over the past several weeks I have been experimenting with
Labgrid. I have managed to create an initial U-Boot integration (this
series) by adding various features to Labgrid[2] and the U-Boot test
hooks.

I hope that this might inspire others to set up boards and run tests
automatically, rather than relying on infrequent, manual test. Perhaps
it may even be possible to have a number of labs available.

Included in the integration are a number of simple scripts which make it
easy to connect to boards and run tests:

ub-int <target>
    Build and boot on a target, starting an interactive session

ub-cli <target>
    Build and boot on a target, ensure U-Boot starts and provide an interactive
    session from there

ub-smoke <target>
    Smoke test U-Boot to check that it boots to a prompt on a target

ub-bisect <target>
    Bisect a git tree to locate a failure on a particular target

ub-pyt <target> <testspec>
    Run U-Boot pytests on a target

Some of these help to provide the same tbot[4] workflow which I have
relied on for several years, albeit much simpler versions.

The goal here is to create some sort of script which can collect
patches from the mailing list, apply them and test them on a selection
of boards. I suspect that script already exists, so please let me know
what you suggest.

I hope you find this interesting and take a look!

[1] https://github.com/sjg20/u-boot/tree/lab6a
[2] https://github.com/labgrid-project/labgrid/pull/1411
[3] https://github.com/sjg20/uboot-test-hooks/tree/labgrid
[4] https://tbot.tools/index.html

Link: https://lore.kernel.org/r/20241112141326.643128-1-sjg@chromium.org
[trini: Move the sjg-lab job to prior to world build, to fix pipeline
        status]
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-13 16:39:19 -06:00
..
boot Merge patch series "test: Tidy up the test/ directory" 2024-11-13 16:02:58 -06:00
cmd Merge patch series "test: Tidy up the test/ directory" 2024-11-13 16:02:58 -06:00
common Merge patch series "test: Tidy up the test/ directory" 2024-11-13 16:02:58 -06:00
dm dm: core: Add a function to see if a device exists 2024-11-03 21:27:12 -06:00
env test: Rename UTF_CONSOLE_REC to UTF_CONSOLE 2024-08-26 18:51:49 -06:00
fs
fuzz global: Rename SPL_ to XPL_ 2024-10-11 11:44:48 -06:00
hush test/hush: Add CONFIG_CONSOLE_RECORD where required 2024-10-29 16:17:47 -06:00
image spl: Create a function to init spl_load_info 2024-08-23 15:58:42 -06:00
lib Merge patch series "test: Tidy up the test/ directory" 2024-11-13 16:02:58 -06:00
log Merge patch series "Tidy up console recording in tests" 2024-08-26 18:52:18 -06:00
optee
overlay test/overlay: Make this depend on SANDBOX 2024-08-23 15:59:39 -06:00
py test: Correct regex string in test_spi 2024-11-13 12:01:35 -06:00
stdint
cmd_ut.c test: Move time tests into the lib suite 2024-11-13 11:56:02 -06:00
Kconfig test: Remove ASN1 library test 2024-10-14 17:58:52 -06:00
Makefile test: Move time_ut test into lib 2024-11-13 11:56:02 -06:00
run
test-main.c Merge patch series "test: Tidy up the test/ directory" 2024-11-13 16:02:58 -06:00
ut.c test: Fail when an empty line is expected but not present 2024-08-26 18:51:48 -06:00