From 75936a2870abb01cfff2706cf450f2bd7742e6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sedl=C3=A1k?= Date: Thu, 27 Aug 2015 13:48:25 +0200 Subject: [PATCH] add 32bit disk creation Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D534 --- createhdds.sh | 100 ++++++++++++++++++----------- openqa_trigger/conf_test_suites.py | 10 ++- 2 files changed, 70 insertions(+), 40 deletions(-) diff --git a/createhdds.sh b/createhdds.sh index 76417f3..a86ea7e 100755 --- a/createhdds.sh +++ b/createhdds.sh @@ -1,4 +1,5 @@ #!/bin/bash + function disk_full { echo "Creating disk_full.img..." guestfish <<_EOF_ @@ -31,14 +32,17 @@ write /testfile "Hello, world!" _EOF_ } -function disk_f22_minimal { -echo "Creating disk_f22_minimal.img..." -virt-builder fedora-22 -o disk_f22_minimal.img --update --selinux-relabel --root-password password:weakpassword > /dev/null +function disk_minimal { +version=$1 +arch=$2 +echo "Creating disk_f${version}_minimal_${arch}.img..." +virt-builder fedora-${version} -o disk_f${version}_minimal_${arch}.img --arch ${arch} --run-command \ + "setarch ${arch} dnf -y update" --selinux-relabel --root-password password:weakpassword > /dev/null expect <<_EOF_ log_user 0 set timeout -1 -spawn qemu-kvm -m 2G -nographic disk_f22_minimal.img +spawn qemu-kvm -m 2G -nographic disk_f${version}_minimal_${arch}.img expect "localhost login:" send "root\r" @@ -50,20 +54,24 @@ expect "reboot: Power down" _EOF_ } -function disk_f22_desktop { -echo "Creating disk_f22_desktop.img..." +function disk_desktop { +version=$1 +arch=$2 +echo "Creating disk_f${version}_desktop_${arch}.img..." # these steps are required # 1. remove firewalld - firewalld configuration in minimal and desktop are conflicting # 2. update fedora # 3. install @Fedora Workstation group # 4. add new user on first boot # 5. use expect to do selinux relabelling and to set password for user -virt-builder fedora-22 -o disk_f22_desktop.img --size 10G --run-command "yum -y remove firewalld*" --update --selinux-relabel --install "@^workstation-product-environment" --root-password password:weakpassword --firstboot-command 'useradd -m -p "" ejohn' > /dev/null +virt-builder fedora-${version} -o disk_f${version}_desktop_${arch}.img --size 20G --arch ${arch} --run-command \ + "setarch ${arch} dnf -y remove firewalld* && setarch ${arch} dnf -y update && setarch ${arch} dnf -y install @'Fedora Workstation'" \ + --selinux-relabel --root-password password:weakpassword --firstboot-command 'useradd -m -p "" ejohn' > /dev/null expect <<_EOF_ log_user 0 set timeout -1 -spawn qemu-kvm -m 2G -nographic disk_f22_desktop.img +spawn qemu-kvm -m 2G -nographic disk_f${version}_desktop_${arch}.img expect "localhost login:" send "root\r" @@ -105,35 +113,51 @@ upload /tmp/updates.img /updates.img _EOF_ } -if [ "$#" -eq 0 ]; then - disk_full - disk_freespace - disk_f22_minimal - disk_f22_desktop - disk_ks - disk_updates_img +if [[ "$1" != "" ]]; then + VERSION="$1" + shift + if [[ "$#" -eq 0 ]]; then + disk_full + disk_freespace + disk_minimal ${VERSION} "x86_64" + disk_minimal ${VERSION} "i686" + disk_desktop ${VERSION} "x86_64" + disk_desktop ${VERSION} "i686" + disk_ks + disk_updates_img + else + case $1 in + full) + disk_full + ;; + freespace) + disk_freespace + ;; + minimal_64bit) + disk_minimal ${VERSION} "x86_64" + ;; + minimal_32bit) + disk_minimal ${VERSION} "i686" + ;; + desktop_64bit) + disk_desktop ${VERSION} "x86_64" + ;; + desktop_32bit) + disk_desktop ${VERSION} "i686" + ;; + ks) + disk_ks + ;; + updates) + disk_updates_img + ;; + *) + echo "name not in [full|freespace|minimal_64bit|minimal_32bit|desktop_64bit|desktop_32bit|ks|updates]" + exit 1 + ;; + esac + fi else - case $1 in - full) - disk_full - ;; - freespace) - disk_freespace - ;; - minimal) - disk_f22_minimal - ;; - desktop) - disk_f22_desktop - ;; - ks) - disk_ks - ;; - updates) - disk_updates_img - ;; - *) - echo "$0 [full|freespace|minimal|desktop|ks|updates]" - ;; - esac + echo "USAGE: $0 VERSION [full|freespace|minimal_64bit|minimal_32bit|desktop_64bit|desktop_32bit|ks|updates]" + exit 1 fi diff --git a/openqa_trigger/conf_test_suites.py b/openqa_trigger/conf_test_suites.py index 60a536e..cf503dd 100644 --- a/openqa_trigger/conf_test_suites.py +++ b/openqa_trigger/conf_test_suites.py @@ -285,10 +285,16 @@ TESTSUITES = { "QA:Testcase_kickstart_user_creation", "QA:Testcase_Kickstart_Hd_Device_Path_Ks_Cfg", ], - "fedup_minimal": [ + "fedup_minimal_64bit": [ "QA:Testcase_upgrade_fedup_cli_previous_minimal", ], - "fedup_desktop": [ + "fedup_desktop_64bit": [ + "QA:Testcase_upgrade_fedup_cli_previous_workstation", + ], + "fedup_minimal_32bit": [ + "QA:Testcase_upgrade_fedup_cli_previous_minimal", + ], + "fedup_desktop_32bit": [ "QA:Testcase_upgrade_fedup_cli_previous_workstation", ], "server_btrfs": [