make vagrant-test idempotent

This commit is contained in:
Martin Sehnoutka 2019-07-25 13:27:59 +02:00 committed by Tom Gundersen
parent d975effc42
commit 03a0e4b41c
3 changed files with 21 additions and 2 deletions

View file

@ -1,6 +1,9 @@
up:
vagrant up
destroy:
vagrant destroy -f
install-deps:
vagrant provision

2
test/Vagrantfile vendored
View file

@ -2,6 +2,8 @@
# vi: set ft=ruby :
$script = <<-SCRIPT
packages=$(find /vagrant/testing-rpms -name '*.noarch.rpm')
sudo dnf remove -y $(basename -a ${packages[@]} | sed 's/-[0-9].*.rpm$//') || true
sudo dnf install qemu-system-x86 /vagrant/testing-rpms/*.noarch.rpm -y
SCRIPT