diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/hello_world/run_hello_world.sh | 7 | ||||
-rw-r--r-- | test/hello_world/run_hello_world.tcl | 4 | ||||
-rwxr-xr-x | test/run_boot_test.sh | 9 | ||||
-rw-r--r-- | test/run_boot_test.tcl | 16 |
4 files changed, 27 insertions, 9 deletions
diff --git a/test/hello_world/run_hello_world.sh b/test/hello_world/run_hello_world.sh index f72c402..e6f4d86 100755 --- a/test/hello_world/run_hello_world.sh +++ b/test/hello_world/run_hello_world.sh @@ -34,14 +34,13 @@ ulimit -c 0 ( cd external/mambo; cat <<EOF | expect set timeout 30 -spawn $MAMBO_PATH/$MAMBO_BINARY -n -f skiboot.tcl +spawn $MAMBO_PATH/$MAMBO_BINARY -n -f ../../test/hello_world/run_hello_world.tcl expect { timeout { send_user "\nTimeout waiting for hello world\n"; exit 1 } eof { send_user "\nUnexpected EOF\n;" exit 1 } -"Hello World!" +"ATTN" } - -close +wait exit 0 EOF ) diff --git a/test/hello_world/run_hello_world.tcl b/test/hello_world/run_hello_world.tcl new file mode 100644 index 0000000..e44fe16 --- /dev/null +++ b/test/hello_world/run_hello_world.tcl @@ -0,0 +1,4 @@ +source ../../external/mambo/skiboot.tcl + +mysim go +exit
\ No newline at end of file diff --git a/test/run_boot_test.sh b/test/run_boot_test.sh index 5a386a2..d1fb6d0 100755 --- a/test/run_boot_test.sh +++ b/test/run_boot_test.sh @@ -36,17 +36,16 @@ fi OLD_ULIMIT_C=`ulimit -c` ulimit -c 0 -( cd external/mambo; +( cd external/mambo; cat <<EOF | expect set timeout 600 -spawn $MAMBO_PATH/$MAMBO_BINARY -n -f skiboot.tcl +spawn $MAMBO_PATH/$MAMBO_BINARY -n -f ../../test/run_boot_test.tcl expect { timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 } eof { send_user "\nUnexpected EOF\n;" exit 1 } -"Welcome to Petitboot" +"Execution stopped: Sim Support exit requested stop" } - -close +wait exit 0 EOF ) diff --git a/test/run_boot_test.tcl b/test/run_boot_test.tcl new file mode 100644 index 0000000..81f2852 --- /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 |