From fac2440ccd6b0e0f636ca1c91cf1c9c456bbef03 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 14 Feb 2017 14:13:18 +0100 Subject: [PATCH] add expect scripts for VM updates --- autopkgtest-sid-update.exp | 20 ++++++++++++++++++++ f25-update.exp | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 autopkgtest-sid-update.exp create mode 100755 f25-update.exp diff --git a/autopkgtest-sid-update.exp b/autopkgtest-sid-update.exp new file mode 100755 index 0000000..0478880 --- /dev/null +++ b/autopkgtest-sid-update.exp @@ -0,0 +1,20 @@ +#!/usr/bin/expect -f + +set timeout -1 + +#Start the guest VM +spawn vm /srv/vm/autopkgtest-sid.img -nographic + +expect "login: " +send "root\r" + +expect "# " +send "apt update && apt-get -y -o Dpkg::Options::=--force-confnew dist-upgrade\r" + +expect "# " +send "apt-get --purge -y autoremove && apt-get clean\r" + +expect "# " +send "poweroff\r" + +expect "# " diff --git a/f25-update.exp b/f25-update.exp new file mode 100755 index 0000000..d4eaa34 --- /dev/null +++ b/f25-update.exp @@ -0,0 +1,20 @@ +#!/usr/bin/expect -f + +set timeout -1 + +#Start the guest VM +spawn vm /srv/vm/f25.img -nographic + +expect "login: " +send "a\r" + +expect "Password: " +send "a\r" + +expect "$ " +send "echo a | sudo --stdin dnf update -y\r" + +expect "$ " +send "echo a | sudo --stdin poweroff\r" + +expect "$ " -- 2.39.5