summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2013-07-20 09:55:09 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2013-07-20 09:55:09 +0200
commitb0ba370bfbf6159ab90f79475ac69124553cc50f (patch)
treecc6560bfe6a07fd58ee9b5d7ebd850f7e6b8b7a7 /test.py
Added multithreading test for QEMU.qemu
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/test.py b/test.py
new file mode 100755
index 0000000..481b36d
--- /dev/null
+++ b/test.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+import subprocess, time
+
+qemu = subprocess.Popen(
+ 'qemu-system-arm -machine lm3s6965evb -nographic -serial null -semihosting -kernel demo.elf -S'.split(),
+ stdin = subprocess.PIPE,
+ stdout = subprocess.PIPE,
+ stderr = subprocess.PIPE,
+)
+
+qemu.stdin.write('cont\n')
+
+start = time.time();
+
+while 1:
+ line = qemu.stderr.readline()
+ t = time.time()
+
+ if not line:
+ break
+
+ print '[%11.6f] %s' % (t - start, line.strip())