public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] pytest:Shutdown power-supply to board after the pytest execution
@ 2021-05-27  8:33 opensource.kab
  2021-05-27 21:42 ` Stephen Warren
  0 siblings, 1 reply; 3+ messages in thread
From: opensource.kab @ 2021-05-27  8:33 UTC (permalink / raw)
  To: u-boot
  Cc: wd, Adarsh Babu Kalepalli, Heinrich Schuchardt, Marek Behún,
	Simon Glass, Stephen Warren

From: Adarsh Babu Kalepalli <opensource.kab@gmail.com>

After executing the test-cases from pytest ,the board
is still powered.Shutting down the board power supply at
this point ,would keep the board safe.

Signed-off-by: Adarsh Babu Kalepalli <opensource.kab@gmail.com>
---

 test/py/conftest.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test/py/conftest.py b/test/py/conftest.py
index 11a3f307ea..077358a37f 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -406,6 +406,13 @@ def cleanup():
     """
 
     if console:
+        if ((console.config.board_type != "sandbox") and (console.config.board_type != "sandbox64")):
+            args = [console.config.board_type, console.config.board_identity]
+            console.log.action('Powering Down the board')
+            cmd = ['u-boot-test-power-off'] + args
+            runner = console.log.get_runner(cmd[0], sys.stdout)
+            runner.run(cmd)
+            runner.close()
         console.close()
     if log:
         with log.section('Status Report', 'status_report'):
-- 
2.17.1


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

end of thread, other threads:[~2021-05-29 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-27  8:33 [PATCH] pytest:Shutdown power-supply to board after the pytest execution opensource.kab
2021-05-27 21:42 ` Stephen Warren
2021-05-29 13:09   ` Adarsh Babu Kalepalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox