Skip to content

Commit

Permalink
Add openSUSEway test
Browse files Browse the repository at this point in the history
  • Loading branch information
cedvid committed Oct 9, 2024
1 parent ee1dc5c commit 8ba3ad5
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
4 changes: 4 additions & 0 deletions products/opensuse/main.pm
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ sub load_otherDE_tests {
if ($de =~ /^enlightenment$/) { load_enlightenment_tests(); }
if ($de =~ /^mate$/) { load_mate_tests(); }
if ($de =~ /^lxqt$/) { load_lxqt_tests(); }
if ($de =~ /^sway/) { load_sway_tests(); }
load_shutdown_tests;
return 1;
}
Expand All @@ -190,6 +191,9 @@ sub load_mate_tests {
loadtest "x11/mate_terminal";
}

sub load_sway_tests {
}

sub install_online_updates {
return 0 unless get_var('INSTALL_ONLINE_UPDATES');

Expand Down
15 changes: 15 additions & 0 deletions schedule/sway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: test sway
description: >
Tests sway
schedule:
- boot/boot_to_desktop
- console/system_prepare
- console/consoletest_setup
- console/hostname
- update/zypper_clear_repos
- console/install_sway_pattern
- console/consoletest_finish
- x11/sway_reconfigure_openqa.pm
- x11/reboot_icewm
- installation/opensuse_welcome
- shutdown/shutdown
33 changes: 33 additions & 0 deletions tests/console/install_sway_pattern.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SUSE's openQA tests
#
# Copyright 2012-2016 SUSE LLC
# SPDX-License-Identifier: FSFAP

# Summary: Framework to test other Desktop Environments
# Non-Primary desktop environments are generally installed by means
# of a pattern. For those tests, we assume a minimal-X based installation
# where the pattern is being installed on top.
# Maintainer: Dominique Leuenberger <dimstar@opensuse.org>

use base "consoletest";
use strict;
use warnings;
use testapi;
use utils;

sub run {
select_console 'root-console';

script_run("zypper lr -d | tee /dev/$serialdev");

zypper_call "in -t pattern sway";

# Reset the state of lightdm, to have the new default in use (lightdm saves what the user's last session was)
assert_script_run("rm -f ~lightdm/.cache/lightdm-gtk-greeter/state /var/lib/AccountsService/users/*");
}

sub test_flags {
return {milestone => 1, fatal => 1};
}

1;
27 changes: 27 additions & 0 deletions tests/x11/sway_reconfigure_openqa.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SUSE's openQA tests

Check failure on line 1 in tests/x11/sway_reconfigure_openqa.pm

View workflow job for this annotation

GitHub Actions / CI: Running static tests with perl v5.32

File tests/x11/sway_reconfigure_openqa.pm needs tidying
#
# Copyright SUSE LLC
# SPDX-License-Identifier: FSFAP

# Summary: Other Desktop Environments: sway
# Update the openQA internal configuration after the DE has been installed
# Maintainer: Dominique Leuenberger <dimstar@opensuse.org>

use base "x11test";
use strict;
use warnings;
use testapi;
use utils;

sub run {
my $self = shift;

set_var('DESKTOP', 'sway');

set_var('DISPLAYMANAGER', 'sddm');
set_var('DM_NEEDS_USERNAME', 1);

$self->result('ok');
}

1;

0 comments on commit 8ba3ad5

Please sign in to comment.