aboutgitcodebugslistschat
path: root/test/distro/opensuse
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-07-06 17:29:07 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-07-14 01:34:37 +0200
commit32c5e054795e811420db84eb913e00ac3af8fc2b (patch)
tree267a06698bff3684b01b6daa93b423d1f8bfec66 /test/distro/opensuse
parenta832a44e67e77dd1a9ec57e9c054feddb0355cfc (diff)
downloadpasst-32c5e054795e811420db84eb913e00ac3af8fc2b.tar
passt-32c5e054795e811420db84eb913e00ac3af8fc2b.tar.gz
passt-32c5e054795e811420db84eb913e00ac3af8fc2b.tar.bz2
passt-32c5e054795e811420db84eb913e00ac3af8fc2b.tar.lz
passt-32c5e054795e811420db84eb913e00ac3af8fc2b.tar.xz
passt-32c5e054795e811420db84eb913e00ac3af8fc2b.tar.zst
passt-32c5e054795e811420db84eb913e00ac3af8fc2b.zip
tests: Move distro image download to asset build makefile
Rather than directly download distro images from the test scripts, handle all the downloads during the test asset build, then just clone them for the tests themselves. This avoids repeated downloads which can be very slow when debugging failing tests. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [sbrivio: Add OPENSUSE_IMGS to DOWNLOAD_ASSETS in Makefile, and note that xzcat doesn't take a -O option in test/distro/opensuse] Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/distro/opensuse')
-rw-r--r--test/distro/opensuse14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/distro/opensuse b/test/distro/opensuse
index f2da9fe..ad2108f 100644
--- a/test/distro/opensuse
+++ b/test/distro/opensuse
@@ -12,7 +12,7 @@
# Author: Stefano Brivio <sbrivio@redhat.com>
temp PIDFILE
-htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-aarch64 xzcat tr
+htools qemu-img virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-aarch64 xzcat tr
# Quick pasta test: send message from init to ns, and from ns to init
def distro_quick_pasta_test
@@ -45,7 +45,7 @@ hout GUEST_FILES ls -1 *.c *.h *.sh passt.1 qrap.1 Makefile | tr '\n' ' '; echo
test OpenSUSE Leap 15.1
temp IMG
-host wget https://download.opensuse.org/distribution/leap/15.1/jeos/openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
host guestfish --rw -a __IMG__ -i rm '/usr/lib/systemd/system/systemd-journald.service'
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/default.target.wants/jeos-firstboot.service
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
@@ -73,7 +73,7 @@ hout PID cat __PIDFILE__
test OpenSUSE Leap 15.2
-host wget https://download.opensuse.org/distribution/leap/15.2/appliances/openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
host guestfish --rw -a __IMG__ -i rm '/usr/lib/systemd/system/systemd-journald.service'
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/default.target.wants/jeos-firstboot.service
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
@@ -98,7 +98,7 @@ sleep 1
test OpenSUSE Leap 15.3
-host wget https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
host guestfish --rw -a __IMG__ -i rm '/usr/lib/systemd/system/systemd-journald.service'
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/default.target.wants/jeos-firstboot.service
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
@@ -126,7 +126,7 @@ sleep 1
test OpenSUSE Tumbleweed aarch64
temp IMG
-host wget http://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz -O - | xzcat > __IMG__
+host xzcat __BASEPATH__/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz > __IMG__
host virt-edit -a __IMG__ -m /dev/sda3 /usr/lib/systemd/system/serial-getty@.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
@@ -153,7 +153,7 @@ test OpenSUSE Tumbleweed armv7l
temp IMG
temp ZIMAGE
temp INITRD
-host wget http://download.opensuse.org/ports/armv7hl/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz -O - | xz -d > __IMG__
+host xzcat __BASEPATH__/openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz > __IMG__
host guestfish -a __IMG__ -i download /boot/zImage __ZIMAGE__
host guestfish -a __IMG__ -i download /boot/initrd __INITRD__
host virt-edit -a __IMG__ -m /dev/sda3 /usr/lib/systemd/system/serial-getty@.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 %I $TERM/g'
@@ -179,7 +179,7 @@ sleep 1
test OpenSUSE Tumbleweed
temp IMG
-host wget https://download.opensuse.org/tumbleweed/appliances/openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/systemd-journald.service
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/default.target.wants/jeos-firstboot.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/serial-getty@.service