summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/create-and-run.sh2
-rwxr-xr-xtests/shell_interaction.expect15
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/create-and-run.sh b/tests/create-and-run.sh
index 228ca6c..2553a21 100755
--- a/tests/create-and-run.sh
+++ b/tests/create-and-run.sh
@@ -58,3 +58,5 @@ test "$RELEASE" = jessie && set -- -o PubkeyAcceptedKeyTypes=+ssh-rsa "$@"
debvm-waitssh -t 540 "$SSH_PORT"
run_ssh "$@" poweroff
wait
+
+"$(dirname "$0")/shell_interaction.expect" -- -i "$IMAGE"
diff --git a/tests/shell_interaction.expect b/tests/shell_interaction.expect
new file mode 100755
index 0000000..325e476
--- /dev/null
+++ b/tests/shell_interaction.expect
@@ -0,0 +1,15 @@
+#!/usr/bin/expect
+set args [lrange $argv 0 end]
+set timeout 300
+spawn debvm-run {*}$args
+expect "root@testvm:~#"
+set timeout 10
+send "echo 6coF0JBW\$((2+3))\r"
+expect {
+ "6coF0JBW5" { }
+ timeout { exit 1 }
+}
+expect "root@testvm:~#"
+send "poweroff\r"
+set timeout 120
+expect eof