diff --git a/lib/utils.pm b/lib/utils.pm index a9d6037e..a1eee9d6 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -54,6 +54,21 @@ sub desktop_vt { $tty = $1; # most recent match is probably best } send_key "ctrl-alt-f${tty}"; + # work around https://gitlab.gnome.org/GNOME/gnome-software/issues/582 + # if it happens. As of 2019-05, seeing something similar on KDE too + my $desktop = get_var('DESKTOP'); + if (check_screen "auth_required", 10) { + record_soft_failure "spurious 'auth required' - https://gitlab.gnome.org/GNOME/gnome-software/issues/582"; + assert_and_click "auth_required" if ($desktop eq 'kde'); + # bit sloppy but correct for both... + type_very_safely "weakpassword\n"; + # as of 2019-04 when we hit this bug it seems to ask for + # auth *twice*, so handle that + sleep 3; + if (check_screen "auth_required", 1) { + type_very_safely "weakpassword\n"; + } + } } # Wait for login screen to appear. Handle the annoying GPU buffer @@ -513,9 +528,12 @@ sub gnome_initial_setup { } } } - # click 'Skip' one time (this is the 'goa' screen) - mouse_set(100,100); - wait_screen_change { assert_and_click "skip_button"; }; + unless (get_var("VNC_CLIENT")) { + # click 'Skip' one time (this is the 'goa' screen). We don't + # get it on VNC_CLIENT case as network isn't working (yet) + mouse_set(100,100); + wait_screen_change { assert_and_click "skip_button"; }; + } send_key "ret"; if ($args{prelogin}) { # create user diff --git a/main.pm b/main.pm index 5dde1da2..cd9120c9 100644 --- a/main.pm +++ b/main.pm @@ -140,8 +140,8 @@ sub load_install_tests() { # boot phase is loaded automatically every time autotest::loadtest "tests/_boot_to_anaconda.pm"; - # if this is a kickstart install, that's all folks - return if (get_var("KICKSTART")); + # if this is a kickstart or VNC install, that's all folks + return if (get_var("KICKSTART") || get_var("VNC_SERVER")); # Root password and user creation spokes are suppressed on # Workstation live install and Silverblue DVD install, so we do @@ -256,6 +256,10 @@ sub load_postinstall_tests() { autotest::loadtest "tests/_memcheck.pm"; return; } + # VNC client test's work is done once install is complete + if (get_var("VNC_CLIENT")) { + return; + } # load the early tests _load_early_postinstall_tests(); diff --git a/needles/anaconda/vnc/boxes_allow_inhibit-20191105.json b/needles/anaconda/vnc/boxes_allow_inhibit-20191105.json new file mode 100644 index 00000000..f003cb3f --- /dev/null +++ b/needles/anaconda/vnc/boxes_allow_inhibit-20191105.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 615, + "ypos": 437, + "width": 43, + "height": 14, + "type": "match" + } + ], + "properties": [], + "tags": [ + "boxes_allow_inhibit" + ] +} \ No newline at end of file diff --git a/needles/anaconda/vnc/boxes_allow_inhibit-20191105.png b/needles/anaconda/vnc/boxes_allow_inhibit-20191105.png new file mode 100644 index 00000000..95f53f7a Binary files /dev/null and b/needles/anaconda/vnc/boxes_allow_inhibit-20191105.png differ diff --git a/needles/anaconda/vnc/boxes_new_connection-20191105.json b/needles/anaconda/vnc/boxes_new_connection-20191105.json new file mode 100644 index 00000000..4b0298e2 --- /dev/null +++ b/needles/anaconda/vnc/boxes_new_connection-20191105.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 17, + "ypos": 42, + "width": 16, + "height": 16, + "type": "match" + } + ], + "properties": [], + "tags": [ + "boxes_new_connection" + ] +} \ No newline at end of file diff --git a/needles/anaconda/vnc/boxes_new_connection-20191105.png b/needles/anaconda/vnc/boxes_new_connection-20191105.png new file mode 100644 index 00000000..bf32190a Binary files /dev/null and b/needles/anaconda/vnc/boxes_new_connection-20191105.png differ diff --git a/needles/anaconda/vnc/boxes_remote-20191105.json b/needles/anaconda/vnc/boxes_remote-20191105.json new file mode 100644 index 00000000..37f2d0fc --- /dev/null +++ b/needles/anaconda/vnc/boxes_remote-20191105.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 115, + "ypos": 130, + "width": 50, + "height": 15, + "type": "match" + } + ], + "properties": [], + "tags": [ + "boxes_remote" + ] +} \ No newline at end of file diff --git a/needles/anaconda/vnc/boxes_remote-20191105.png b/needles/anaconda/vnc/boxes_remote-20191105.png new file mode 100644 index 00000000..4273706a Binary files /dev/null and b/needles/anaconda/vnc/boxes_remote-20191105.png differ diff --git a/templates b/templates index 00845cea..1fb9f1c9 100755 --- a/templates +++ b/templates @@ -799,6 +799,28 @@ }, test_suite => { name => "install_repository_hd_variation" }, }, + { + machine => { name => "64bit" }, + prio => 40, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "Server-dvd-iso", + version => "*", + }, + test_suite => { name => "install_vnc_server" }, + }, + { + machine => { name => "64bit" }, + prio => 40, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "Server-dvd-iso", + version => "*", + }, + test_suite => { name => "install_vnc_client" }, + }, { machine => { name => "64bit" }, prio => 20, @@ -5116,6 +5138,30 @@ { key => "REPOSITORY_VARIATION", value => "%LOCATION%" }, ], }, + { + name => "install_vnc_server", + settings => [ + { key => "VNC_SERVER", value => "1" }, + { key => "GRUB", value => "inst.vnc net.ifnames=0 biosdevname=0 ip=10.0.2.114::10.0.2.2:255.255.255.0:vnc001.domain.local:eth0:off" }, + { key => "NICTYPE", value => "tap" }, + { key => "WORKER_CLASS", value => "tap" }, + ], + }, + { + name => "install_vnc_client", + settings => [ + { key => "VNC_CLIENT", value => "1" }, + { key => "BOOTFROM", value => "c" }, + { key => "INSTALL", value => "1" }, + { key => "DESKTOP", value => "gnome" }, + { key => "HDD_1", value => "disk_f%CURRREL%_desktop_4_x86_64.img" }, + { key => "PARALLEL_WITH", value => "install_vnc_server" }, + { key => "PREINSTALL", value => "_graphical_wait_login _vnc_client_connect" }, + { key => "GRUB_POSTINSTALL", value => "net.ifnames=0 biosdevname=0" }, + { key => "NICTYPE", value => "tap" }, + { key => "WORKER_CLASS", value => "tap" }, + ], + }, { name => "base_selinux", settings => [ diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index 0a7b6235..ec58d133 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -3,6 +3,7 @@ use strict; use lockapi; use testapi; use utils; +use tapnet; use anaconda; sub run { @@ -51,13 +52,16 @@ sub run { my $timeout = 30; $timeout = 120 if (get_var("PXEBOOT")); - # call do_bootloader with postinstall=0, the params, and the mutex - do_bootloader(postinstall=>0, params=>$params, mutex=>$mutex, timeout=>$timeout); + # call do_bootloader with postinstall=0, the params, and the mutex, + # unless we're a VNC install client (no bootloader there) + unless (get_var("VNC_CLIENT")) { + do_bootloader(postinstall=>0, params=>$params, mutex=>$mutex, timeout=>$timeout); + } # Read variables for identification tests (see further). my $identification = get_var('IDENTIFICATION'); # proceed to installer - if (get_var("KICKSTART")) { + if (get_var("KICKSTART") || get_var("VNC_SERVER")) { # wait for the bootloader *here* - in a test that inherits from # anacondatest - so that if something goes wrong during install, # we get anaconda logs. sleep a bit first so we don't get a diff --git a/tests/_graphical_wait_login.pm b/tests/_graphical_wait_login.pm index 4841ca9c..2870551d 100644 --- a/tests/_graphical_wait_login.pm +++ b/tests/_graphical_wait_login.pm @@ -14,6 +14,12 @@ sub run { $wait_time = 1800 if (get_var("KICKSTART")); $wait_time = 6000 if (get_var("UPGRADE") && !get_var("ENCRYPT_PASSWORD")); + # handle bootloader, if requested + if (get_var("GRUB_POSTINSTALL")) { + do_bootloader(postinstall=>1, params=>get_var("GRUB_POSTINSTALL"), timeout=>$wait_time); + $wait_time = 300; + } + # Handle pre-login initial setup if we're doing INSTALL_NO_USER if (get_var("INSTALL_NO_USER") && !get_var("_setup_done")) { if (get_var("DESKTOP") eq 'gnome') { diff --git a/tests/_vnc_client_connect.pm b/tests/_vnc_client_connect.pm new file mode 100644 index 00000000..60e8e901 --- /dev/null +++ b/tests/_vnc_client_connect.pm @@ -0,0 +1,28 @@ +use base "installedtest"; +use strict; +use tapnet; +use testapi; +use utils; + +sub run { + my $self = shift; + $self->root_console(tty=>3); + setup_tap_static('10.0.2.115', 'vnc002.domain.local'); + # test test: check if we can see the server + assert_script_run "ping -c 2 10.0.2.114"; + desktop_vt; + menu_launch_type('boxes'); + assert_and_click('boxes_new_connection'); + assert_and_click('boxes_remote'); + type_safely("vnc://10.0.2.114:5901\n"); + assert_and_click('boxes_allow_inhibit'); + assert_and_click('boxes_fullscreen'); +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/desktop_update_graphical.pm b/tests/desktop_update_graphical.pm index 86def851..1d435307 100644 --- a/tests/desktop_update_graphical.pm +++ b/tests/desktop_update_graphical.pm @@ -13,20 +13,6 @@ sub run { prepare_test_packages; # get back to the desktop desktop_vt; - # work around https://gitlab.gnome.org/GNOME/gnome-software/issues/582 - # if it happens. As of 2019-05, seeing something similar on KDE too - if (check_screen "auth_required", 10) { - record_soft_failure "spurious 'auth required' - https://gitlab.gnome.org/GNOME/gnome-software/issues/582"; - assert_and_click "auth_required" if ($desktop eq 'kde'); - # bit sloppy but correct for both... - type_very_safely "weakpassword\n"; - # as of 2019-04 when we hit this bug it seems to ask for - # auth *twice*, so handle that - sleep 3; - if (check_screen "auth_required", 1) { - type_very_safely "weakpassword\n"; - } - } # run the updater if ($desktop eq 'kde') {