Message ID | 20240611200156.2245525-24-sjg@chromium.org |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | labgrid: Provide an integration with Labgrid | expand |
On Tue, Jun 11, 2024 at 02:01:37PM -0600, Simon Glass wrote: > When a board is finished with, the lab may want to power it off, or > perform some other function. Add a new script which is called when tests > are complete. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > test/py/u_boot_console_exec_attach.py | 10 ++++++++++ > 1 file changed, 10 insertions(+) Given that all of my wrapper scripts include a "turn it all on" and then catch for "turn everything off", this sounds very handy.
Hi Tom, On Wed, 12 Jun 2024 at 10:02, Tom Rini <trini@konsulko.com> wrote: > > On Tue, Jun 11, 2024 at 02:01:37PM -0600, Simon Glass wrote: > > > When a board is finished with, the lab may want to power it off, or > > perform some other function. Add a new script which is called when tests > > are complete. > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > --- > > > > test/py/u_boot_console_exec_attach.py | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > Given that all of my wrapper scripts include a "turn it all on" and then > catch for "turn everything off", this sounds very handy. Yes I ruined some batteries due to lack of this. I also added a way to tell Labgrid the end state to move to, which also manages to turn off the board, unless something goes wrong in Labgrid. Regards, Simon
diff --git a/test/py/u_boot_console_exec_attach.py b/test/py/u_boot_console_exec_attach.py index 8dd8cc1230c..5f4916b7da2 100644 --- a/test/py/u_boot_console_exec_attach.py +++ b/test/py/u_boot_console_exec_attach.py @@ -70,3 +70,13 @@ class ConsoleExecAttach(ConsoleBase): raise return s + + def close(self): + super().close() + + self.log.action('Releasing board') + args = [self.config.board_type, self.config.board_identity] + cmd = ['u-boot-test-release'] + args + runner = self.log.get_runner(cmd[0], sys.stdout) + runner.run(cmd) + runner.close()
When a board is finished with, the lab may want to power it off, or perform some other function. Add a new script which is called when tests are complete. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/py/u_boot_console_exec_attach.py | 10 ++++++++++ 1 file changed, 10 insertions(+)