From a2c00ecbe9e5313a6dd9417e6e31bf6a703cc245 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 13 Aug 2024 11:13:27 +0200 Subject: test for autologin to work using expect --- tests/shell_interaction.expect | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tests/shell_interaction.expect (limited to 'tests/shell_interaction.expect') 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 -- cgit v1.2.3