All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/19] labgrid: Provide an integration with Labgrid
@ 2024-06-23 20:31 Simon Glass
  2024-06-23 20:31 ` [PATCH v3 01/19] test: Allow signaling that U-Boot is ready Simon Glass
                   ` (18 more replies)
  0 siblings, 19 replies; 47+ messages in thread
From: Simon Glass @ 2024-06-23 20:31 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Simon Glass, Andrejs Cainikovs, Bin Meng,
	Leo Yu-Chi Liang, Love Kumar, Marek Vasut, Sean Anderson

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
    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

Changes in v3:
- Split out most patches into two new series and update cover letter

Changes in v2:
- Only disable echo if a terminal is detected
- Avoid running a docker image for skipped lab tests

Simon Glass (19):
  test: Allow signaling that U-Boot is ready
  test: Use a constant for the test timeout
  test: Pass stderr to stdout
  test: Release board after tests complete
  test: Allow connecting to a running board
  test: Avoid failing skipped tests
  test: Create a common function to get the config
  test: Introduce the concept of a role
  test: Move the receive code into a function
  test: Separate out the exception handling
  test: Detect dead connections
  test: Tidy up remaining exceptions
  test: Introduce lab mode
  test: Improve handling of sending commands
  test: Fix mulptiplex_log typo
  test: Avoid double echo when starting up
  test: Try to shut down the lab console gracefully
  test: Add a section for closing the connection
  CI: Allow running tests on sjg lab

 .gitlab-ci.yml                        | 153 +++++++++++++++++++++++++
 test/py/conftest.py                   |  86 +++++++++++---
 test/py/u_boot_console_base.py        | 154 ++++++++++++++++++--------
 test/py/u_boot_console_exec_attach.py |  31 ++++--
 test/py/u_boot_spawn.py               | 120 +++++++++++++++++---
 test/test-main.c                      |  16 ++-
 6 files changed, 470 insertions(+), 90 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2024-08-22 14:29 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-23 20:31 [PATCH v3 00/19] labgrid: Provide an integration with Labgrid Simon Glass
2024-06-23 20:31 ` [PATCH v3 01/19] test: Allow signaling that U-Boot is ready Simon Glass
2024-06-23 20:31 ` [PATCH v3 02/19] test: Use a constant for the test timeout Simon Glass
2024-06-23 20:31 ` [PATCH v3 03/19] test: Pass stderr to stdout Simon Glass
2024-06-23 20:31 ` [PATCH v3 04/19] test: Release board after tests complete Simon Glass
2024-06-23 20:31 ` [PATCH v3 05/19] test: Allow connecting to a running board Simon Glass
2024-06-23 20:32 ` [PATCH v3 06/19] test: Avoid failing skipped tests Simon Glass
2024-06-24 18:05   ` Tom Rini
2024-06-25 12:38     ` Simon Glass
2024-06-25 14:14       ` Tom Rini
2024-06-26  8:00         ` Simon Glass
2024-06-26 13:56           ` Tom Rini
2024-06-26 13:59             ` Tom Rini
2024-08-22  3:00           ` Simon Glass
2024-08-22 14:11             ` Tom Rini
2024-08-22 14:22               ` Simon Glass
2024-08-22 14:29                 ` Tom Rini
2024-06-23 20:32 ` [PATCH v3 07/19] test: Create a common function to get the config Simon Glass
2024-06-23 20:32 ` [PATCH v3 08/19] test: Introduce the concept of a role Simon Glass
2024-06-24 18:13   ` Tom Rini
2024-06-25 12:38     ` Simon Glass
2024-06-25 14:27       ` Tom Rini
2024-06-26  8:00         ` Simon Glass
2024-06-26 14:29           ` Tom Rini
2024-06-27  8:37             ` Simon Glass
2024-07-02 23:12               ` Tom Rini
2024-07-13 15:13                 ` Simon Glass
2024-07-13 16:57                   ` Tom Rini
2024-07-15  7:11                     ` Simon Glass
2024-07-15 21:03                       ` Tom Rini
2024-07-31 14:39                         ` Simon Glass
2024-06-23 20:32 ` [PATCH v3 09/19] test: Move the receive code into a function Simon Glass
2024-06-23 20:32 ` [PATCH v3 10/19] test: Separate out the exception handling Simon Glass
2024-06-23 20:32 ` [PATCH v3 11/19] test: Detect dead connections Simon Glass
2024-06-23 20:32 ` [PATCH v3 12/19] test: Tidy up remaining exceptions Simon Glass
2024-06-23 20:32 ` [PATCH v3 13/19] test: Introduce lab mode Simon Glass
2024-06-23 20:32 ` [PATCH v3 14/19] test: Improve handling of sending commands Simon Glass
2024-06-23 20:32 ` [PATCH v3 15/19] test: Fix mulptiplex_log typo Simon Glass
2024-06-23 20:32 ` [PATCH v3 16/19] test: Avoid double echo when starting up Simon Glass
2024-06-23 20:32 ` [PATCH v3 17/19] test: Try to shut down the lab console gracefully Simon Glass
2024-06-23 20:32 ` [PATCH v3 18/19] test: Add a section for closing the connection Simon Glass
2024-06-23 20:32 ` [PATCH v3 19/19] CI: Allow running tests on sjg lab Simon Glass
2024-06-24  7:13   ` Andrejs Cainikovs
2024-06-24 14:56     ` Michael Nazzareno Trimarchi
2024-06-24 18:01       ` Tom Rini
2024-06-25 12:30         ` Simon Glass
2024-08-09 16:10           ` Simon Glass

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.