diff --git a/lib/installedtest.pm b/lib/installedtest.pm index 90b86a3c..94c460a0 100644 --- a/lib/installedtest.pm +++ b/lib/installedtest.pm @@ -98,6 +98,11 @@ sub post_fail_hook { # Sometimes useful for diagnosing FreeIPA issues upload_logs "/etc/nsswitch.conf", failok=>1; + + # for installer creation test + upload_logs "/root/imgbuild/pylorax.log", failok=>1; + upload_logs "/root/imgbuild/lorax.log", failok=>1; + upload_logs "/root/imgbuild/program.log", failok=>1; } # For update tests, let's do the update package info log stuff, diff --git a/main.pm b/main.pm index dda83af0..96294559 100644 --- a/main.pm +++ b/main.pm @@ -272,8 +272,10 @@ sub load_postinstall_tests() { # (intended for the updates testing workflow, so we install the updates # to be tested). Don't do this for UPGRADE tests, as the update gets # installed as part of the upgrade in that case and we don't need the - # extra reboot. - if (get_var("ADVISORY") && !get_var("UPGRADE")) { + # extra reboot. Don't do this for INSTALL test(s); these are checking + # that an installer image built from the update works and do not install + # the update themselves. + if (get_var("ADVISORY") && !get_var("UPGRADE") && !get_var("INSTALL")) { autotest::loadtest "tests/_advisory_update.pm"; # now load the early boot tests again, as _advisory_update reboots _load_early_postinstall_tests(2); @@ -315,8 +317,10 @@ sub load_postinstall_tests() { } # load the ADVISORY post-install test - this records which update - # packages were actually installed during the test - if (get_var("ADVISORY")) { + # packages were actually installed during the test. Don't do this + # for INSTALL test(s); these are checking that an installer image + # built from the update works and do not install the update themselves. + if (get_var("ADVISORY") && !get_var("INSTALL")) { autotest::loadtest "tests/_advisory_post.pm"; } @@ -343,9 +347,10 @@ if (get_var("ENTRYPOINT")) { elsif (get_var("UPGRADE")) { load_upgrade_tests; } -elsif (!get_var("START_AFTER_TEST") && !get_var("BOOTFROM")) { +elsif ((!get_var("START_AFTER_TEST") && !get_var("BOOTFROM")) || get_var("INSTALL")) { # for now we can assume START_AFTER_TEST and BOOTFROM mean the - # test picks up after an install, so we skip to post-install + # test picks up after an install, so we skip to post-install, + # unless the override INSTALL var is set load_install_tests; } diff --git a/needles/anaconda/install_process/install_done-reboot-f28-20190118.json b/needles/anaconda/install_process/install_done-reboot-f28-20190118.json new file mode 100644 index 00000000..af0aca2e --- /dev/null +++ b/needles/anaconda/install_process/install_done-reboot-f28-20190118.json @@ -0,0 +1,24 @@ +{ + "area": [ + { + "ypos": 636, + "xpos": 704, + "type": "match", + "width": 314, + "height": 20 + }, + { + "ypos": 685, + "type": "match", + "xpos": 955, + "height": 14, + "width": 48 + } + ], + "properties": [], + "tags": [ + "anaconda_install_done", + "ENV-DISTRI-fedora", + "LANGUAGE-english" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/install_done-reboot-f28-20190118.png b/needles/anaconda/install_process/install_done-reboot-f28-20190118.png new file mode 100644 index 00000000..bd79b208 Binary files /dev/null and b/needles/anaconda/install_process/install_done-reboot-f28-20190118.png differ diff --git a/needles/anaconda/install_process/install_finish_configuration-f28-20190118.json b/needles/anaconda/install_process/install_finish_configuration-f28-20190118.json new file mode 100644 index 00000000..dfb0f4f7 --- /dev/null +++ b/needles/anaconda/install_process/install_finish_configuration-f28-20190118.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "type": "match", + "xpos": 886, + "height": 17, + "width": 118, + "ypos": 685 + } + ], + "properties": [], + "tags": [ + "anaconda_install_finish_configuration", + "ENV-DISTRI-fedora", + "LANGUAGE-english" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/install_finish_configuration-f28-20190118.png b/needles/anaconda/install_process/install_finish_configuration-f28-20190118.png new file mode 100644 index 00000000..aceea2cf Binary files /dev/null and b/needles/anaconda/install_process/install_finish_configuration-f28-20190118.png differ diff --git a/needles/anaconda/install_process/root_password-f28-20190118.json b/needles/anaconda/install_process/root_password-f28-20190118.json new file mode 100644 index 00000000..037518f9 --- /dev/null +++ b/needles/anaconda/install_process/root_password-f28-20190118.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "ypos": 161, + "xpos": 186, + "type": "match", + "width": 72, + "height": 57 + } + ], + "properties": [], + "tags": [ + "anaconda_install_root_password", + "ENV-DISTRI-fedora" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/root_password-f28-20190118.png b/needles/anaconda/install_process/root_password-f28-20190118.png new file mode 100644 index 00000000..e9282a17 Binary files /dev/null and b/needles/anaconda/install_process/root_password-f28-20190118.png differ diff --git a/needles/anaconda/install_process/root_password_screen-f28-20190118.json b/needles/anaconda/install_process/root_password_screen-f28-20190118.json new file mode 100644 index 00000000..435b1583 --- /dev/null +++ b/needles/anaconda/install_process/root_password_screen-f28-20190118.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 244, + "type": "match", + "width": 96, + "height": 15, + "ypos": 124 + } + ], + "properties": [], + "tags": [ + "anaconda_install_root_password_screen", + "ENV-DISTRI-fedora", + "LANGUAGE-english", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/root_password_screen-f28-20190118.png b/needles/anaconda/install_process/root_password_screen-f28-20190118.png new file mode 100644 index 00000000..21c872bf Binary files /dev/null and b/needles/anaconda/install_process/root_password_screen-f28-20190118.png differ diff --git a/needles/anaconda/install_process/user_creation-f28-20190118.json b/needles/anaconda/install_process/user_creation-f28-20190118.json new file mode 100644 index 00000000..1a1f5529 --- /dev/null +++ b/needles/anaconda/install_process/user_creation-f28-20190118.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 630, + "type": "match", + "width": 19, + "height": 59, + "ypos": 154 + } + ], + "properties": [], + "tags": [ + "ENV-DISTRI-fedora", + "anaconda_install_user_creation" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/user_creation-f28-20190118.png b/needles/anaconda/install_process/user_creation-f28-20190118.png new file mode 100644 index 00000000..d02f0f99 Binary files /dev/null and b/needles/anaconda/install_process/user_creation-f28-20190118.png differ diff --git a/needles/anaconda/install_process/user_creation_make_admin-f28-20190118.json b/needles/anaconda/install_process/user_creation_make_admin-f28-20190118.json new file mode 100644 index 00000000..35fc024f --- /dev/null +++ b/needles/anaconda/install_process/user_creation_make_admin-f28-20190118.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "xpos": 362, + "type": "match", + "width": 194, + "height": 21, + "ypos": 212 + } + ], + "properties": [], + "tags": [ + "ENV-DISTRI-fedora", + "LANGUAGE-english", + "anaconda_install_user_creation_make_admin" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/user_creation_make_admin-f28-20190118.png b/needles/anaconda/install_process/user_creation_make_admin-f28-20190118.png new file mode 100644 index 00000000..2e456e16 Binary files /dev/null and b/needles/anaconda/install_process/user_creation_make_admin-f28-20190118.png differ diff --git a/needles/anaconda/install_process/user_creation_screen-f28-20190118.json b/needles/anaconda/install_process/user_creation_screen-f28-20190118.json new file mode 100644 index 00000000..af6b8842 --- /dev/null +++ b/needles/anaconda/install_process/user_creation_screen-f28-20190118.json @@ -0,0 +1,25 @@ +{ + "area": [ + { + "ypos": 153, + "height": 17, + "width": 69, + "type": "match", + "xpos": 272 + }, + { + "type": "match", + "xpos": 281, + "height": 17, + "width": 62, + "ypos": 278 + } + ], + "properties": [], + "tags": [ + "anaconda_install_user_creation_screen", + "ENV-DISTRI-fedora", + "LANGUAGE-english", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/user_creation_screen-f28-20190118.png b/needles/anaconda/install_process/user_creation_screen-f28-20190118.png new file mode 100644 index 00000000..f3aa1e50 Binary files /dev/null and b/needles/anaconda/install_process/user_creation_screen-f28-20190118.png differ diff --git a/needles/anaconda/lang_select/install_lang-f28-20190118.json b/needles/anaconda/lang_select/install_lang-f28-20190118.json new file mode 100644 index 00000000..5317cd56 --- /dev/null +++ b/needles/anaconda/lang_select/install_lang-f28-20190118.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "ypos": 103, + "width": 87, + "height": 28, + "xpos": 357, + "type": "match" + } + ], + "properties": [], + "tags": [ + "anaconda_select_install_lang", + "ENV-DISTRI-fedora" + ] +} \ No newline at end of file diff --git a/needles/anaconda/lang_select/install_lang-f28-20190118.png b/needles/anaconda/lang_select/install_lang-f28-20190118.png new file mode 100644 index 00000000..4b215b16 Binary files /dev/null and b/needles/anaconda/lang_select/install_lang-f28-20190118.png differ diff --git a/needles/anaconda/lang_select/install_lang_continue-f28-20190118.json b/needles/anaconda/lang_select/install_lang_continue-f28-20190118.json new file mode 100644 index 00000000..8f0f1a22 --- /dev/null +++ b/needles/anaconda/lang_select/install_lang_continue-f28-20190118.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "xpos": 927, + "type": "match", + "width": 88, + "height": 24, + "ypos": 733 + } + ], + "properties": [], + "tags": [ + "anaconda_select_install_lang_continue", + "ENV-DISTRI-fedora", + "LANGUAGE-english" + ] +} \ No newline at end of file diff --git a/needles/anaconda/lang_select/install_lang_continue-f28-20190118.png b/needles/anaconda/lang_select/install_lang_continue-f28-20190118.png new file mode 100644 index 00000000..9755e5af Binary files /dev/null and b/needles/anaconda/lang_select/install_lang_continue-f28-20190118.png differ diff --git a/needles/anaconda/lang_select/install_lang_english_selected-f28-20190118.json b/needles/anaconda/lang_select/install_lang_english_selected-f28-20190118.json new file mode 100644 index 00000000..7e3673bc --- /dev/null +++ b/needles/anaconda/lang_select/install_lang_english_selected-f28-20190118.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "ypos": 200, + "type": "match", + "xpos": 603, + "height": 18, + "width": 165 + } + ], + "properties": [], + "tags": [ + "anaconda_select_install_lang_selected", + "anaconda_select_install_lang_filtered", + "ENV-DISTRI-fedora", + "LANGUAGE-english" + ] +} \ No newline at end of file diff --git a/needles/anaconda/lang_select/install_lang_english_selected-f28-20190118.png b/needles/anaconda/lang_select/install_lang_english_selected-f28-20190118.png new file mode 100644 index 00000000..b2c2b9ea Binary files /dev/null and b/needles/anaconda/lang_select/install_lang_english_selected-f28-20190118.png differ diff --git a/needles/anaconda/main_hub/begin_installation-f28-20190118.json b/needles/anaconda/main_hub/begin_installation-f28-20190118.json new file mode 100644 index 00000000..c6a337f9 --- /dev/null +++ b/needles/anaconda/main_hub/begin_installation-f28-20190118.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 17, + "width": 107, + "type": "match", + "xpos": 895, + "ypos": 707 + } + ], + "properties": [], + "tags": [ + "anaconda_main_hub_begin_installation", + "ENV-DISTRI-fedora", + "LANGUAGE-english" + ] +} \ No newline at end of file diff --git a/needles/anaconda/main_hub/begin_installation-f28-20190118.png b/needles/anaconda/main_hub/begin_installation-f28-20190118.png new file mode 100644 index 00000000..fd1e3dd9 Binary files /dev/null and b/needles/anaconda/main_hub/begin_installation-f28-20190118.png differ diff --git a/needles/anaconda/main_hub/install_destination-f28-20190118.json b/needles/anaconda/main_hub/install_destination-f28-20190118.json new file mode 100644 index 00000000..82cde901 --- /dev/null +++ b/needles/anaconda/main_hub/install_destination-f28-20190118.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "ypos": 463, + "width": 66, + "height": 75, + "xpos": 189, + "type": "match" + } + ], + "properties": [], + "tags": [ + "anaconda_main_hub_install_destination", + "anaconda_main_hub_install_destination_warning", + "ENV-DISTRI-fedora" + ] +} \ No newline at end of file diff --git a/needles/anaconda/main_hub/install_destination-f28-20190118.png b/needles/anaconda/main_hub/install_destination-f28-20190118.png new file mode 100644 index 00000000..2f4db324 Binary files /dev/null and b/needles/anaconda/main_hub/install_destination-f28-20190118.png differ diff --git a/needles/anaconda/main_hub/nonlive-f28-20190118.json b/needles/anaconda/main_hub/nonlive-f28-20190118.json new file mode 100644 index 00000000..0914db9e --- /dev/null +++ b/needles/anaconda/main_hub/nonlive-f28-20190118.json @@ -0,0 +1,30 @@ +{ + "area": [ + { + "ypos": 344, + "xpos": 190, + "type": "match", + "width": 63, + "height": 61 + }, + { + "xpos": 184, + "type": "match", + "width": 74, + "height": 56, + "ypos": 154 + }, + { + "ypos": 216, + "height": 70, + "width": 66, + "type": "match", + "xpos": 186 + } + ], + "properties": [], + "tags": [ + "anaconda_main_hub", + "ENV-DISTRI-fedora" + ] +} \ No newline at end of file diff --git a/needles/anaconda/main_hub/nonlive-f28-20190118.png b/needles/anaconda/main_hub/nonlive-f28-20190118.png new file mode 100644 index 00000000..2f4db324 Binary files /dev/null and b/needles/anaconda/main_hub/nonlive-f28-20190118.png differ diff --git a/needles/anaconda/universal/rawhide_accept_fate-f28-20190118.json b/needles/anaconda/universal/rawhide_accept_fate-f28-20190118.json new file mode 100644 index 00000000..ecc5782a --- /dev/null +++ b/needles/anaconda/universal/rawhide_accept_fate-f28-20190118.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "ypos": 469, + "width": 100, + "height": 17, + "xpos": 648, + "type": "match" + } + ], + "properties": [], + "tags": [ + "ENV-DISTRI-fedora", + "LANGUAGE-english", + "anaconda_rawhide_accept_fate" + ] +} \ No newline at end of file diff --git a/needles/anaconda/universal/rawhide_accept_fate-f28-20190118.png b/needles/anaconda/universal/rawhide_accept_fate-f28-20190118.png new file mode 100644 index 00000000..b31f0e3e Binary files /dev/null and b/needles/anaconda/universal/rawhide_accept_fate-f28-20190118.png differ diff --git a/needles/anaconda/universal/spoke_done-f28-20190118.json b/needles/anaconda/universal/spoke_done-f28-20190118.json new file mode 100644 index 00000000..540c4c42 --- /dev/null +++ b/needles/anaconda/universal/spoke_done-f28-20190118.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "type": "match", + "xpos": 23, + "height": 22, + "width": 55, + "ypos": 50 + } + ], + "properties": [], + "tags": [ + "anaconda_spoke_done", + "ENV-DISTRI-fedora", + "LANGUAGE-english" + ] +} \ No newline at end of file diff --git a/needles/anaconda/universal/spoke_done-f28-20190118.png b/needles/anaconda/universal/spoke_done-f28-20190118.png new file mode 100644 index 00000000..fc6da020 Binary files /dev/null and b/needles/anaconda/universal/spoke_done-f28-20190118.png differ diff --git a/templates b/templates index 4b40887c..1dd4a9ab 100755 --- a/templates +++ b/templates @@ -4963,7 +4963,7 @@ { key => "ROOT_PASSWORD", value => "weakpassword" }, { key => "USER_LOGIN", value => "false" }, { key => "BOOTFROM", value => "c" }, - { key => "HDD_1", value => "disk_f%CURRREL%_minimal_2_%ARCH%.img" }, + { key => "HDD_1", value => "disk_f%CURRREL%_minimal_3_%ARCH%.img" }, { key => "UPGRADE", value => "1" }, { key => "TEST_TARGET", value => "COMPOSE" }, ], @@ -5063,7 +5063,7 @@ { key => "ROOT_PASSWORD", value => "weakpassword" }, { key => "USER_LOGIN", value => "false" }, { key => "BOOTFROM", value => "c" }, - { key => "HDD_1", value => "disk_f%PREVREL%_minimal_2_%ARCH%.img" }, + { key => "HDD_1", value => "disk_f%PREVREL%_minimal_3_%ARCH%.img" }, { key => "UPGRADE", value => "1" }, { key => "TEST_TARGET", value => "COMPOSE" }, ], diff --git a/templates-updates b/templates-updates index 915f4c3e..3e7b6d9d 100755 --- a/templates-updates +++ b/templates-updates @@ -366,6 +366,30 @@ }, test_suite => { name => "advisory_boot" }, }, + { + group_name => "Fedora Updates", + machine => { name => "64bit" }, + prio => 40, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "updates-installer", + version => "*", + }, + test_suite => { name => "installer_build" }, + }, + { + group_name => "Fedora Updates", + machine => { name => "64bit" }, + prio => 40, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "updates-installer", + version => "*", + }, + test_suite => { name => "install_default_update" }, + }, { group_name => "Fedora PowerPC Updates", machine => { name => "ppc64le" }, @@ -881,6 +905,15 @@ ], version => "*", }, + { + arch => "x86_64", + distri => "fedora", + flavor => "updates-installer", + name => "", + settings => [ + ], + version => "*", + }, { arch => "ppc64le", distri => "fedora", @@ -937,5 +970,24 @@ { key => "ADVISORY_BOOT_TEST", value => "1" }, ], }, + { + name => "installer_build", + settings => [ + { key => "POSTINSTALL", value => "_installer_build" }, + { key => "USER_LOGIN", value => "false" }, + { key => "ROOT_PASSWORD", value => "weakpassword" }, + { key => "BOOTFROM", value => "c" }, + { key => "HDD_1", value => "disk_f%VERSION%_minimal_3_%ARCH%.img" }, + ], + }, + { + name => "install_default_update", + settings => [ + { key => "INSTALL", value => "1" }, + { key => "ISO", value => "%ADVISORY%-netinst-%ARCH%.iso" }, + { key => "PACKAGE_SET", value => "default" }, + { key => "+START_AFTER_TEST", value => "installer_build" }, + ], + }, ], } diff --git a/tests/_installer_build.pm b/tests/_installer_build.pm new file mode 100644 index 00000000..ffb6a9ee --- /dev/null +++ b/tests/_installer_build.pm @@ -0,0 +1,43 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +sub run { + my $self = shift; + my $version = get_var("VERSION"); + my $advisory = get_var("ADVISORY"); + my $arch = get_var("ARCH"); + # we need lorax from u-t for f28 atm it seems + my $loraxcmd = "dnf -y "; + $loraxcmd .= "--enablerepo=updates-testing " if (get_var("VERSION") eq "28"); + $loraxcmd .= "install lorax"; + assert_script_run $loraxcmd, 90; + # this 'temporary file cleanup' thing can actually wipe bits of + # the lorax install root while lorax is still running... + assert_script_run "systemctl stop systemd-tmpfiles-clean.timer"; + # dracut-fips doesn't exist any more; this breaks f28 builds as + # it *did* exist when f28 came out, so lorax tries to use + # dracut-fips from the frozen release repo with newer lorax from + # the updates repo which obsoletes it, and gets confused + assert_script_run 'sed -i -e "s,dracut-fips,,g" /usr/share/lorax/templates.d/99-generic/runtime-install.tmpl'; + assert_script_run "mkdir -p /root/imgbuild"; + assert_script_run "pushd /root/imgbuild"; + assert_script_run "setenforce Permissive"; + my $cmd = "lorax -p Fedora -v ${version} -r ${version} --repo=/etc/yum.repos.d/fedora.repo"; + unless (get_var("DEVELOPMENT")) { + $cmd .= " --isfinal --repo=/etc/yum.repos.d/fedora-updates.repo"; + } + $cmd .= " --repo=/etc/yum.repos.d/advisory.repo ./results"; + assert_script_run $cmd, 1500; + assert_script_run "mv results/images/boot.iso ./${advisory}-netinst-${arch}.iso"; + upload_asset "./${advisory}-netinst-x86_64.iso"; +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: