]> git.dujemihanovic.xyz Git - u-boot.git/commit
test: Try to shut down the lab console gracefully
authorSimon Glass <sjg@chromium.org>
Tue, 12 Nov 2024 14:13:22 +0000 (07:13 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 13 Nov 2024 18:01:35 +0000 (12:01 -0600)
commit082f3359c7e0dc7bc2f91baaac992eba18e72e0f
treeb4b39d841893ec44819ff831047d636df71db857
parent5825ddccc6e5fc6bac1a91c3be013443d84a8aed
test: Try to shut down the lab console gracefully

Send the Labgrid quit characters to ask it to exit gracefully. This
typically allows it to power off the board being used. Only do this when
labgrid is being used (detected with an env var).

If that doesn't work, try the less graceful approach.

The normal approach for pytest is to simply kill the child process. This
makes Labgrid exit immediately. Thus it does not get a chance to execute
the 'off' part of strategy (which may power it off) and release the
device.

Without this, every board disconnect leaves the board in a bad state,
requiring separate steps to recover the board, then power it off.

The action is conditional on since USE_LABGRID_SJG being set, so only
affects operation if the Labgrid-sjg integration is being used.

Signed-off-by: Simon Glass <sjg@chromium.org>
test/py/u_boot_spawn.py