Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:remove_obsolete_tests into autopkgtest-cloud:master.
Requested reviews: Canonical's Ubuntu QA (canonical-ubuntu-qa) For more details, see: https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/446492 -- Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:remove_obsolete_tests into autopkgtest-cloud:master.
diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..efded49 --- /dev/null +++ b/README.rst @@ -0,0 +1,18 @@ +================================ + Upgrade Testing Specifications +================================ + +This repository contains example and in-use profile yaml files for use with +lp:auto-upgrade-testing. + +Examples +======== + +The directory ./examples contain many example profile files highlighting +different backend options and testing definitions. + +Profiles +======== + +The directory ./profiles contain profile files that are in use in various +settings (jenkins runs etc.). diff --git a/cloudinit/default b/cloudinit/default new file mode 100644 index 0000000..ee68387 --- /dev/null +++ b/cloudinit/default @@ -0,0 +1,16 @@ +#cloud-config +locale: en_US.UTF-8 +password: ubuntu +chpasswd: { expire: False } +ssh_pwauth: True +manage_etc_hosts: True +runcmd: + - sed -i 's/deb-systemd-invoke/true/' /var/lib/dpkg/info/cloud-init.prerm + - mount -r /dev/vdb /mnt + - env ADT_SETUP_VM_UPGRADE=false ADT_SETUP_VM_POST_COMMAND='' + sh /mnt/adt-setup-vm + - if grep -q 'net.ifnames=0' /etc/default/grub; then rm /etc/network/interfaces.d/eth0.cfg; printf "auto ens3\\niface ens3 inet dhcp\\n" > /etc/network/interfaces.d/ens3.cfg; fi + - umount /mnt + - sed -i 's/deb-systemd-invoke/true/' /var/lib/dpkg/info/cloud-init.prerm + - (while [ ! -e /var/lib/cloud/instance/boot-finished ]; do sleep 1; done; + apt-get -y purge cloud-init; shutdown -P now) & diff --git a/cloudinit/ubuntu-desktop b/cloudinit/ubuntu-desktop new file mode 100644 index 0000000..d63205e --- /dev/null +++ b/cloudinit/ubuntu-desktop @@ -0,0 +1,20 @@ +#cloud-config +locale: en_US.UTF-8 +password: ubuntu +chpasswd: { expire: False } +ssh_pwauth: True +manage_etc_hosts: True +runcmd: + - sed -i 's/deb-systemd-invoke/true/' /var/lib/dpkg/info/cloud-init.prerm + - mount -r /dev/vdb /mnt + - env ADT_SETUP_VM_UPGRADE=false ADT_SETUP_VM_POST_COMMAND='' + sh /mnt/adt-setup-vm + - if grep -q 'net.ifnames=0' /etc/default/grub; then rm /etc/network/interfaces.d/eth0.cfg; printf "auto ens3\\niface ens3 inet dhcp\\n" > /etc/network/interfaces.d/ens3.cfg; fi + - umount /mnt + - sed -i 's/deb-systemd-invoke/true/' /var/lib/dpkg/info/cloud-init.prerm + - (while [ ! -e /var/lib/cloud/instance/boot-finished ]; do sleep 1; done; + apt-get -y purge cloud-init; shutdown -P now) & +apt-update: true +apt-upgrade: true +packages: + - ubuntu-desktop^ diff --git a/examples/backends/backend-example-lxc.yaml b/examples/backends/backend-example-lxc.yaml new file mode 100644 index 0000000..96889ca --- /dev/null +++ b/examples/backends/backend-example-lxc.yaml @@ -0,0 +1,16 @@ +--- +- testname: "Testname goes here" + provisioning: + backend: lxc + arch: amd64 + distribution: ubuntu + # First release is the initial and what will be provisioned and + # the pre scripts run on. + # For each release in the list after that the post scripts will be + # run and then the upgrade. + releases: + - "precise" + - "trusty" + + + # Test details go below here. See examples/specifications/ for examples. diff --git a/examples/backends/backend-example-qemu.yaml b/examples/backends/backend-example-qemu.yaml new file mode 100644 index 0000000..cf83645 --- /dev/null +++ b/examples/backends/backend-example-qemu.yaml @@ -0,0 +1,15 @@ +--- +- testname: "Testname goes here" + provisioning: + backend: qemu + arch: i386 + image_name: wily_xenial_basic_i386.img + # First release is the initial and what will be provisioned and + # the pre scripts run on. + # For each release in the list after that the post scripts will be + # run and then the upgrade. + releases: + - "wily" + - "xenial" + + # Test details go below here. See examples/specifications/ for examples. \ No newline at end of file diff --git a/examples/backends/backend-example-touch.yaml b/examples/backends/backend-example-touch.yaml new file mode 100644 index 0000000..a2c5e4d --- /dev/null +++ b/examples/backends/backend-example-touch.yaml @@ -0,0 +1,14 @@ +--- +- testname: "Testname goes here" + provisioning: + backend: touch + channel: ubuntu-touch/rc-proposed/bq-aquaris.en + password: "0000" + # Recovery file is required for Krillin devices. + recovery_file: "/path/to/device/recoveryfile.img" + # The revision of the provided channel to flash and provison on the + # device. The device will be upgraded to the latest revision of the + # same channel during the upgrade process. + # N.B. There is no mechanism to upgrade to an arbitary revision. + revision: "177" + # Test details go below here. See examples/specifications/ for examples. \ No newline at end of file diff --git a/examples/specifications/example-test-specification.yaml b/examples/specifications/example-test-specification.yaml new file mode 100644 index 0000000..a2c1543 --- /dev/null +++ b/examples/specifications/example-test-specification.yaml @@ -0,0 +1,36 @@ +--- +- testname: "Testname goes here" + # Provisioning details go here. See examples/backends for examples. + + # Script location can be a local path. + # A relative path (i.e. starting either with ./ or ../) is relative to the + # location of the specification file. + script_location: file://./tests + # Or a bzr path to the location (that will be exported). + script_location: lp:auto-upgrade-testing-specifications/ + + # Backend arguments are passed through to the adt-run backend section + # {script_location} can be used here + backend_args: --needed-file={script_location}/../resources/file.ext + + # There are 2 stages of scripts/tests that are run. + # - pre_upgrade_scripts: These are run after the backend has been + # provisioned but before the system is rebooted. Useful for setting things + # up or testing that the system is in an expected state. + # - post_upgrade_tests: These are the scripts that are run after the system + # has been rebooted. + # Scripts to be run during a run can be specified either individually + pre_upgrade_scripts: + - "null" + + post_upgrade_tests: + - "null" + - "test_pass" + - "test_fail" + + # Or you can define a directory where each executable found within will be + # run + # A relative path (i.e. starting either with ./ or ../) is relative to the + # location of the specification file. + pre_upgrade_scripts: "./tests" + post_upgrade_tests: "./tests" diff --git a/profiles/ubuntu-bionic-focal-basic-amd64_qemu.yaml b/profiles/ubuntu-bionic-focal-basic-amd64_qemu.yaml new file mode 100644 index 0000000..7cb013c --- /dev/null +++ b/profiles/ubuntu-bionic-focal-basic-amd64_qemu.yaml @@ -0,0 +1,18 @@ +--- +- testname: "bionic->focal basic upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu + image_name: bionic_focal_basic_amd64.img + releases: + - "bionic" + - "focal" + + script_location: file://../tests + pre_upgrade_scripts: + - "rcS-workaround" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-bionic-focal-desktop-amd64_qemu.yaml b/profiles/ubuntu-bionic-focal-desktop-amd64_qemu.yaml new file mode 100644 index 0000000..ec4a600 --- /dev/null +++ b/profiles/ubuntu-bionic-focal-desktop-amd64_qemu.yaml @@ -0,0 +1,22 @@ +--- +- testname: "bionic->focal desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu + image_name: bionic_focal_ubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntu-desktop^' --timeout 14400" + releases: + - "bionic" + - "focal" + + script_location: file://../tests + pre_upgrade_scripts: + - "rcS-workaround" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" + + run_system_tests: true diff --git a/profiles/ubuntu-focal-jammy-basic-amd64_qemu.yaml b/profiles/ubuntu-focal-jammy-basic-amd64_qemu.yaml new file mode 100644 index 0000000..e8b26e9 --- /dev/null +++ b/profiles/ubuntu-focal-jammy-basic-amd64_qemu.yaml @@ -0,0 +1,18 @@ +--- +- testname: "focal->jammy basic upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu + image_name: focal_jammy_basic_amd64.img + releases: + - "focal" + - "jammy" + + script_location: file://../tests + pre_upgrade_scripts: + - "null" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-focal-jammy-desktop-amd64_qemu.yaml b/profiles/ubuntu-focal-jammy-desktop-amd64_qemu.yaml new file mode 100644 index 0000000..7a4a263 --- /dev/null +++ b/profiles/ubuntu-focal-jammy-desktop-amd64_qemu.yaml @@ -0,0 +1,22 @@ +--- +- testname: "focal->jammy desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu + image_name: focal_jammy_ubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntu-desktop^' -v --timeout 14400" + releases: + - "focal" + - "jammy" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-ubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" + + run_system_tests: true diff --git a/profiles/ubuntu-focal-jammy-kubuntu-amd64_qemu.yaml b/profiles/ubuntu-focal-jammy-kubuntu-amd64_qemu.yaml new file mode 100644 index 0000000..a9e52cc --- /dev/null +++ b/profiles/ubuntu-focal-jammy-kubuntu-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "focal->jammy desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: kubuntu + image_name: focal_jammy_kubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install kubuntu-desktop' -v --timeout 14400" + releases: + - "focal" + - "jammy" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-kubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-focal-jammy-lubuntu-amd64_qemu.yaml b/profiles/ubuntu-focal-jammy-lubuntu-amd64_qemu.yaml new file mode 100644 index 0000000..ba0e699 --- /dev/null +++ b/profiles/ubuntu-focal-jammy-lubuntu-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "focal->jammy desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: lubuntu + image_name: focal_jammy_lubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ^lubuntu-desktop' -v --timeout 14400" + releases: + - "focal" + - "jammy" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-lubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-focal-jammy-ubuntu-mate-amd64_qemu.yaml b/profiles/ubuntu-focal-jammy-ubuntu-mate-amd64_qemu.yaml new file mode 100644 index 0000000..49e9ec8 --- /dev/null +++ b/profiles/ubuntu-focal-jammy-ubuntu-mate-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "focal->jammy desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu-mate + image_name: focal_jammy_ubuntu_mate_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntu-mate-desktop' -v --timeout 14400" + releases: + - "focal" + - "jammy" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-ubuntu-mate-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-focal-jammy-xubuntu-amd64_qemu.yaml b/profiles/ubuntu-focal-jammy-xubuntu-amd64_qemu.yaml new file mode 100644 index 0000000..666e94a --- /dev/null +++ b/profiles/ubuntu-focal-jammy-xubuntu-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "focal->jammy desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: xubuntu + image_name: focal_jammy_xubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ^xubuntu-desktop' -v --timeout 14400" + releases: + - "focal" + - "jammy" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-xubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-jammy-kinetic-basic-amd64_qemu.yaml b/profiles/ubuntu-jammy-kinetic-basic-amd64_qemu.yaml new file mode 100644 index 0000000..fce07a3 --- /dev/null +++ b/profiles/ubuntu-jammy-kinetic-basic-amd64_qemu.yaml @@ -0,0 +1,18 @@ +--- +- testname: "jammy->kinetic basic upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu + image_name: jammy_kinetic_basic_amd64.img + releases: + - "jammy" + - "kinetic" + + script_location: file://../tests + pre_upgrade_scripts: + - "null" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-jammy-kinetic-desktop-amd64_qemu.yaml b/profiles/ubuntu-jammy-kinetic-desktop-amd64_qemu.yaml new file mode 100644 index 0000000..3b3ffd0 --- /dev/null +++ b/profiles/ubuntu-jammy-kinetic-desktop-amd64_qemu.yaml @@ -0,0 +1,22 @@ +--- +- testname: "jammy->kinetic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu + image_name: jammy_kinetic_ubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntu-desktop^' -v --timeout 14400" + releases: + - "jammy" + - "kinetic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-ubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" + + run_system_tests: true diff --git a/profiles/ubuntu-jammy-kinetic-kubuntu-amd64_qemu.yaml b/profiles/ubuntu-jammy-kinetic-kubuntu-amd64_qemu.yaml new file mode 100644 index 0000000..38c9469 --- /dev/null +++ b/profiles/ubuntu-jammy-kinetic-kubuntu-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "jammy->kinetic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: kubuntu + image_name: jammy_kinetic_kubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install kubuntu-desktop^' -v --timeout 14400" + releases: + - "jammy" + - "kinetic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-kubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-jammy-kinetic-lubuntu-amd64_qemu.yaml b/profiles/ubuntu-jammy-kinetic-lubuntu-amd64_qemu.yaml new file mode 100644 index 0000000..933aa47 --- /dev/null +++ b/profiles/ubuntu-jammy-kinetic-lubuntu-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "jammy->kinetic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: lubuntu + image_name: jammy_kinetic_lubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install lubuntu-desktop^' -v --timeout 14400" + releases: + - "jammy" + - "kinetic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-lubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-jammy-kinetic-ubuntu-mate-amd64_qemu.yaml b/profiles/ubuntu-jammy-kinetic-ubuntu-mate-amd64_qemu.yaml new file mode 100644 index 0000000..997a370 --- /dev/null +++ b/profiles/ubuntu-jammy-kinetic-ubuntu-mate-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "jammy->kinetic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu-mate + image_name: jammy_kinetic_ubuntu_mate_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntu-mate-desktop^' -v --timeout 14400" + releases: + - "jammy" + - "kinetic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-ubuntu-mate-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-jammy-kinetic-xubuntu-amd64_qemu.yaml b/profiles/ubuntu-jammy-kinetic-xubuntu-amd64_qemu.yaml new file mode 100644 index 0000000..1a78a1f --- /dev/null +++ b/profiles/ubuntu-jammy-kinetic-xubuntu-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "jammy->kinetic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: xubuntu + image_name: jammy_kinetic_xubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install xubuntu-desktop^' -v --timeout 14400" + releases: + - "jammy" + - "kinetic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-xubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-lunar-mantic-basic-amd64_qemu.yaml b/profiles/ubuntu-lunar-mantic-basic-amd64_qemu.yaml new file mode 100644 index 0000000..30655a6 --- /dev/null +++ b/profiles/ubuntu-lunar-mantic-basic-amd64_qemu.yaml @@ -0,0 +1,18 @@ +--- +- testname: "lunar->mantic basic upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu + image_name: lunar_mantic_basic_amd64.img + releases: + - "lunar" + - "mantic" + + script_location: file://../tests + pre_upgrade_scripts: + - "null" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" \ No newline at end of file diff --git a/profiles/ubuntu-lunar-mantic-desktop-amd64_qemu.yaml b/profiles/ubuntu-lunar-mantic-desktop-amd64_qemu.yaml new file mode 100644 index 0000000..acedf80 --- /dev/null +++ b/profiles/ubuntu-lunar-mantic-desktop-amd64_qemu.yaml @@ -0,0 +1,22 @@ +--- +- testname: "lunar->mantic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu + image_name: lunar_mantic_ubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntu-desktop^' -v --timeout 14400" + releases: + - "lunar" + - "mantic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-ubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" + + run_system_tests: true \ No newline at end of file diff --git a/profiles/ubuntu-lunar-mantic-kubuntu-amd64_qemu.yaml b/profiles/ubuntu-lunar-mantic-kubuntu-amd64_qemu.yaml new file mode 100644 index 0000000..ee608fb --- /dev/null +++ b/profiles/ubuntu-lunar-mantic-kubuntu-amd64_qemu.yaml @@ -0,0 +1,19 @@ +- testname: "lunar->mantic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: kubuntu + image_name: lunar_mantic_kubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install kubuntu-desktop^' -v --timeout 14400" + releases: + - "lunar" + - "mantic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-kubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-lunar-mantic-lubuntu-amd64_qemu.yaml b/profiles/ubuntu-lunar-mantic-lubuntu-amd64_qemu.yaml new file mode 100644 index 0000000..6e15a2d --- /dev/null +++ b/profiles/ubuntu-lunar-mantic-lubuntu-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "lunar->mantic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: lubuntu + image_name: lunar_mantic_lubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install lubuntu-desktop^' -v --timeout 14400" + releases: + - "lunar" + - "mantic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-lubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/profiles/ubuntu-lunar-mantic-ubuntu-mate-amd64_qemu.yaml b/profiles/ubuntu-lunar-mantic-ubuntu-mate-amd64_qemu.yaml new file mode 100644 index 0000000..e67125a --- /dev/null +++ b/profiles/ubuntu-lunar-mantic-ubuntu-mate-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "lunar->mantic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu-mate + image_name: lunar_mantic_ubuntu_mate_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntu-mate-desktop^' -v --timeout 14400" + releases: + - "lunar" + - "mantic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-ubuntu-mate-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" \ No newline at end of file diff --git a/profiles/ubuntu-lunar-mantic-ubuntu-unity-amd64_qemu.yaml b/profiles/ubuntu-lunar-mantic-ubuntu-unity-amd64_qemu.yaml new file mode 100644 index 0000000..1d7c351 --- /dev/null +++ b/profiles/ubuntu-lunar-mantic-ubuntu-unity-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "lunar->mantic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntu-unity + image_name: lunar_mantic_ubuntu_unity_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntu-unity-desktop^' -v --timeout 14400" + releases: + - "lunar" + - "mantic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-ubuntu-unity-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" \ No newline at end of file diff --git a/profiles/ubuntu-lunar-mantic-ubuntucinnamon-amd64_qemu.yaml b/profiles/ubuntu-lunar-mantic-ubuntucinnamon-amd64_qemu.yaml new file mode 100644 index 0000000..b349b37 --- /dev/null +++ b/profiles/ubuntu-lunar-mantic-ubuntucinnamon-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "lunar->mantic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: ubuntucinnamon + image_name: lunar_mantic_ubuntucinnamon_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntucinnamon-desktop' -v --timeout 14400" + releases: + - "lunar" + - "mantic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-ubuntucinnamon-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" \ No newline at end of file diff --git a/profiles/ubuntu-lunar-mantic-xubuntu-amd64_qemu.yaml b/profiles/ubuntu-lunar-mantic-xubuntu-amd64_qemu.yaml new file mode 100644 index 0000000..5f5362c --- /dev/null +++ b/profiles/ubuntu-lunar-mantic-xubuntu-amd64_qemu.yaml @@ -0,0 +1,20 @@ +--- +- testname: "lunar->mantic desktop upgrade" + provisioning: + backend: qemu + arch: amd64 + flavor: xubuntu + image_name: lunar_mantic_xubuntu_desktop_amd64.img + build_args: + - "--post-command 'sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install xubuntu-desktop^' -v --timeout 14400" + releases: + - "lunar" + - "mantic" + + script_location: file://../tests + pre_upgrade_scripts: + - "check-xubuntu-desktop" + + post_upgrade_tests: + - "check-conffile-prompt" + - "check-var-crash-empty" diff --git a/resources/uefi-bios.bin b/resources/uefi-bios.bin new file mode 100644 index 0000000..6b66cbb Binary files /dev/null and b/resources/uefi-bios.bin differ diff --git a/tests/check-conffile-prompt b/tests/check-conffile-prompt new file mode 100755 index 0000000..eaa3ac2 --- /dev/null +++ b/tests/check-conffile-prompt @@ -0,0 +1,20 @@ +#!/bin/bash + +LOG_FILE_PATH="/var/log/dist-upgrade/main.log" + +# First of all, check log file actually exists. +if ! test -f "${LOG_FILE_PATH}"; then + printf "No dist upgrade log, something must have gone wrong.\n" + exit 1 +fi + +CHECK_ME="WARNING got a conffile prompt from dpkg" + +# Now check the log file for conffile prompts +if grep -q "${CHECK_ME}" "${LOG_FILE_PATH}"; then + printf "Warning: conffile prompts found in log file for dist-upgrade. Log snippet:\n" + grep -A 5 -B 5 "${CHECK_ME}" "${LOG_FILE_PATH}" + exit 1 +fi + +printf "No conffile prompts found in log file for dist-upgrade, success.\n" diff --git a/tests/check-edubuntu-desktop b/tests/check-edubuntu-desktop new file mode 100755 index 0000000..1beeac2 --- /dev/null +++ b/tests/check-edubuntu-desktop @@ -0,0 +1 @@ +dpkg-query -W edubuntu-desktop diff --git a/tests/check-kubuntu-desktop b/tests/check-kubuntu-desktop new file mode 100755 index 0000000..8546ce9 --- /dev/null +++ b/tests/check-kubuntu-desktop @@ -0,0 +1 @@ +dpkg-query -W kubuntu-desktop diff --git a/tests/check-lubuntu-desktop b/tests/check-lubuntu-desktop new file mode 100755 index 0000000..c618446 --- /dev/null +++ b/tests/check-lubuntu-desktop @@ -0,0 +1 @@ +dpkg-query -W lubuntu-desktop diff --git a/tests/check-ubuntu-desktop b/tests/check-ubuntu-desktop new file mode 100755 index 0000000..fe100f0 --- /dev/null +++ b/tests/check-ubuntu-desktop @@ -0,0 +1 @@ +dpkg-query -W ubuntu-desktop diff --git a/tests/check-ubuntu-mate-desktop b/tests/check-ubuntu-mate-desktop new file mode 100755 index 0000000..84ad9c6 --- /dev/null +++ b/tests/check-ubuntu-mate-desktop @@ -0,0 +1 @@ +dpkg-query -W ubuntu-mate-desktop diff --git a/tests/check-ubuntu-unity-desktop b/tests/check-ubuntu-unity-desktop new file mode 100755 index 0000000..b0c4de0 --- /dev/null +++ b/tests/check-ubuntu-unity-desktop @@ -0,0 +1 @@ +dpkg-query -W ubuntu-unity-desktop diff --git a/tests/check-ubuntucinnamon-desktop b/tests/check-ubuntucinnamon-desktop new file mode 100755 index 0000000..76ae58c --- /dev/null +++ b/tests/check-ubuntucinnamon-desktop @@ -0,0 +1 @@ +dpkg-query -W ubuntucinnamon-desktop \ No newline at end of file diff --git a/tests/check-var-crash-empty b/tests/check-var-crash-empty new file mode 100755 index 0000000..c7dfa3e --- /dev/null +++ b/tests/check-var-crash-empty @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +crashdir=/var/crash + +echo "Checking for (absence of) crash files in $crashdir." + +if find "$crashdir" -maxdepth 0 ! -empty -exec false {} +; then + echo "PASS: $crashdir is empty (good)" +else + echo "FAIL: $crashdir is not empty. Crash files sorted by creation time:" + ls -gGh -tr --time=creation --full-time "$crashdir" + exit 1 +fi diff --git a/tests/check-xubuntu-desktop b/tests/check-xubuntu-desktop new file mode 100755 index 0000000..4ed0334 --- /dev/null +++ b/tests/check-xubuntu-desktop @@ -0,0 +1 @@ +dpkg-query -W xubuntu-desktop diff --git a/tests/install-utopic-hwe b/tests/install-utopic-hwe new file mode 100755 index 0000000..35902e9 --- /dev/null +++ b/tests/install-utopic-hwe @@ -0,0 +1,4 @@ +#!/bin/sh + +sudo apt-get update +sudo apt-get install -y --force-yes linux-image-generic-lts-utopic xserver-xorg-lts-utopic diff --git a/tests/install-vivid-hwe b/tests/install-vivid-hwe new file mode 100755 index 0000000..dc4402f --- /dev/null +++ b/tests/install-vivid-hwe @@ -0,0 +1,4 @@ +#!/bin/sh + +sudo apt-get update +sudo apt-get install -y --force-yes linux-image-generic-lts-vivid xserver-xorg-lts-vivid diff --git a/tests/install-wily-hwe b/tests/install-wily-hwe new file mode 100755 index 0000000..36e9196 --- /dev/null +++ b/tests/install-wily-hwe @@ -0,0 +1,4 @@ +#!/bin/sh + +sudo apt-get update +sudo apt-get install -y --force-yes linux-image-generic-lts-wily xserver-xorg-lts-wily diff --git a/tests/install-xenial-hwe b/tests/install-xenial-hwe new file mode 100755 index 0000000..e4799af --- /dev/null +++ b/tests/install-xenial-hwe @@ -0,0 +1,4 @@ +#!/bin/sh + +sudo apt-get update +sudo apt-get install -y --force-yes linux-image-generic-lts-xenial xserver-xorg-lts-xenial diff --git a/tests/lts-desktop/post b/tests/lts-desktop/post new file mode 100755 index 0000000..e554710 --- /dev/null +++ b/tests/lts-desktop/post @@ -0,0 +1,104 @@ +#!/usr/bin/python +# +# This script checks user configuration settings after an Ubuntu 10.04 +# LTS to Ubuntu 12.04 LTS upgrade. Run prepare_lts_upgrade_user.sh in 10.04 +# LTS, then upgrade to 12.04 LTS (or later), and run this script to confirm +# that settings were migrated properly. In particular this checks for gconf -> +# gsettings migration (and sometimes changing the format of the values) for +# popular settings, as well as custom panel/desktop launchers. +# +# You need to run both the prepare and this test script as the same user, +# in a full desktop session. +# +# (C) 2012 Canonical Ltd. +# Author: Martin Pitt <martin.p...@ubuntu.com> +# License: GPL v2 or higher + +from __future__ import print_function + +import unittest +import os, sys +import subprocess +from time import sleep + +try: + from gi.repository import Gio +except: + # Not a desktop + print("Failed to import gi.repository. Not a LTS Desktop Upgrade. Skipping!") + sys.exit(0) + +class T(unittest.TestCase): + def test_background(self): + '''background image''' + + bg_settings = Gio.Settings('org.gnome.desktop.background') + # note: original gconf value does not have a file:// prefix, but GNOME + # 3.x requires this prefix + self.assertEqual(bg_settings.get_string('picture-uri'), + 'file://%s/mybackground.jpg' % os.environ['HOME']) + +# Theme is not preserved on upgrade. LP: #969569 +# Test disabled +# def test_gtk_theme(self): +# '''GTK theme''' +# +# iface_settings = Gio.Settings('org.gnome.desktop.interface') +# self.assertEqual(iface_settings.get_string('gtk-theme'), 'Radiance') + + def test_custom_launchers(self): + '''Custom panel/desktop launchers appear in Unity launcher''' + + launcher_settings = Gio.Settings('com.canonical.Unity.Launcher') + favorites = launcher_settings['favorites'] + + # gedit was dragged from Application menu to panel, pointing to system + # .desktop file + self.assertTrue('gedit.desktop' in favorites) + + # custom "echo hello" panel starter uses its own .desktop file + for starter in favorites: + if 'echo' in starter: + self.assertTrue(os.path.exists(starter)) + break + else: + self.fail('custom hello starter not found') + + # gucharmap was dragged from Application menu to desktop, should be + # converted to system .desktop file + self.assertTrue('gucharmap.desktop' in favorites) + + # custom "bc -l" desktop starter uses its own .desktop file + self.assertTrue('%s/Desktop/termcalc.desktop' % os.environ['HOME'] in favorites) + + def test_keyboard_layouts(self): + '''Custom keyboard layouts are migrated and applied''' + + # verify gconf->gsettings migration + kbd_settings = Gio.Settings('org.gnome.libgnomekbd.keyboard') + print(kbd_settings) + print(kbd_settings['layouts']) + self.assertEqual(kbd_settings['layouts'], + ['us','de\tnodeadkeys','gb','gb\tdvorak']) + +# NO DISPLAY IN AUTOMATED TEST +# # verify that they get applied to the X server correctly +# xprop = subprocess.Popen(['xprop', '-root', '_XKB_RULES_NAMES'], +# stdout=subprocess.PIPE, universal_newlines=True) +# out = xprop.communicate()[0] +# self.assertEqual(xprop.returncode, 0) +# +# # chop off key name +# out = out.split('=', 1)[1].strip() +# +# self.assertEqual(out, '"evdev", "pc105", "us,de,gb,gb", ",nodeadkeys,,dvorak", "grp:alts_toggle"') + +if os.getuid() == 0: + # Root ? reexecute itself as user ubuntu + ret = subprocess.call('sudo -H -u ubuntu dbus-launch %s' % + os.path.abspath(__file__), shell=True) + sys.exit(ret) +else: + # Give 1 minute for the session to start, convert, ... + sleep(60) + unittest.main() diff --git a/tests/lts-desktop/pre b/tests/lts-desktop/pre new file mode 100755 index 0000000..3eb55dd --- /dev/null +++ b/tests/lts-desktop/pre @@ -0,0 +1,43 @@ +#!/bin/sh +# This script sets some popular user configuration settings in an Ubuntu 10.04 +# LTS GNOME system. Run this, then upgrade to 12.04 LTS (or later), and run +# test_lts_upgrade_user.py to confirm that settings were migrated properly. In +# particular this checks for gconf -> gsettings migration (and sometimes +# changing the format of the values) for popular settings, as well as custom +# panel/desktop launchers. +# +# You need to run this script in a fully running GNOME desktop session. + +# +# (C) 2012 Canonical Ltd. +# Author: Martin Pitt <martin.p...@ubuntu.com> +# License: GPL v2 or higher + +set -e + +# Install desktop metapackage +export DEBIAN_FRONTEND=noninteractive +apt-get update +apt-get install -y --force-yes ubuntu-desktop + +echo "Setting custom background..." +cp `ls /usr/share/backgrounds/*.jpg | head -n1` $HOME/mybackground.jpg +gconftool -s /desktop/gnome/background/picture_filename --type string $HOME/mybackground.jpg + +echo "Setting Radiance theme..." +gconftool -s /desktop/gnome/interface/gtk_theme --type string Radiance + +echo "Setting custom keyboard layouts..." +gconftool -s /desktop/gnome/peripherals/keyboard/kbd/layouts --type list --list-type string "[us,de nodeadkeys,gb,gb dvorak]" +gconftool -g /desktop/gnome/peripherals/keyboard/kbd/layouts + +echo 'Success. Now upgrade to 12.04 LTS and run test_lts_upgrade_user.py' + +# Execute User setup script +USERSETUP="/upgrade-tester/data/prepare_lts_user" +TARGETUSER="ubuntu" + +if [ -f "$USERSETUP" ]; then + chmod +x $USERSETUP + sudo -i -u $TARGETUSER sh $USERSETUP +fi diff --git a/tests/lts-desktop/x-running b/tests/lts-desktop/x-running new file mode 100755 index 0000000..a962e57 --- /dev/null +++ b/tests/lts-desktop/x-running @@ -0,0 +1,8 @@ +#!/bin/sh + +set -ex + +echo "Checking for X running" +pgrep X +ps auxw | grep X +echo "Done checking for X running" diff --git a/tests/null b/tests/null new file mode 100755 index 0000000..8ac22b4 --- /dev/null +++ b/tests/null @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "NULL Test" +exit 0 diff --git a/tests/rcS-workaround b/tests/rcS-workaround new file mode 100755 index 0000000..bbe4b2e --- /dev/null +++ b/tests/rcS-workaround @@ -0,0 +1,3 @@ +#!/bin/sh -ex +echo 'Dpkg::Options { "--force-confdef"; }' | sudo tee /etc/apt/apt.conf.d/local +sudo rm /etc/default/rcS || true
-- Mailing list: https://launchpad.net/~canonical-ubuntu-qa Post to : canonical-ubuntu-qa@lists.launchpad.net Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa More help : https://help.launchpad.net/ListHelp