diff --git a/main.pm b/main.pm index 60c1a445..f83c16e3 100644 --- a/main.pm +++ b/main.pm @@ -31,10 +31,14 @@ else unless (get_var("KICKSTART")) { - ## Select installation source + ## Installation source if (get_var('MIRRORLIST_GRAPHICAL') || get_var("REPOSITORY_GRAPHICAL")){ autotest::loadtest get_var('CASEDIR')."/tests/install_source_graphical.pm"; } + if (get_var("REPOSITORY_VARIATION")){ + autotest::loadtest get_var('CASEDIR')."/tests/install_source_variation.pm"; + } + ## Select minimal flavor if (get_var("FLAVOR") eq "server") { diff --git a/needles/anaconda_install_source_check_repo_added_inst_repo.json b/needles/anaconda_install_source_check_repo_added_inst_repo.json new file mode 100644 index 00000000..6f0a5850 --- /dev/null +++ b/needles/anaconda_install_source_check_repo_added_inst_repo.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 229, + "ypos": 17, + "width": 327, + "height": 15, + "type": "match" + } + ], + "tags": [ + "anaconda_install_source_check_repo_added", + "ENV-DISTRI-fedora", + "ENV-INSTLANG-en_US", + "ENV-OFW-1", + "ENV-FLAVOR-server" + ] +} \ No newline at end of file diff --git a/needles/anaconda_install_source_check_repo_added_inst_repo.png b/needles/anaconda_install_source_check_repo_added_inst_repo.png new file mode 100644 index 00000000..b090add8 Binary files /dev/null and b/needles/anaconda_install_source_check_repo_added_inst_repo.png differ diff --git a/templates b/templates index 9ce2270e..d4f35f73 100755 --- a/templates +++ b/templates @@ -104,5 +104,13 @@ ], variables => "", }, + { + name => "server_repository_http_variation", + prio => 8, + settings => [ + { key => "REPOSITORY_VARIATION", value => "1" }, + ], + variables => "", + }, ], } diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index 74900349..25c1b538 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -16,6 +16,25 @@ sub run { if( get_var("GRUB")){ send_key "tab"; type_string " ".get_var("GRUB"); + + } + + if (get_var("REPOSITORY_VARIATION")){ + unless (get_var("GRUB")){ + send_key "tab"; + } + my $fedora_version = ""; + my $repourl = ""; + + if (get_var("VERSION") eq "rawhide"){ + $fedora_version = "rawhide"; + } + else { + $fedora_version = (split /_/, get_var("BUILD"))[0]; + } + + $repourl = "http://download.fedoraproject.org/pub/fedora/linux/development/".$fedora_version."/".get_var("ARCH")."/os"; + type_string " inst.repo=".$repourl; } send_key "ret"; diff --git a/tests/install_source_graphical.pm b/tests/install_source_graphical.pm index 4ce1f0fa..b9cb79ea 100644 --- a/tests/install_source_graphical.pm +++ b/tests/install_source_graphical.pm @@ -53,9 +53,9 @@ sub run { assert_screen "anaconda_main_hub", 300; # check that the repo was used - send_key "ctrl-alt-f3"; + send_key "ctrl-alt-f2"; wait_idle 10; - type_string "grep \"".$repourl."\" /tmp/packaging.log | grep \"added repo\""; + type_string "grep \"".$repourl."\" /tmp/packaging.log"; # | grep \"added repo\""; send_key "ret"; assert_screen "anaconda_install_source_check_repo_added"; send_key "ctrl-alt-f6"; diff --git a/tests/install_source_variation.pm b/tests/install_source_variation.pm new file mode 100644 index 00000000..95903ce8 --- /dev/null +++ b/tests/install_source_variation.pm @@ -0,0 +1,47 @@ +use base "basetest"; +use strict; +use testapi; + +sub run { + # !!! GRUB parameter is set in _boot_to_anaconda.pm !!! + + # Anaconda hub + assert_screen "anaconda_main_hub"; + + # FIXME: this code is scattered in at least three places (here, _boot_to_anaconda, _install_source_graphical. Deduplicate + my $fedora_version = ""; + my $repourl = ""; + + if (get_var("VERSION") eq "rawhide"){ + $fedora_version = "rawhide"; + } + else { + $fedora_version = (split /_/, get_var("BUILD"))[0]; + } + + $repourl = "download.fedoraproject.org/pub/fedora/linux/development/".$fedora_version."/".get_var("ARCH")."/os"; + + # check that the repo was used + send_key "ctrl-alt-f2"; + wait_idle 10; + type_string "grep \"".$repourl."\" /tmp/packaging.log"; #| grep \"added repo\""; + send_key "ret"; + assert_screen "anaconda_install_source_check_repo_added"; + send_key "ctrl-alt-f6"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 30; # + +} + +sub test_flags { + # without anything - rollback to 'lastgood' snapshot if failed + # 'fatal' - whole test suite is in danger if this fails + # 'milestone' - after this test succeeds, update 'lastgood' + # 'important' - if this fails, set the overall state to 'fail' + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: