-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add grub_tests into agama_install schedule #20158
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,9 @@ | |
|
||
# Setting agama live media root password | ||
# https://github.com/openSUSE/agama/blob/master/doc/live_iso.md#the-access-password | ||
|
||
# This test suite handles basic installation of Leap and Tumbleweed with Agama | ||
# Actions past install-screen with reboot button ara handled separately in agama_reboot.pm | ||
# Maintainer: Lubos Kocman <[email protected]>, | ||
|
||
use strict; | ||
|
@@ -19,15 +22,6 @@ use utils; | |
use Utils::Logging qw(export_healthcheck_basic); | ||
use x11utils 'ensure_unlocked_desktop'; | ||
|
||
# Borrowed from grub2_tests.pm | ||
sub edit_cmdline { | ||
send_key 'e'; | ||
my $jump_down = is_sle('<15-sp4') ? '12' : '8'; | ||
send_key 'down' for (1 .. $jump_down); | ||
send_key_until_needlematch 'grub2-edit-linux-line', 'down'; | ||
send_key 'end'; | ||
} | ||
|
||
sub agama_set_root_password_dialog { | ||
wait_still_screen 5; | ||
|
||
|
@@ -183,15 +177,6 @@ sub run { | |
last; | ||
} | ||
} | ||
|
||
assert_screen('agama-congratulations'); | ||
console('installation')->set_tty(get_agama_install_console_tty()); | ||
upload_agama_logs(); | ||
select_console('installation', await_console => 0); | ||
# make sure newly booted system does not expect we're still logged in console | ||
reset_consoles(); | ||
assert_and_click('agama-reboot-after-install'); | ||
|
||
} | ||
|
||
=head2 post_fail_hook | ||
|
@@ -213,4 +198,5 @@ sub post_fail_hook { | |
upload_agama_logs(); | ||
} | ||
|
||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# oSUSE's openQA tests | ||
# | ||
# Copyright 2024 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Summary: Installation of Leap or Tumbleweed with Agama | ||
# https://github.com/openSUSE/agama/ | ||
|
||
# Exepcted to be executed right after agama.pm | ||
# This test handles actions that happen once we see the reboot button after install | ||
# 1) Switch from installer to console to Upload logs | ||
# 2) Switch back to X11/Wayland and reset_console s | ||
# so newly booted system does not think that we're still logged in console | ||
# 3) workaround for no ability to disable grub timeout in agama | ||
# https://github.com/openSUSE/agama/issues/1594 | ||
# grub_test() is too slow to catch boot screen for us | ||
# Maintainer: Lubos Kocman <[email protected]>, | ||
|
||
use strict; | ||
use warnings; | ||
use base "installbasetest"; | ||
use testapi; | ||
use version_utils qw(is_leap is_sle); | ||
use utils; | ||
use Utils::Logging qw(export_healthcheck_basic); | ||
use x11utils 'ensure_unlocked_desktop'; | ||
|
||
sub upload_agama_logs { | ||
return if (get_var('NOLOGS')); | ||
select_console("root-console"); | ||
# stores logs in /tmp/agma-logs.tar.gz | ||
script_run('agama logs store'); | ||
upload_logs('/tmp/agama-logs.tar.gz'); | ||
} | ||
|
||
sub get_agama_install_console_tty { | ||
# get_x11_console_tty would otherwise autodetermine 2 | ||
return 7; | ||
} | ||
|
||
sub run { | ||
my ($self) = @_; | ||
|
||
assert_screen('agama-congratulations'); | ||
console('installation')->set_tty(get_agama_install_console_tty()); | ||
upload_agama_logs(); | ||
select_console('installation', await_console => 0); | ||
# make sure newly booted system does not expect we're still logged in console | ||
reset_consoles(); | ||
assert_and_click('agama-reboot-after-install'); | ||
|
||
# workaround for lack of disable bootloader timeout | ||
# https://github.com/openSUSE/agama/issues/1594 | ||
# simply send space until we hit grub2 | ||
send_key_until_needlematch("bootloader-grub2", 'spc', 50, 3); | ||
|
||
} | ||
|
||
=head2 post_fail_hook | ||
|
||
post_fail_hook(); | ||
|
||
When the test module fails, this method will be called. | ||
It will try to fetch logs from agama. | ||
|
||
=cut | ||
|
||
sub post_fail_hook { | ||
my ($self) = @_; | ||
|
||
return if (get_var('NOLOGS')); | ||
|
||
select_console("root-console"); | ||
export_healthcheck_basic(); | ||
upload_agama_logs(); | ||
} | ||
|
||
|
||
1; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was forgotten and unused