Create test suite for Fedora Media Writer #462

Merged
adamwill merged 16 commits from newtest/fedora-media-writer into main 2026-06-08 04:02:55 +00:00
105 changed files with 1176 additions and 105 deletions

View file

@ -0,0 +1,26 @@
name: AI Code Review
on:
pull_request_target:
types: [labeled]
jobs:
ai-review:
if: forgejo.event.label.name == 'ai-review-please'
runs-on: fedora
container:
image: registry.gitlab.com/redhat/edge/ci-cd/ai-code-review:v2.3.0
steps:
- name: Run AI Review
env:
AI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: ai-code-review --platform forgejo --pr-number ${{ forgejo.event.pull_request.number }} --post
# this has to be a separate job because ai-code-review container does not have nodejs in it
# also note this does not work for PRs from forks because of a forgejo bug
# https://codeberg.org/forgejo/forgejo/issues/10733
remove-label:
runs-on: fedora
steps:
- uses: https://github.com/actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0
with:
labels: ai-review-please

32
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,32 @@
name: CI via Tox and perl
on:
pull_request:
types: [opened, synchronize]
jobs:
tox:
runs-on: fedora
container:
image: quay.io/fedora/fedora:latest
steps:
- name: Install required packages
run: dnf -y install nodejs tox git
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
fetch-depth: 0
- name: Install Python interpreters
run: for py in 3.10 3.11 3.12 3.13 3.14; do dnf -y install python$py; done
- name: Test with tox
run: tox
perl:
runs-on: fedora
container:
image: quay.io/fedora/fedora:latest
steps:
- name: Install required packages
run: dnf -y install nodejs git os-autoinst perl-Test-Strict perl-Test-Harness perl-JSON perl-REST-Client perl-Code-TidyAll
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
fetch-depth: 0
- name: Run perl tests
run: prove t/

View file

@ -1,15 +0,0 @@
- job:
name: os-autoinst-tox
run: ci/tox.yaml
nodeset: fedora-latest-container
- job:
name: os-autoinst-perl
run: ci/perl.yaml
nodeset: fedora-latest-container
- project:
check:
jobs:
- os-autoinst-tox
- os-autoinst-perl

View file

