public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] test/py: provide example scripts for integrating qemu
@ 2017-09-17 19:32 Heinrich Schuchardt
  2017-09-18 17:33 ` Stephen Warren
  2017-09-18 18:27 ` Stephen Warren
  0 siblings, 2 replies; 11+ messages in thread
From: Heinrich Schuchardt @ 2017-09-17 19:32 UTC (permalink / raw)
  To: u-boot

The necessary parameters for running Python tests on qemu are
tediouus to find.

The patch adds examples for u-boot-test-console and
u-boot-test-reset.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 test/py/README.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/test/py/README.md b/test/py/README.md
index 829c7efbb2..f3ad10df5a 100644
--- a/test/py/README.md
+++ b/test/py/README.md
@@ -197,6 +197,23 @@ simulator includes a virtual reset button! If not, you can launch the
 simulator from `u-boot-test-reset` instead, while arranging for this console
 process to always communicate with the current simulator instance.
 
+With qemu you can use the parameter -monitor to connect the control console to a
+Unix socket, e.g.
+
+    #!/bin/sh
+    touch /tmp/u-boot-monitor-socket
+    qemu-system-x86_64 -bios build-qemu-x86/u-boot.rom -nographic -netdev \
+    user,id=eth0,tftp=../tftp,net=192.168.76.0/24,dhcpstart=192.168.76.9 \
+    -device e1000,netdev=eth0 -machine pc-i440fx-2.8 \
+    -monitor unix:/tmp/u-boot-monitor-socket,server,nowait
+
+In `u-boot-test-reset` call the socat command to send a system reset:
+
+    #!/bin/sh
+    echo system_reset | socat - UNIX-CONNECT:/tmp/u-boot-monitor-socket
+    sleep 1
+    true
+
 #### `u-boot-test-flash`
 
 Prior to running the test suite against a board, some arrangement must be made
-- 
2.11.0

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

end of thread, other threads:[~2017-09-20 15:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-17 19:32 [U-Boot] [PATCH 1/1] test/py: provide example scripts for integrating qemu Heinrich Schuchardt
2017-09-18 17:33 ` Stephen Warren
2017-09-18 17:48   ` Tom Rini
2017-09-18 18:13   ` Heinrich Schuchardt
2017-09-18 18:27 ` Stephen Warren
2017-09-18 19:55   ` Heinrich Schuchardt
2017-09-18 21:28     ` Stephen Warren
2017-09-18 21:37       ` Heinrich Schuchardt
2017-09-19 16:18         ` Stephen Warren
2017-09-19 20:15       ` Heinrich Schuchardt
2017-09-20 15:52         ` Stephen Warren

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