summaryrefslogtreecommitdiff
path: root/tests/shell_interaction.expect
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2024-08-13 11:13:27 +0200
committerHelmut Grohne <helmut@subdivi.de>2024-08-13 11:34:23 +0200
commita2c00ecbe9e5313a6dd9417e6e31bf6a703cc245 (patch)
treef232ffa73cc2c6d04720f9feb454ac83fd3cd2a4 /tests/shell_interaction.expect
parentf35ef9a20fabfd6e57db83136dc4486fe7757bdc (diff)
downloaddebvm-a2c00ecbe9e5313a6dd9417e6e31bf6a703cc245.tar.gz
test for autologin to work using expect
Diffstat (limited to 'tests/shell_interaction.expect')
-rwxr-xr-xtests/shell_interaction.expect15
1 files changed, 15 insertions, 0 deletions
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