u-boot/test
Simon Glass 8308a5eed6 test: Introduce lab mode
There is quite a bit of code in pytest to try to start up U-Boot on a
board, with timeouts, expects, etc.

This is tedious to maintain and is peripheral to the test system's
purpose. It seems better to put this logic in the lab itself, where is
can provide such support.

With Labgrid we can use the UbootStrategy class to get the board into a
useful state, however it needs to do it. Then it can report to pytest
by writing a suitable string along with the U-Boot version it detected.

Add support for detecting 'lab mode' and simply assume that all is well
in that case. Collect the version string when Labgrid says it is ready.

This is only used with the Labgrid-sjg integration. When Labgrid starts
the UbootStrategy it checks if U_BOOT_SOURCE_DIR is set. If so it emits
a string '{lab mode}' that tells test.py to simply wait for an
indication that the board is ready. All banner-checking is skipped. The
indication comes in the form of another string 'Lab: Board is ready'
which Labgrid sends once the board is sitting at a prompt ready to run
tests. Then test.py emits 'U-Boot is ready' and continues with testing.

Note that Labgrid has the same kind of "check for a string" logic that
is in test.py, except it's not caring about the correct number / order
of banner prints. This checking could be added, however. If something
fails, the complete output is shown, so it is possible to see what went
wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-13 12:01:35 -06:00
..
boot test: efi: boot: Add a test for the efi bootmeth 2024-11-09 10:01:47 +01:00
cmd x86: coreboot: Allow building an expo for editing CMOS config 2024-11-03 21:27:12 -06:00
common test: Use UTF_CONSOLE in remaining tests 2024-08-26 18:51:49 -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 test: fs: fs-test: Move the tests to use sha256sum 2024-01-11 21:19:25 -05:00
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 alist: Add a way to efficiently filter an alist 2024-11-03 21:27:12 -06:00
log Merge patch series "Tidy up console recording in tests" 2024-08-26 18:52:18 -06:00
optee Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"" 2024-05-19 08:16:36 -06:00
overlay test/overlay: Make this depend on SANDBOX 2024-08-23 15:59:39 -06:00
py test: Introduce lab mode 2024-11-13 12:01:35 -06:00
stdint Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"" 2024-05-19 08:16:36 -06:00
trace
bloblist.c bloblist: test: Mark tests with UTF_BLOBLIST 2024-11-03 21:27:12 -06:00
bootm.c test: bootm: Ensure GD_FLG_SILENT is reset 2024-11-04 14:49:06 -06:00
cmd_ut.c global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:48 -06:00
command_ut.c Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"" 2024-05-19 08:16:36 -06:00
common.sh
compression.c test: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
Kconfig test: Remove ASN1 library test 2024-10-14 17:58:52 -06:00
Makefile global: Rename SPL_ to XPL_ 2024-10-11 11:44:48 -06:00
print_ut.c test: Use UTF_CONSOLE in remaining tests 2024-08-26 18:51:49 -06:00
run test: Run the VPL tests with 'make check' 2023-04-03 06:53:53 +12:00
str_ut.c lib: Handle a special case with str_to_list() 2024-08-07 08:49:10 -06:00
test-main.c test: Allow saving and restoring the bloblist 2024-11-03 21:27:12 -06:00
time_ut.c Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"" 2024-05-19 08:16:36 -06:00
unicode_ut.c Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"" 2024-05-19 08:16:36 -06:00
ut.c test: Fail when an empty line is expected but not present 2024-08-26 18:51:48 -06:00