]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: Release board after tests complete
authorSimon Glass <sjg@chromium.org>
Tue, 12 Nov 2024 14:13:16 +0000 (07:13 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 13 Nov 2024 18:01:35 +0000 (12:01 -0600)
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.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
test/py/u_boot_console_exec_attach.py

index 8dd8cc1230ce1d617aea340c462938062a274bb7..5f4916b7da20a3ae77da3c9703ed74e3557dfac4 100644 (file)
@@ -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()