Skip to content

Commit

Permalink
Fix screen share test
Browse files Browse the repository at this point in the history
Use gnome-remote-desktop to share the screen in SLE 15 SP4. Renamed the test vino_screensharing_available
to generic screensharing_available to test the screen share availability across all SLE flavors
  • Loading branch information
DeepthiYV committed Mar 30, 2022
1 parent 02b0084 commit 3d9e33a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
3 changes: 2 additions & 1 deletion lib/main_common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,7 @@ sub load_x11tests {
loadtest(is_sle('<15') ? "x11/rhythmbox" : "x11/gnome_music");
loadtest "x11/wireshark";
loadtest "x11/ImageMagick";
loadtest "x11/remote_desktop/screensharing_available" if is_sle("15-sp4+");
loadtest "x11/ghostscript";
}
}
Expand Down Expand Up @@ -1581,7 +1582,7 @@ sub load_extra_tests_desktop {

}
if (gnomestep_is_applicable()) {
loadtest "x11/remote_desktop/vino_screensharing_available";
loadtest "x11/remote_desktop/screensharing_available";
}
if (get_var("DESKTOP") =~ /kde|gnome/) {
loadtest "x11/libqt5_qtbase" if (is_sle("12-SP3+") || is_opensuse);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2018-2019 SUSE LLC
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Package: gnome-control-center vino systemd
# Package: gnome-control-center vino systemd gnome-remote-desktop
# Summary: Test if the Screen Sharing GNOME Desktop functionality works
# We currently need to install vino package for that
# - Launch "gnome-control-center sharing"
Expand All @@ -19,14 +19,13 @@ use strict;
use warnings;
use testapi;
use x11utils 'handle_relogin';
use version_utils 'is_leap';
use version_utils qw(is_leap is_sle);

sub run {
select_console 'x11';

# Run the gnome-control-center - the sharing section
x11_start_program "gnome-control-center sharing", target_match => 'vino_screensharing_available-gnome-control-center-sharing';

# Always check the common sharing functionality is enabled
if (check_screen 'disabled_sharing') {
assert_and_click 'disabled_sharing';
Expand All @@ -35,18 +34,23 @@ sub run {
# It may happen that the screen sharing is not available
assert_screen [qw(with_screensharing without_screensharing)];
if (match_has_tag 'without_screensharing') {
record_info 'vino missing', 'After the installation the screen sharing is not available - vino is missing and we need to install it now.';
send_key 'ctrl-q';

# Install the vino package which is probably the case of missing screen sharing option
ensure_installed 'vino';

if (is_sle("15-sp4+")) {
record_info 'gnome-remote-desktop', 'After the installation the screen sharing is not available - gnome-remote-dekstop is missing and we need to install it now.';
send_key 'ctrl-q';
# Install the gnome-remote-desktop package which is probably the case of missing screen sharing option
ensure_installed 'gnome-remote-desktop';
}
else {
record_info 'vino missing', 'After the installation the screen sharing is not available - vino is missing and we need to install it now.';
send_key 'ctrl-q';
# Install the vino package which is probably the case of missing screen sharing option
ensure_installed 'vino';
}
# Log of and back in to ensure the vino feature gets enabled
handle_relogin;

# Run the gnome-control-center to ensure the same state as we were while entering this if block
x11_start_program "gnome-control-center sharing", target_match => 'vino_screensharing_available-gnome-control-center-sharing';

# Always check the common sharing functionality is enabled
if (check_screen 'disabled_sharing') {
assert_and_click 'disabled_sharing';
Expand All @@ -64,7 +68,7 @@ sub run {
record_soft_failure 'boo#1137569 - screen sharing not yet supported on wayland';
} else {
assert_screen 'with_screensharing';
record_info 'vino present', 'Vino and the screen sharing are present';
is_sle("15-sp4+") ? record_info('gnome-remote-desktop present and the screen sharing are present') : record_info('vino present', 'Vino and the screen sharing are present');
}
send_key 'ctrl-q';
}
Expand Down

0 comments on commit 3d9e33a

Please sign in to comment.