@ -1,10 +1,10 @@
# openQA tests for the Fedora distribution
This repository contains tests and images for testing [Fedora](https://getfedora.org/) with [openQA](http://os-autoinst.github.io/openQA/). The [fedora_openqa library and CLI](https://pagure.io/fedora-qa/fedora_openqa) are used for scheduling tests, and [createhdds](https://pagure.io/fedora-qa/createhdds) is used for creating base disk images for the test. For openQA installation instructions, see [the Fedora openQA wiki page](https://fedoraproject.org/wiki/OpenQA).
This repository contains tests and images for testing [Fedora](https://getfedora.org/) with [openQA](http://os-autoinst.github.io/openQA/). The [fedora_openqa library and CLI](https://forge.fedoraproject.org/quality/fedora_openqa) are used for scheduling tests, and [createhdds](https://forge.fedoraproject.org/quality/createhdds) is used for creating base disk images for the test. For openQA installation instructions, see [the Fedora openQA wiki page](https://fedoraproject.org/wiki/OpenQA).
## Issues
[Issues](https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issues) and [pull requests](https://pagure.io/fedora-qa/os-autoinst-distri-fedora/pull-requests) are tracked in [os-autoinst-distri-fedora Pagure](https://pagure.io/fedora-qa/os-autoinst-distri-fedora). Pagure uses a Github-like pull request workflow, so if you're familiar with that, you can easily submit Pagure pull requests. If not, you can read up in the [Pagure documentation](https://docs.pagure.org/pagure/usage/index.html).
[Issues](https://forge.fedoraproject.org/quality/os-autoinst-distri-fedora/issues) and [pull requests](https://forge.fedoraproject.org/quality/os-autoinst-distri-fedora/pulls) are tracked in [Fedora Forge](https://forge.fedoraproject.org/quality/os-autoinst-distri-fedora). Forge uses a Github-like pull request workflow, so if you're familiar with that, you can easily submit Forge pull requests. If not, you can read up in the [Forgejo documentation](https://forgejo.org/docs/latest/user/pull-requests-and-git-flow/).
## Requirements
@ -79,13 +79,13 @@ There are also several modules that export utility functions, currently `utils`,
and `test_flags()` method, inheriting from one of the classes mentioned above.
2. Set correct variables (so that all test parts you have made are executed) in [WebUI -> Test suites](https://localhost:8080/admin/test_suites).
3. Link your newly created Test suite to medium type in [WebUI -> Job groups](https://localhost:8080/admin/groups).
4. Run test (see [fedora_openqa repository](https://pagure.io/fedora-qa/fedora_openqa)).
4. Run test (see [fedora_openqa repository](https://forge.fedoraproject.org/quality/fedora_openqa)).
5. Create needles (images) by using interactive mode and needles editor in WebUI.
6. Add new test suite and profiles into `templates.fif.json` file (and/or `templates-updates.fif.json`, if the test is applicable to the update testing workflow)
7. Add new Test suite and Test case into [`conf_test_suites.py`](https://pagure.io/fedora-qa/fedora_openqa/blob/master/f/src/fedora_openqa/conf_test_suites.py) file in fedora_openqa repository.
7. Add new Test suite and Test case into [`conf_test_suites.py`](https://forge.fedoraproject.org/quality/fedora_openqa/src/branch/main/src/fedora_openqa/conf_test_suites.py) file in fedora_openqa repository.
8. Run `tox`. This will check the templates are valid.
9. Open pull request for the os-autoinst-distri-fedora changes in [Pagure](https://pagure.io/fedora-qa/os-autoinst-distri-fedora). Pagure uses a Github-style workflow (summary: fork the project via the web interface, push your changes to a branch on your fork, then use the web interface to submit a pull request). See the [Pagure documentation](https://docs.pagure.org/pagure/usage/index.html) for more details.
10. Open a pull request in [fedora_openqa Pagure](https://pagure.io/fedora-qa/fedora_openqa) for any necessary fedora_openqa changes.
9. Open pull request for the os-autoinst-distri-fedora changes in [the repository](https://forge.fedoraproject.org/quality/os-autoinst-distri-fedora). Forgejo uses a Github-style workflow.
10. Open a pull request in [fedora_openqa](https://forge.fedoraproject.org/quality/fedora_openqa) for any necessary fedora_openqa changes.
### Language handling

View file

@ -267,9 +267,14 @@ for app in ("focuswriter", "gvim"):
runapps = ("seahorse", "kwrite", "tuxracer", "akregator", "ark", "discover", "dolphin",
"gwenview", "kaddressbook", "kcalc", "kcharselect", "kfind", "krdc", "ktnef",
"kwallet", "kwalletmanager", "neochat", "spectacle", "docviewer", "patience",
"kolourpaint", "korganizer", "characters", "tux_racer", "krfb")
"kolourpaint", "korganizer", "characters", "tux_racer", "krfb", "media-writer")
for app in runapps:
testtags.append(f"apps_run_{app}")
# For media writer test
for media_specs in ("43", "workstation", "x86_64"):
testtags.append(f"mwriter_select_{media_specs}")
testtags.append(f"mwriter_selected_{media_specs}")
testtags.append("mwriter_mediagroup_official")
# retcode tracker
ret = 0

View file

@ -1,16 +0,0 @@
# See https://github.com/ansible/ansible/issues/84206 for the background on this
# When the server is on ansible >= 2.19 things should just work, but ours are
# not (RHEL 9 has 2.14, RHEL 8 has 2.15, as I write this)
- name: Ensure that python3-libdnf5 is installed
block:
- name: Check whether python3-libdnf5 is installed
ansible.builtin.command: "rpm -q python3-libdnf5"
register: p3dnf5
failed_when: "1 != 1"
changed_when: "1 != 1"
check_mode: no
- name: Install python3-libdnf5 with direct dnf command
ansible.builtin.command: "dnf -y install python3-libdnf5"
when: "p3dnf5.rc != 0"

View file

@ -1,14 +0,0 @@
- hosts: all
tasks:
- name: Include dnf dependency workaround task
ansible.builtin.include_tasks:
file: dnf-dependency.yaml
- name: Install required packages
package:
name: ['os-autoinst', 'perl-Test-Strict', 'perl-Test-Harness', 'perl-JSON', 'perl-REST-Client', 'perl-Code-TidyAll']
state: present
become: yes
- name: Run perl tests
command: prove t/
args:
chdir: '{{ zuul.project.src_dir }}'

View file

@ -1,17 +0,0 @@
- hosts: all
tasks:
- name: Include dnf dependency workaround task
ansible.builtin.include_tasks:
file: dnf-dependency.yaml
- name: Ensure tox is installed
include_role:
name: ensure-tox
- name: Install all Python versions to test
package:
name: ['python3.10', 'python3.11', 'python3.12', 'python3.13', 'python3.14']
state: present
become: yes
- name: Run tox
command: "{{ tox_executable }}"
args:
chdir: '{{ zuul.project.src_dir }}'

View file

@ -8,19 +8,7 @@ use lockapi;
use testapi;
use utils;
our @EXPORT = qw(add_partitions delete_partition create_partition format_partition edit_partition edit_filesystem authenticate mount_partition resize_partition wipe_disk);
# This routine handles the authentication dialogue when it
# pops out. It provides the admin user (not root) password
# so that system change could be performed on regular
# Workstation.
sub authenticate {
if (check_screen("auth_required", 2)) {
my $password = get_var("USER_PASSWORD") // "weakpassword";
type_very_safely($password);
send_key("ret");
}
}
our @EXPORT = qw(add_partitions delete_partition create_partition format_partition edit_partition edit_filesystem mount_partition resize_partition wipe_disk);
# This routine adds two partitions. This layout is used in
# several testing scripts.

37
lib/mwriter.pm Normal file
View file

@ -0,0 +1,37 @@
package mwriter;
use strict;
use base 'Exporter';
use Exporter;
use lockapi;
use testapi;
use utils;
our @EXPORT = qw(check_written_content);
# Validates that the USB media was written correctly.
# Verifies the embedded checksum on the device and compares its contents
# byte-for-byte with the originally downloaded ISO image.
# Assumes the target device is /dev/sda which is correct as the normal
# disk is /dev/vda and the CD mechanics is /dev/sr0
sub check_written_content {
my $iso = script_output("ls -t /home/test/Downloads/*.iso | head -n1");
my $variant = get_var("SUBVARIANT");
my $checkiso = "checkisomd5 -v /dev/sda";
my $compare = "cmp /dev/sda \"$iso\" 2>&1 | tee /dev/stderr | grep -q 'EOF on .*\.iso'";
# Check the checksum of the written media and compare the ISO and the media.
if ($variant eq "Silverblue") {
toolbox("run", "$checkiso");
}
else {
assert_script_run("$checkiso", timeout => 300);
}
assert_script_run("$compare", timeout => 300);
}
1;

View file

@ -6,7 +6,7 @@ use base 'Exporter';
use Exporter;
use lockapi;
use testapi qw(is_serial_terminal :DEFAULT);
our @EXPORT = qw/run_with_error_check type_safely type_very_safely script_retry desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type prepare_update_mount setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup plasma_setup check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications desktop_launch_terminal solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround dm_perform_login check_software_start reboot_system connections_connect/;
our @EXPORT = qw/run_with_error_check type_safely type_very_safely script_retry desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type prepare_update_mount setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup plasma_setup check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications desktop_launch_terminal solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround dm_perform_login check_software_start reboot_system connections_connect toolbox authenticate/;
# We introduce this global variable to hold the list of applications that have
# registered during the apps_startstop_test when they have sucessfully run.
@ -85,6 +85,7 @@ sub boot_to_login_screen {
my %args = @_;
$args{timeout} //= 300;
$args{waitearly} //= 1;
$args{graphical} //= 0;
if (testapi::is_serial_terminal) {
# For serial console, just wait for the login prompt
unless (wait_serial "login:", timeout => $args{timeout}) {
@ -92,21 +93,22 @@ sub boot_to_login_screen {
}
}
else {
my $tag = $args{graphical} ? 'graphical_login' : 'login_screen';
# we may start at a screen that matches one of the needles; if so,
# wait till we don't (e.g. when rebooting at end of live install,
# we match text_console_login until the console disappears).
# The following is true for non-serial console.
if ($args{waitearly}) {
my $count = 5;
while (check_screen("login_screen", 3) && $count > 0) {
while (check_screen($tag, 3) && $count > 0) {
sleep 5;
$count -= 1;
}
}
assert_screen "login_screen", $args{timeout};
assert_screen $tag, $args{timeout};
if (match_has_tag "graphical_login") {
wait_still_screen(timeout => 30, stilltime => 10, similarity_level => 38);
assert_screen "login_screen";
assert_screen $tag;
}
}
}
@ -500,10 +502,9 @@ sub get_setup_repos_script {
sub get_workarounds {
my $version = shift || get_var("VERSION");
my %workarounds = (
"41" => [],
"42" => ["FEDORA-2026-3c4cf60c3f"],
"42" => [],
"43" => [],
"44" => ["FEDORA-2026-5066c533e8"],
"44" => ['141513954'],
"eln" => [],
);
my $advortasks = $workarounds{$version};
@ -1782,7 +1783,7 @@ sub check_and_install_git {
# This routine is used in Desktop test suites. It downloads the test data from
# tarball and populates the directory structure.
# The tarball is generated by update-data-tarball.sh from the
# https://pagure.io/fedora-qa/openqa_testdata repository; make changes
# https://forge.fedoraproject.org/quality/openqa-testdata repository; make changes
# there, then run the update-data-tarball.sh script and commit the result.
sub download_testdata {
@ -2003,4 +2004,47 @@ sub connections_connect {
assert_and_click("connections_fullscreen_toggle");
}
# Helper for basic toolbox operations.
# Supports creating a toolbox container, installing packages inside it,
# or running a command via toolbox, depending on the requested action.
# Unknown actions are reported as a soft failure.
sub toolbox {
my ($action, $params) = @_;
if ($action eq "install") {
type_string("toolbox -y enter\n");
assert_script_run("true", timeout => 600); # Wait until we have entered the toolbox
assert_script_run("sudo dnf -y install $params");
enter_cmd("exit");
wait_still_screen(2);
}
elsif ($action eq "run") {
assert_script_run("toolbox run $params", timeout => 120);
}
else {
record_soft_failure("The toolbox subroutine was used to perform an unknown command.");
}
}
# This routine handles the authentication dialogue when it
# pops out. It provides the admin user (not root) password
# so that system change could be performed on regular
# Workstation. The routine always needs a $password (first argument).
# Optionally, you can use $timeout and $stillscreen as named args
# to specify how long to wait for the auth dialogue and how long
# to wait after we have authenticated.
sub authenticate {
# Use default values.
my %defaults = (timeout => 15, stillscreen => 5);
my ($password, %kwargs) = @_;
my %args = (%defaults, %kwargs);
if (check_screen("auth_required", timeout => $args{timeout})) {
type_very_safely($password);
send_key("ret");
wait_still_screen($args{stillscreen});
}
}
1;

View file

@ -0,0 +1,22 @@
{
"area": [
{
"type": "match",
"width": 156,
"height": 24,
"xpos": 446,
"ypos": 146
},
{
"width": 55,
"type": "match",
"ypos": 240,
"height": 53,
"xpos": 423
}
],
"properties": [],
"tags": [
"apps_run_media-writer"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 KiB

View file

@ -0,0 +1,22 @@
{
"area": [
{
"width": 156,
"type": "match",
"ypos": 146,
"height": 24,
"xpos": 446
},
{
"width": 55,
"type": "match",
"ypos": 245,
"xpos": 418,
"height": 53
}
],
"properties": [],
"tags": [
"apps_run_media-writer"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

View file

@ -0,0 +1,22 @@
{
"area": [
{
"ypos": 484,
"height": 24,
"type": "match",
"width": 174,
"xpos": 326
},
{
"xpos": 418,
"width": 55,
"height": 53,
"type": "match",
"ypos": 240
}
],
"properties": [],
"tags": [
"apps_run_media-writer"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

View file

@ -0,0 +1,22 @@
{
"area": [
{
"ypos": 466,
"height": 24,
"type": "match",
"width": 174,
"xpos": 326
},
{
"xpos": 423,
"width": 55,
"height": 53,
"type": "match",
"ypos": 235
}
],
"properties": [],
"tags": [
"apps_run_media-writer"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"width": 35,
"ypos": 262,
"height": 20,
"xpos": 699
}
],
"properties": [],
"tags": [
"loupe_set_wallpaper"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"width": 212,
"height": 128,
"ypos": 358,
"xpos": 392
}
],
"properties": [],
"tags": [
"maps_found_pune"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 246,
"ypos": 597,
"width": 47,
"height": 22,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter-about-button"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 639,
"ypos": 497,
"width": 50,
"height": 22,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter-about-close"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 337,
"ypos": 333,
"width": 252,
"height": 25,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter-about-dialog"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 650,
"ypos": 317,
"width": 67,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_choose_button"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 327,
"ypos": 511,
"width": 101,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_choose_isofile"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 554,
"ypos": 466,
"width": 117,
"height": 22,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_confirm_button"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 613,
"ypos": 469,
"width": 43,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_confirm_button"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 297,
"ypos": 344,
"width": 273,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_disk_restored"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 322,
"ypos": 491,
"width": 176,
"height": 24,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_download_automatic"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

View file

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 307,
"ypos": 492,
"width": 196,
"height": 23,
"type": "match"
},
{
"xpos": 470,
"ypos": 484,
"width": 10,
"height": 15,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_download_automatic"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

View file

@ -0,0 +1,19 @@
{
"area": [
{
"xpos": 701,
"ypos": 275,
"width": 28,
"height": 182,
"type": "match",
"click_point": {
"xpos": 14,
"ypos": 91
}
}
],
"properties": [],
"tags": [
"mwriter_dropdown_arch"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

View file

@ -0,0 +1,19 @@
{
"area": [
{
"xpos": 689,
"ypos": 451,
"width": 33,
"height": 18,
"type": "match",
"click_point": {
"xpos": 24.5,
"ypos": 9
}
}
],
"properties": [],
"tags": [
"mwriter_dropdown_arrow"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

View file

@ -0,0 +1,19 @@
{
"area": [
{
"xpos": 700,
"ypos": 271,
"width": 32,
"height": 194,
"type": "match",
"click_point": {
"xpos": 13,
"ypos": 29
}
}
],
"properties": [],
"tags": [
"mwriter_dropdown_version"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 734,
"ypos": 598,
"width": 48,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_finish_button"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 322,
"ypos": 297,
"width": 117,
"height": 26,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_mediagroup_official"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 736,
"ypos": 597,
"width": 42,
"height": 22,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_next_button"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

View file

@ -0,0 +1,26 @@
{
"area": [
{
"xpos": 458,
"ypos": 458,
"width": 108,
"height": 21,
"type": "match"
},
{
"xpos": 733,
"ypos": 598,
"width": 49,
"height": 20,
"type": "match",
"click_point": {
"xpos": 24.5,
"ypos": 10
}
}
],
"properties": [],
"tags": [
"mwriter_ready_button_write"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 726,
"ypos": 598,
"width": 60,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_restore_button"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 327,
"ypos": 546,
"width": 233,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_restore_item"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 306,
"ypos": 293,
"width": 24,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_select_43"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 304,
"width": 24,
"height": 21,
"type": "match",
"ypos": 289
}
],
"properties": [],
"tags": [
"mwriter_select_43"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 305,
"ypos": 272,
"width": 81,
"height": 45,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_select_isofile"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 307,
"ypos": 456,
"width": 143,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_select_workstation"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 306,
"ypos": 361,
"width": 119,
"height": 18,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_select_x86_64"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 298,
"ypos": 447,
"width": 150,
"height": 28,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_selected_workstation"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 298,
"ypos": 396,
"width": 184,
"height": 49,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_usb_present"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 674,
"ypos": 595,
"width": 116,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_write_button"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 734,
"ypos": 598,
"width": 43,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"mwriter_write_button"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"width": 422,
"type": "match",
"height": 38,
"ypos": 107,
"xpos": 14
}
],
"properties": [],
"tags": [
"papers_help_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"width": 73,
"xpos": 513,
"ypos": 115,
"height": 17
}
],
"properties": [],
"tags": [
"apps_run_korganizer"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 207,
"height": 111,
"ypos": 183,
"type": "match",
"width": 119
}
],
"properties": [],
"tags": [
"gwen_image_default"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"width": 155,
"height": 97,
"ypos": 452,
"xpos": 482
}
],
"properties": [],
"tags": [
"gwen_image_next"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 344,
"height": 23,
"xpos": 446,
"type": "match",
"width": 131
}
],
"properties": [],
"tags": [
"login_jack"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View file

@ -0,0 +1,23 @@
{
"area": [
{
"height": 14,
"ypos": 373,
"xpos": 570,
"width": 132,
"type": "match"
},
{
"ypos": 372,
"height": 173,
"xpos": 949,
"width": 39,
"type": "match"
}
],
"properties": [],
"tags": [
"DESKTOP-kde",
"desktop_update_notification_only"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 562,
"height": 45,
"xpos": 417,
"type": "match",
"width": 45
}
],
"properties": [],
"tags": [
"power_off_confirm"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View file

@ -1098,6 +1098,24 @@
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
}
},
"media_writer": {
"profile_groups": {
"workstation-sb-all": 40
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"HDD_2": "disk_usb.img",
"HDDMODEL_2": "usb-storage,bus=xhci.0,removable=on",
"NUMDISKS": "2",
"QEMU_APPEND": "-device qemu-xhci,id=xhci",
"HDDSIZEGB": "20",
"POSTINSTALL_PATH": "tests/applications/media-writer",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"MEDIA": "official",
"EDITION": "workstation"
}
},
"nautilus": {
"profile_groups": {
"workstation-sb-all": 40

View file

@ -64,7 +64,7 @@ sub run {
# As of 2025-12 KDE may show plasma-setup even if we created
# a user and set root password in the installer
if ($desktop eq 'kde' && $relnum > 43 && !get_var("_SETUP_DONE")) {
assert_screen(['login_screen', 'ps_begin_setup'], timeout => $wait_time);
assert_screen(['graphical_login', 'ps_begin_setup'], timeout => $wait_time);
$wait_time = 90;
plasma_setup(userexists => 1, timeout => 10) if (match_has_tag 'ps_begin_setup');
}
@ -72,7 +72,7 @@ sub run {
# install, which transitions straight from g-i-s to logged-in
# desktop
unless ($desktop eq 'gnome' && get_var("INSTALL_NO_USER")) {
boot_to_login_screen(timeout => $wait_time, waitearly => 0);
boot_to_login_screen(timeout => $wait_time, waitearly => 0, graphical => 1);
# if USER_LOGIN is set to string 'false', we're done here
return if (get_var("USER_LOGIN") eq "false");

View file

@ -19,6 +19,7 @@ sub switch_network {
sub run {
my $self = shift;
my $password = get_var("USER_PASSWORD", "weakpassword");
# Toggle network
switch_network();
@ -35,11 +36,7 @@ sub run {
# Sometimes, we can see an authentication dialogue which
# prevents the test from continuing. Authenticate,
# if that is the case.
my $pass = get_var("USER_PASSWORD", "weakpassword");
if (check_screen("auth_required", timeout => 30)) {
type_very_safely("$pass\n");
}
sleep(3);
authenticate($password);
# Toggle network
switch_network();

View file

@ -0,0 +1,41 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This script install necessary packages and create a mount point
# to mount the USB flash disk.
sub run {
my $self = shift;
my $variant = get_var("SUBVARIANT");
# Switch to console
$self->root_console(tty => 3);
# Install the necessary packages, for Silverblue we need to use
# the toolbox to do it.
if ($variant ne "Silverblue") {
assert_script_run("dnf install -y isomd5sum", timeout => 120);
}
else {
toolbox("install", "isomd5sum");
}
# Create a mountpoint to mount the USB.
assert_script_run("mkdir -p /mnt/usbdisk");
# Show the current device layout
assert_script_run("lsblk");
# Exit the terminal
desktop_vt;
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et:

View file

@ -0,0 +1,24 @@
use base "installedtest";
use strict;
use warnings;
use testapi;
use utils;
sub run {
# Start the application
menu_launch_type("media-writer", checkstart => 1);
# Click the About Button.
assert_and_click 'mwriter-about-button';
# Check to see the information.
assert_screen 'mwriter-about-dialog';
# Close the dialogue.
assert_and_click 'mwriter-about-close';
# Shut down the application
send_key("alt-f4");
}
1;

View file

@ -0,0 +1,120 @@
use base "installedtest";
use strict;
use warnings;
use testapi;
use utils;
use disks;
use mwriter;
# Selects a Fedora edition in Media Writer by opening the dropdown,
# clicking the given edition, and asserting the selected state.
sub select_edition {
my $edition = shift;
assert_and_click("mwriter_dropdown_arrow");
assert_and_click("mwriter_select_$edition");
assert_screen("mwriter_selected_$edition");
}
# Selects a Fedora version in Media Writer by opening the version dropdown
# and clicking the specified version entry.
sub select_version {
my $version = shift;
assert_and_click("mwriter_dropdown_version");
assert_and_click("mwriter_select_$version");
}
# Selects a target architecture in Media Writer by opening the architecture
# dropdown and clicking the specified architecture entry.
sub select_arch {
my $arch = shift;
assert_and_click("mwriter_dropdown_arch");
assert_and_click("mwriter_select_$arch");
}
sub run {
my $self = shift;
my $currver = get_var("CURRREL", "43");
my $mediagroup = get_var('MEDIA', 'official');
my $edition = get_var('EDITION', 'workstation');
my $password = get_var('USER_PASSWORD', 'weakpassword');
# Start the application
menu_launch_type("media-writer", checkstart => 1);
# Check that "Download automatically" is selected and select it if it is not.
assert_and_click('mwriter_download_automatic');
# Click "Next".
assert_and_click('mwriter_next_button');
# Select media group.
assert_and_click("mwriter_mediagroup_$mediagroup");
# Select edition to download.
select_edition($edition);
# Click "Next".
assert_and_click('mwriter_next_button');
# Select the version.
select_version($currver);
# Select hardware architecture
select_arch("x86_64");
# Check that USB drive is present.
assert_screen("mwriter_usb_present");
# Click the write button.
assert_and_click('mwriter_write_button');
# Confirm writing to usb.
assert_and_click('mwriter_confirm_button');
wait_still_screen(5);
# When auth dialog appears, deal with it.
authenticate($password, timeout => 15, stillscreen => 3);
# Sometimes, downloading does not start immediately
# and a Write button is shown. If that is the case,
# try clicking on the button to start.
if (check_screen("mwriter_ready_button_write", timeout => 15)) {
click_lastmatch();
}
# Wait for the download to finish. Because downloads could take
# longer, let's perform a check every 30 second accompanied by mouse
# movements to prevent the SUT from going to sleep.
my $count = 0;
my $limit = 80;
until (check_screen("mwriter_finish_button")) {
last if ($count >= $limit);
sleep(30); # Wait some time before checking again.
$count++;
# Move the mouse to prevent going to sleep.
mouse_set(100, 100);
sleep(1); # Wait before moving the mouse back
mouse_set(300, 300);
}
# Click on Finish button.
assert_and_click("mwriter_finish_button");
# Check that the "restore" option is shown in the main menu.
assert_screen("mwriter_restore_item");
# Go to console, perform tests, and come back
$self->root_console(tty => 3);
# Do the checksum and compare tests
check_written_content();
desktop_vt();
# Shutdown the application
send_key("alt-f4");
}
sub test_flags {
return {fatal => 1};
}
1;

View file

@ -0,0 +1,70 @@
use base "installedtest";
use strict;
use warnings;
use testapi;
use utils;
use disks;
use mwriter;
sub run {
my $self = shift;
my $password = get_var("USER_PASSWORD", "weakpassword");
# Start the application
menu_launch_type("media-writer", checkstart => 1);
# Select the option to pick an ISO file.
assert_and_click('mwriter_choose_isofile');
# Click "Next".
assert_and_click('mwriter_next_button');
# Click on Choose button
assert_and_click("mwriter_choose_button");
# Navigate to Downloaded files.
assert_and_click("nautilus_directory_downloads");
# Select the ISO you want to reuse.
assert_and_click('mwriter_select_isofile');
# Click on Select button
assert_and_click('gnome_button_select');
# Check that USB drive is present.
assert_screen("mwriter_usb_present");
# Click the write button.
assert_and_click('mwriter_write_button');
# Confirm writing to usb.
assert_and_click('mwriter_confirm_button');
wait_still_screen(5);
authenticate($password, timeout => 15, stillscreen => 3);
# Sometimes, downloading does not start immediately
# and a Write button is shown. If that is the case,
# try clicking on the button to start.
if (check_screen("mwriter_ready_button_write", timeout => 15)) {
click_lastmatch();
}
# Wait up to 300 sec and try to click on Finish button.
assert_and_click("mwriter_finish_button", timeout => 300);
# Check that the "restore" option is shown in the main menu.
assert_screen("mwriter_restore_item");
# Go to console, perform tests, and come back
$self->root_console(tty => 3);
check_written_content();
desktop_vt();
# Stop the application
send_key("alt-f4");
}
sub test_flags {
return {fatal => 1};
}
1;

Some files were not shown because too many files have changed in this diff Show more