1
0

min-copy-clocure test: ensure sshd up before starting

this test goes wrong intermittently in CI, see if this makes it more
reliable
This commit is contained in:
Daniel Barlow 2025-03-09 21:37:13 +00:00
parent 9ab77a7d7e
commit 9dc0f25587
2 changed files with 15 additions and 7 deletions

View File

@ -25,6 +25,7 @@ pkgs.runCommand "check"
mkdir vm
${img}/run.sh --lan user,hostfwd=tcp::2022-:22 --background ./vm
expect ${./wait-until-ready.expect}
echo ready to go
export SSH_COMMAND="ssh -o StrictHostKeyChecking=no -p 2022 -i ${./id}"
$SSH_COMMAND root@localhost echo ready
IN_NIX_BUILD=true min-copy-closure --quiet root@localhost ${rogue}

View File

@ -1,13 +1,20 @@
set timeout 60
spawn socat unix-connect:vm/console -
send "\r\n"
expect {
"# " { send "hostname\r\n" };
"s6-linux-init" { }
timeout { exit 1 }
}
set timeout 30
expect {
"(none)" {}
"liminix" {}
timeout { exit(1) }
}
"#" { send "PS1=\$(echo 'I1JFQURZIyA=' | base64 -d); stty -echo\n" }
timeout { exit 1 }
}
expect {
"#READY#" { send "s6-svwait -t 10000 -u /run/service/sshd; echo continue\n" }
timeout { exit 1 }
}
expect {
"#READY#" { }
timeout { exit 1 }
}