summaryrefslogtreecommitdiffstats
path: root/test/run_boot_test.tcl
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-05-25 14:33:42 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-25 14:33:42 +1000
commit23dcbc3adee2c6ea4e6c1149ef9fc6b59de581fa (patch)
tree3257e4ab0eeb1e24a35b4c03a0592ecc6d90fd29 /test/run_boot_test.tcl
parent1978024139af7bd4451b1561f71abb57f7adc9d8 (diff)
downloadtalos-skiboot-23dcbc3adee2c6ea4e6c1149ef9fc6b59de581fa.tar.gz
talos-skiboot-23dcbc3adee2c6ea4e6c1149ef9fc6b59de581fa.zip
Refactor mambo test running
we now properly control the simulation rather than just killing off Mambo. For boot test, we wait for petitboot and actually shut down the simulation properly with 'halt'. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'test/run_boot_test.tcl')
-rw-r--r--test/run_boot_test.tcl16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/run_boot_test.tcl b/test/run_boot_test.tcl
new file mode 100644
index 00000000..81f2852b
--- /dev/null
+++ b/test/run_boot_test.tcl
@@ -0,0 +1,16 @@
+source ../../external/mambo/skiboot.tcl
+
+proc console_trigger {response args} {
+ array set triginfo $args
+ set sim $triginfo(sim)
+ $sim trigger clear console $triginfo(match)
+
+ puts "console trigger: putting $response to console"
+ $sim console create input in string $response
+}
+
+mysim trigger set console "Welcome to Petitboot" { console_trigger "x" }
+mysim trigger set console "# " { console_trigger "halt\n" }
+
+mysim go
+exit \ No newline at end of file
OpenPOWER on IntegriCloud