Compare commits
19 Commits
e2d9c92a3c
...
2d4ae597f0
Author | SHA1 | Date | |
---|---|---|---|
|
2d4ae597f0 | ||
|
9f2720bf5f | ||
|
a11a39ea48 | ||
|
06349fb449 | ||
|
971a8de7b9 | ||
|
e5dd37555c | ||
|
e43faa5855 | ||
|
a2ecf4bc0c | ||
|
160ba54371 | ||
|
4afca7ba95 | ||
|
dcad60de30 | ||
|
6c861c033e | ||
|
2886797f67 | ||
|
bd2ccba4dd | ||
|
5a53a8cdb2 | ||
|
274b401dfd | ||
|
c6aeba1e99 | ||
|
fff511c144 | ||
|
6eb358c4ac |
@ -159,6 +159,14 @@ sub post_fail_hook {
|
||||
upload_logs "/var/tmp/imgbuild/program.log", failok => 1;
|
||||
}
|
||||
|
||||
if (get_var("TEST") eq "kiwi_build") {
|
||||
unless (script_run "mock -r openqa --copyout /tmp/image-root.log .", 90) {
|
||||
upload_logs "image-root.log";
|
||||
}
|
||||
my $arch = get_var("ARCH");
|
||||
upload_logs "/var/lib/mock/fedora-openqa-${arch}/root.log";
|
||||
}
|
||||
|
||||
if (get_var("TEST") eq "podman") {
|
||||
upload_logs "/tmp/podman-bats.txt", failok => 1;
|
||||
}
|
||||
|
58
lib/mock.pm
Normal file
@ -0,0 +1,58 @@
|
||||
package mock;
|
||||
|
||||
use strict;
|
||||
|
||||
use base 'Exporter';
|
||||
use Exporter;
|
||||
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
our @EXPORT = qw/mock_setup/;
|
||||
|
||||
sub mock_setup {
|
||||
my $version = get_var("VERSION");
|
||||
my $rawrel = get_var("RAWREL");
|
||||
my $mockver = $version eq $rawrel ? "rawhide" : $version;
|
||||
my $arch = get_var("ARCH");
|
||||
my $tag = get_var("TAG");
|
||||
my $copr = get_var("COPR");
|
||||
my $workarounds = get_workarounds;
|
||||
|
||||
if (get_var("NUMDISKS") > 2) {
|
||||
# put /var/lib/mock on the third disk, so we don't run out of
|
||||
# space on the main disk. The second disk will have already
|
||||
# been claimed for the update repo.
|
||||
assert_script_run "echo 'type=83' | sfdisk /dev/vdc";
|
||||
assert_script_run "mkfs.ext4 /dev/vdc1";
|
||||
assert_script_run "echo '/dev/vdc1 /var/lib/mock ext4 defaults 1 2' >> /etc/fstab";
|
||||
assert_script_run "mkdir -p /var/lib/mock";
|
||||
assert_script_run "mount /var/lib/mock";
|
||||
}
|
||||
|
||||
# base mock config on original
|
||||
assert_script_run "echo \"include('/etc/mock/fedora-${mockver}-${arch}.cfg')\" > /etc/mock/openqa.cfg";
|
||||
# make the side and workarounds repos and the serial device available inside the mock root
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_enable\'] = True" >> /etc/mock/openqa.cfg';
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/update_repo\', \'/mnt/update_repo\'))" >> /etc/mock/openqa.cfg' unless ($tag || $copr);
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workarounds_repo\', \'/mnt/workarounds_repo\'))" >> /etc/mock/openqa.cfg' if ($workarounds);
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/dev/' . $serialdev . '\', \'/dev/' . $serialdev . '\'))" >> /etc/mock/openqa.cfg';
|
||||
my $repos = 'config_opts[\'dnf.conf\'] += \"\"\"\n';
|
||||
# add the update, tag or COPR repo to the config
|
||||
$repos .= '[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' unless ($tag || $copr);
|
||||
$repos .= '[openqa-testtag]\nname=Tag test repo\nbaseurl=' . get_var("UPDATE_OR_TAG_REPO") . '\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\npriority=1\n' if ($tag || $copr);
|
||||
# and the workaround repo
|
||||
$repos .= '\n[workarounds]\nname=Workarounds repo\nbaseurl=file:///mnt/workarounds_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if ($workarounds);
|
||||
# also the buildroot repo, for Rawhide
|
||||
if ($version eq $rawrel) {
|
||||
$repos .= '\n[koji-rawhide]\nname=Buildroot repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\nskip_if_unavailable=1\n';
|
||||
}
|
||||
$repos .= '\"\"\"';
|
||||
assert_script_run 'printf "' . $repos . '" >> /etc/mock/openqa.cfg';
|
||||
# replace metalink with mirrorlist so we don't get slow mirrors
|
||||
repos_mirrorlist "/etc/mock/templates/*.tpl";
|
||||
# upload the config so we can check it's OK
|
||||
upload_logs "/etc/mock/openqa.cfg";
|
||||
}
|
||||
|
||||
1;
|
24
lib/utils.pm
@ -473,10 +473,9 @@ sub get_setup_repos_script {
|
||||
sub get_workarounds {
|
||||
my $version = shift || get_var("VERSION");
|
||||
my %workarounds = (
|
||||
"39" => [],
|
||||
"40" => [],
|
||||
"41" => [],
|
||||
"42" => ["FEDORA-2024-b3e53a2b43"],
|
||||
"42" => ["FEDORA-2024-3588cd5a27", "FEDORA-2024-1e10898d68"],
|
||||
"eln" => [],
|
||||
);
|
||||
my $advortasks = $workarounds{$version};
|
||||
@ -844,7 +843,8 @@ sub handle_welcome_screen {
|
||||
|
||||
sub gnome_initial_setup {
|
||||
# Handle gnome-initial-setup, with variations for live mode (the
|
||||
# short run on live boot since F39), the pre-login mode (when no
|
||||
# short run on live boot which was implemented at times from F39
|
||||
# onwards, but currently isn't), the pre-login mode (when no
|
||||
# user was created during install) and post-login mode (when user
|
||||
# was created during install). post-login mode currently (2023-08)
|
||||
# unused, but may come back in future. 'livetry' indicates whether
|
||||
@ -961,24 +961,6 @@ sub gnome_initial_setup {
|
||||
wait_screen_change { assert_and_click ["next_button"]; };
|
||||
}
|
||||
}
|
||||
unless (get_var("VNC_CLIENT") || $args{live} || $relnum > 39) {
|
||||
# We should be at the GOA screen, except on VNC_CLIENT case
|
||||
# where network isn't working yet. click 'Skip' one time. If
|
||||
# it's not visible we may have hit
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1997310 , which
|
||||
# we'll handle as a soft failure
|
||||
# This screen was removed from g-i-s in Jan 2024:
|
||||
# https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/221
|
||||
# so we don't see it on F40+, and can drop this block when
|
||||
# F39 is EOL
|
||||
mouse_set(100, 100);
|
||||
if (check_screen "skip_button", 60) {
|
||||
wait_screen_change { click_lastmatch; };
|
||||
}
|
||||
else {
|
||||
record_soft_failure "GOA screen not seen! Likely RHBZ #1997310";
|
||||
}
|
||||
}
|
||||
send_key "shift-tab" if ($args{live} && $args{livetry});
|
||||
# on the 'live' flow, this will launch the installer
|
||||
send_key "ret";
|
||||
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 646,
|
||||
"width": 123,
|
||||
"ypos": 63,
|
||||
"type": "match",
|
||||
"xpos": 20
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"name": "workaround",
|
||||
"value": "works around anaconda title bar being visible in KDE, which it should not be"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"leftbar_generic"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 148 KiB |
19
needles/cockpit/cockpit_updates_auto_all-20241126.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"ypos": 316,
|
||||
"type": "match",
|
||||
"xpos": 534,
|
||||
"width": 44,
|
||||
"height": 19,
|
||||
"click_point": {
|
||||
"ypos": 8,
|
||||
"xpos": 8
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"cockpit_updates_auto_all"
|
||||
]
|
||||
}
|
BIN
needles/cockpit/cockpit_updates_auto_all-20241126.png
Normal file
After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 40 KiB |
@ -1,15 +0,0 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"ypos": 41,
|
||||
"width": 94,
|
||||
"type": "match",
|
||||
"height": 20,
|
||||
"xpos": 279
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"apps_run_camera"
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 13 KiB |
15
needles/gnome/apps/maps/maps_found_wellington-20241115.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"type": "match",
|
||||
"xpos": 401,
|
||||
"height": 119,
|
||||
"ypos": 349,
|
||||
"width": 198
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"maps_found_wellington"
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/maps/maps_found_wellington-20241115.png
Normal file
After Width: | Height: | Size: 244 KiB |
15
needles/gnome/apps/maps/maps_map_zoomed-20241115.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 162,
|
||||
"type": "match",
|
||||
"xpos": 407,
|
||||
"ypos": 419,
|
||||
"width": 197
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"maps_map_zoomed"
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/maps/maps_map_zoomed-20241115.png
Normal file
After Width: | Height: | Size: 807 KiB |
15
needles/gnome/apps/maps/maps_route_bike_shown-20241124.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"width": 102,
|
||||
"height": 318,
|
||||
"xpos": 347,
|
||||
"ypos": 354,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"maps_route_bike_shown"
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/maps/maps_route_bike_shown-20241124.png
Normal file
After Width: | Height: | Size: 228 KiB |
@ -1,15 +0,0 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 15,
|
||||
"type": "match",
|
||||
"ypos": 8,
|
||||
"width": 72,
|
||||
"xpos": 194
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kmag_runs"
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 20 KiB |
@ -1,15 +0,0 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"ypos": 421,
|
||||
"width": 54,
|
||||
"type": "match",
|
||||
"xpos": 533,
|
||||
"height": 19
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"konversation_confirm_close"
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 83 KiB |
@ -1,15 +0,0 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"ypos": 370,
|
||||
"type": "match",
|
||||
"width": 13,
|
||||
"xpos": 409,
|
||||
"height": 19
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"konversation_connect"
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 49 KiB |
@ -1,15 +0,0 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"type": "match",
|
||||
"ypos": 114,
|
||||
"width": 83,
|
||||
"height": 15,
|
||||
"xpos": 516
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"konversation_runs"
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 72 KiB |
@ -1,15 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 419,
|
||||
"ypos": 186,
|
||||
"width": 185,
|
||||
"height": 23,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"neochat_runs"
|
||||
]
|
||||
"area": [
|
||||
{
|
||||
"height": 23,
|
||||
"type": "match",
|
||||
"width": 80,
|
||||
"xpos": 524,
|
||||
"ypos": 186
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"neochat_runs"
|
||||
]
|
||||
}
|
@ -2,14 +2,14 @@
|
||||
"area": [
|
||||
{
|
||||
"type": "match",
|
||||
"width": 19,
|
||||
"xpos": 235,
|
||||
"ypos": 264,
|
||||
"ypos": 325,
|
||||
"xpos": 472,
|
||||
"width": 80,
|
||||
"height": 23
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"apps_menu_camera"
|
||||
"neochat_runs"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/neochat_runs-20241124.png
Normal file
After Width: | Height: | Size: 52 KiB |
@ -28,6 +28,7 @@
|
||||
"flavor": "updates-container",
|
||||
"settings": {
|
||||
"+HDD_1": "disk_f%VERSION%_server_5_%ARCH%.qcow2",
|
||||
"KIWI_PROFILE": "Container-Base-Generic",
|
||||
"NUMDISKS": "2",
|
||||
"RETRY": "1"
|
||||
},
|
||||
@ -132,6 +133,7 @@
|
||||
"DESKTOP": "gnome",
|
||||
"HDDSIZEGB": "15",
|
||||
"LIVE": "1",
|
||||
"LIVE_BUILD_TEST": "live_build",
|
||||
"NUMDISKS": "2",
|
||||
"PACKAGE_SET": "default",
|
||||
"RETRY": "1",
|
||||
@ -146,7 +148,9 @@
|
||||
"settings": {
|
||||
"DESKTOP": "kde",
|
||||
"HDDSIZEGB": "15",
|
||||
"KIWI_PROFILE": "KDE-Desktop-Live",
|
||||
"LIVE": "1",
|
||||
"LIVE_BUILD_TEST": "kiwi_build",
|
||||
"NUMDISKS": "2",
|
||||
"PACKAGE_SET": "default",
|
||||
"RETRY": "1",
|
||||
@ -324,21 +328,6 @@
|
||||
"fedora-updates-workstation-x86_64-*-64bit": 5
|
||||
}
|
||||
},
|
||||
"container_build_kiwi": {
|
||||
"profiles": {
|
||||
"fedora-updates-container-x86_64-*-64bit": 5
|
||||
},
|
||||
"settings": {
|
||||
"BOOTFROM": "c",
|
||||
"HDD_1": "disk_f%VERSION%_minimal_4_%ARCH%.qcow2",
|
||||
"HDDSIZEGB_3": "25",
|
||||
"MAX_JOB_TIME": "10800",
|
||||
"+NUMDISKS": "3",
|
||||
"POSTINSTALL": "_container_build_kiwi",
|
||||
"ROOT_PASSWORD": "weakpassword",
|
||||
"USER_LOGIN": "false"
|
||||
}
|
||||
},
|
||||
"desktop_background": {
|
||||
"profiles": {
|
||||
"fedora-updates-kde-x86_64-*-64bit": 5,
|
||||
@ -388,10 +377,11 @@
|
||||
"fedora-updates-workstation-live-iso-x86_64-*-64bit": 5
|
||||
},
|
||||
"settings": {
|
||||
"+START_AFTER_TEST": "live_build@%ARCH_BASE_MACHINE%",
|
||||
"+START_AFTER_TEST": "%LIVE_BUILD_TEST%@%ARCH_BASE_MACHINE%",
|
||||
"INSTALL": "1",
|
||||
"ISO": "Fedora-%SUBVARIANT%-Live-%ARCH%-%ADVISORY_OR_TASK%.iso",
|
||||
"QEMURAM": "4096"
|
||||
"QEMURAM": "4096",
|
||||
"RETRY": "5"
|
||||
}
|
||||
},
|
||||
"install_default_update_netinst": {
|
||||
@ -448,9 +438,26 @@
|
||||
"USER_LOGIN": "false"
|
||||
}
|
||||
},
|
||||
"kiwi_build": {
|
||||
"profiles": {
|
||||
"fedora-updates-container-x86_64-*-64bit": 5,
|
||||
"fedora-updates-kde-live-iso-x86_64-*-64bit": 5
|
||||
},
|
||||
"settings": {
|
||||
"+DESKTOP": "",
|
||||
"+LIVE": "",
|
||||
"BOOTFROM": "c",
|
||||
"HDD_1": "disk_f%VERSION%_minimal_4_%ARCH%.qcow2",
|
||||
"HDDSIZEGB_3": "25",
|
||||
"MAX_JOB_TIME": "10800",
|
||||
"+NUMDISKS": "3",
|
||||
"POSTINSTALL": "_kiwi_build",
|
||||
"ROOT_PASSWORD": "weakpassword",
|
||||
"USER_LOGIN": "false"
|
||||
}
|
||||
},
|
||||
"live_build": {
|
||||
"profiles": {
|
||||
"fedora-updates-kde-live-iso-x86_64-*-64bit": 5,
|
||||
"fedora-updates-workstation-live-iso-x86_64-*-64bit": 5
|
||||
},
|
||||
"settings": {
|
||||
|
@ -1,126 +0,0 @@
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $version = get_var("VERSION");
|
||||
my $advortask = get_var("ADVISORY_OR_TASK");
|
||||
# we didn't use kiwi before F40, and I don't really want to write
|
||||
# an imgfac test for a release that will be dead in 6 months
|
||||
# FIXME drop when F39 is EOL
|
||||
if ($version < 40) {
|
||||
record_info('notvalid', "this test cannot be run on Fedora < 40");
|
||||
return;
|
||||
}
|
||||
my $rawrel = get_var("RAWREL");
|
||||
my $branch;
|
||||
my $repoxml;
|
||||
my $releasever;
|
||||
my $mockver;
|
||||
if ($version eq $rawrel) {
|
||||
$branch = "main";
|
||||
$repoxml = "repositories/core-rawhide.xml";
|
||||
$releasever = "Rawhide";
|
||||
$mockver = "rawhide";
|
||||
}
|
||||
else {
|
||||
$branch = "f${version}";
|
||||
$repoxml = "repositories/core-nonrawhide.xml";
|
||||
$releasever = $version;
|
||||
$mockver = $version;
|
||||
}
|
||||
my $arch = get_var("ARCH");
|
||||
my $tag = get_var("TAG");
|
||||
my $copr = get_var("COPR");
|
||||
my $workarounds = get_workarounds;
|
||||
if (get_var("NUMDISKS") > 2) {
|
||||
# put /var/lib/mock on the third disk, so we don't run out of
|
||||
# space on the main disk. The second disk will have already
|
||||
# been claimed for the update repo.
|
||||
assert_script_run "echo 'type=83' | sfdisk /dev/vdc";
|
||||
assert_script_run "mkfs.ext4 /dev/vdc1";
|
||||
assert_script_run "echo '/dev/vdc1 /var/lib/mock ext4 defaults 1 2' >> /etc/fstab";
|
||||
assert_script_run "mkdir -p /var/lib/mock";
|
||||
assert_script_run "mount /var/lib/mock";
|
||||
}
|
||||
# install the tools we need
|
||||
assert_script_run "dnf -y install mock git", 300;
|
||||
# base mock config on original
|
||||
assert_script_run "echo \"include('/etc/mock/fedora-${mockver}-${arch}.cfg')\" > /etc/mock/openqa.cfg";
|
||||
# make the side and workarounds repos and the serial device available inside the mock root
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_enable\'] = True" >> /etc/mock/openqa.cfg';
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/update_repo\', \'/mnt/update_repo\'))" >> /etc/mock/openqa.cfg' unless ($tag || $copr);
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workarounds_repo\', \'/mnt/workarounds_repo\'))" >> /etc/mock/openqa.cfg' if ($workarounds);
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/dev/' . $serialdev . '\', \'/dev/' . $serialdev . '\'))" >> /etc/mock/openqa.cfg';
|
||||
my $repos = 'config_opts[\'dnf.conf\'] += \"\"\"\n';
|
||||
# add the update, tag or COPR repo to the config
|
||||
$repos .= '[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' unless ($tag || $copr);
|
||||
$repos .= '[openqa-testtag]\nname=Tag test repo\nbaseurl=' . get_var("UPDATE_OR_TAG_REPO") . '\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\npriority=1\n' if ($tag || $copr);
|
||||
# and the workaround repo
|
||||
$repos .= '\n[workarounds]\nname=Workarounds repo\nbaseurl=file:///mnt/workarounds_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if ($workarounds);
|
||||
# also the buildroot repo, for Rawhide
|
||||
if ($version eq $rawrel) {
|
||||
$repos .= '\n[koji-rawhide]\nname=Buildroot repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\nskip_if_unavailable=1\n';
|
||||
}
|
||||
$repos .= '\"\"\"';
|
||||
assert_script_run 'printf "' . $repos . '" >> /etc/mock/openqa.cfg';
|
||||
# replace metalink with mirrorlist so we don't get slow mirrors
|
||||
repos_mirrorlist "/etc/mock/templates/*.tpl";
|
||||
# upload the config so we can check it's OK
|
||||
upload_logs "/etc/mock/openqa.cfg";
|
||||
# now check out the fedora kiwi descriptions
|
||||
assert_script_run 'git clone https://pagure.io/fedora-kiwi-descriptions.git';
|
||||
assert_script_run 'cd fedora-kiwi-descriptions';
|
||||
assert_script_run "git checkout ${branch}";
|
||||
# correct the GPG key paths in the repositories and swap metalink
|
||||
# to mirrorlist
|
||||
assert_script_run 'sed -i -e "s,/usr/share/distribution-gpg-keys/fedora,/etc/pki/rpm-gpg,g" ' . $repoxml;
|
||||
repos_mirrorlist $repoxml;
|
||||
# now add the side repo or tag repo to the appropriate repo XML
|
||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"advisory\" sourcetype=\"baseurl\">\n <source path=\"file:///mnt/update_repo\"/>\n </repository>\n</image>\n" > ' . $repoxml unless ($tag || $copr);
|
||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"openqa-testtag\" sourcetype=\"baseurl\">\n <source path=\"' . get_var("UPDATE_OR_TAG_REPO") . '\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($tag || $copr);
|
||||
# and the workarounds repo
|
||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"workarounds\" sourcetype=\"baseurl\">\n <source path=\"file:///mnt/workarounds_repo\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($workarounds);
|
||||
# and the buildroot repo, for Rawhide
|
||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"koji-rawhide\" sourcetype=\"baseurl\">\n <source path=\"https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($version eq $rawrel);
|
||||
# upload the repositories XML so we can check it
|
||||
# NOTE: koji kiwi plugin does much more futzing around with the XML
|
||||
# it flattens includes, fiddles with the repos, and and messes with
|
||||
# preferences a bit. see
|
||||
# KiwiCreateImageTask.prepareDescription. but we do our own repo
|
||||
# stuff above, the preference stuff is unnecessary on Fedora, and
|
||||
# the flattening is unnecessary outside Koji
|
||||
upload_logs "$repoxml";
|
||||
assert_script_run "cd ..";
|
||||
# now install the tools into the mock
|
||||
assert_script_run "mock -r openqa --install kiwi-cli kiwi-systemdeps", 900;
|
||||
# now copy the descriptions in
|
||||
assert_script_run "mock -r openqa --isolation=simple --copyin fedora-kiwi-descriptions /fedora-kiwi-descriptions";
|
||||
# PULL SOME LEVERS! PULL SOME LEVERS!
|
||||
assert_script_run "mock -r openqa --enable-network --chroot \"kiwi-ng --profile Container-Base-Generic --kiwi-file Fedora.kiwi --debug --logfile /tmp/image-root.log system build --description /fedora-kiwi-descriptions/ --target-dir /builddir/result/image\"", 7200;
|
||||
unless (script_run "mock -r openqa --isolation=simple --copyout /tmp/image-root.log .", 90) {
|
||||
upload_logs "image-root.log";
|
||||
}
|
||||
assert_script_run "mock -r openqa --isolation=simple --copyout /builddir/result/image/Fedora.${arch}-${releasever}.oci.tar.xz .", 180;
|
||||
upload_asset "./Fedora.${arch}-${releasever}.oci.tar.xz";
|
||||
|
||||
# load and test that we can use the built container
|
||||
assert_script_run "podman load -i ./Fedora.${arch}-${releasever}.oci.tar.xz";
|
||||
my $imgspec = "localhost/fedora:${mockver}";
|
||||
validate_script_output "podman run ${imgspec} echo Hello-World", sub { m/Hello-World/ };
|
||||
# do advisory_check_nonmatching_packages inside the container
|
||||
advisory_check_nonmatching_packages(wrapper => "podman run --rm ${imgspec}");
|
||||
# wipe the temp file so it doesn't interfere with the same check
|
||||
# on the host
|
||||
assert_script_run "rm -f /tmp/installedupdatepkgs.txt";
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
118
tests/_kiwi_build.pm
Normal file
@ -0,0 +1,118 @@
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use mock;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $version = get_var("VERSION");
|
||||
my $advortask = get_var("ADVISORY_OR_TASK");
|
||||
my $rawrel = get_var("RAWREL");
|
||||
my $branch;
|
||||
my $repoxml;
|
||||
my $releasever;
|
||||
my $mockver;
|
||||
if ($version eq $rawrel) {
|
||||
$branch = "main";
|
||||
$repoxml = "repositories/core-rawhide.xml";
|
||||
$releasever = "Rawhide";
|
||||
$mockver = "rawhide";
|
||||
}
|
||||
else {
|
||||
$branch = "f${version}";
|
||||
$repoxml = "repositories/core-nonrawhide.xml";
|
||||
$releasever = $version;
|
||||
$mockver = $version;
|
||||
}
|
||||
my $arch = get_var("ARCH");
|
||||
my $tag = get_var("TAG");
|
||||
my $copr = get_var("COPR");
|
||||
my $kiwiprofile = get_var("KIWI_PROFILE");
|
||||
my $workarounds = get_workarounds;
|
||||
my $isolation = 'nspawn';
|
||||
# lives need simple isolation and permissive selinux, sadly
|
||||
if (index($kiwiprofile, 'Live') != -1) {
|
||||
assert_script_run "setenforce Permissive";
|
||||
$isolation = 'simple';
|
||||
}
|
||||
# install the tools we need
|
||||
assert_script_run "dnf -y install mock git", 300;
|
||||
# set up the mock config
|
||||
mock_setup;
|
||||
# now check out the fedora kiwi descriptions
|
||||
assert_script_run 'git clone https://pagure.io/fedora-kiwi-descriptions.git';
|
||||
assert_script_run 'cd fedora-kiwi-descriptions';
|
||||
assert_script_run "git checkout ${branch}";
|
||||
# correct the GPG key paths in the repositories and swap metalink
|
||||
# to mirrorlist
|
||||
assert_script_run 'sed -i -e "s,/usr/share/distribution-gpg-keys/fedora,/etc/pki/rpm-gpg,g" ' . $repoxml;
|
||||
repos_mirrorlist $repoxml;
|
||||
# now add the side repo or tag repo to the appropriate repo XML
|
||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"advisory\" sourcetype=\"baseurl\">\n <source path=\"file:///mnt/update_repo\"/>\n </repository>\n</image>\n" > ' . $repoxml unless ($tag || $copr);
|
||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"openqa-testtag\" sourcetype=\"baseurl\">\n <source path=\"' . get_var("UPDATE_OR_TAG_REPO") . '\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($tag || $copr);
|
||||
# and the workarounds repo
|
||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"workarounds\" sourcetype=\"baseurl\">\n <source path=\"file:///mnt/workarounds_repo\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($workarounds);
|
||||
# and the buildroot repo, for Rawhide
|
||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"koji-rawhide\" sourcetype=\"baseurl\">\n <source path=\"https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($version eq $rawrel);
|
||||
# upload the repositories XML so we can check it
|
||||
# NOTE: koji kiwi plugin does much more futzing around with the XML
|
||||
# it flattens includes, fiddles with the repos, and and messes with
|
||||
# preferences a bit. see
|
||||
# KiwiCreateImageTask.prepareDescription. but we do our own repo
|
||||
# stuff above, the preference stuff is unnecessary on Fedora, and
|
||||
# the flattening is unnecessary outside Koji
|
||||
upload_logs "$repoxml";
|
||||
assert_script_run "cd ..";
|
||||
# now install the tools into the mock
|
||||
assert_script_run "mock -r openqa --isolation=${isolation} --install kiwi-cli kiwi-systemdeps", 900;
|
||||
# now copy the descriptions in
|
||||
assert_script_run "mock -r openqa --isolation=${isolation} --copyin fedora-kiwi-descriptions /fedora-kiwi-descriptions";
|
||||
# construct a volume ID of appropriate length and application ID,
|
||||
# note these don't match the official ones
|
||||
my $aot27 = substr($advortask, 0, 27);
|
||||
my $volid = "KIWI-${aot27}";
|
||||
my $appid = "${kiwiprofile}-${aot27}";
|
||||
# PULL SOME LEVERS! PULL SOME LEVERS!
|
||||
assert_script_run "mock -r openqa --isolation=${isolation} --enable-network --chroot \"kiwi-ng --profile ${kiwiprofile} --kiwi-file Fedora.kiwi --debug --logfile /tmp/image-root.log system build --description /fedora-kiwi-descriptions/ --target-dir /builddir/result/image --set-type-attr 'volid=${volid}' --set-type-attr 'application_id=${appid}'\"", 7200;
|
||||
unless (script_run "mock -r openqa --isolation=${isolation} --copyout /tmp/image-root.log .", 90) {
|
||||
upload_logs "image-root.log";
|
||||
}
|
||||
my %expected_formats = (
|
||||
'KDE-Desktop-Live' => 'iso',
|
||||
'Container-Base-Generic' => 'oci.tar.xz'
|
||||
);
|
||||
my $format = $expected_formats{$kiwiprofile};
|
||||
my $fname = "Fedora.${arch}-${releasever}.${format}";
|
||||
assert_script_run "mock -r openqa --isolation=${isolation} --copyout /builddir/result/image/${fname} .", 180;
|
||||
if (index($kiwiprofile, 'Live') != -1) {
|
||||
# rename to the format we expect from LMC, to match that test
|
||||
# can drop this and change templates when all lives are on
|
||||
# Kiwi
|
||||
my $subv = get_var("SUBVARIANT");
|
||||
my $newfname = "Fedora-${subv}-Live-${arch}-${advortask}.iso";
|
||||
assert_script_run "mv ${fname} ${newfname}";
|
||||
$fname = $newfname;
|
||||
}
|
||||
upload_asset $fname;
|
||||
|
||||
if (index($kiwiprofile, 'Container') != -1) {
|
||||
# load and test that we can use the built container
|
||||
assert_script_run "podman load -i ./${fname}";
|
||||
my $imgspec = "localhost/fedora:${mockver}";
|
||||
validate_script_output "podman run ${imgspec} echo Hello-World", sub { m/Hello-World/ };
|
||||
# do advisory_check_nonmatching_packages inside the container
|
||||
advisory_check_nonmatching_packages(wrapper => "podman run --rm ${imgspec}");
|
||||
# wipe the temp file so it doesn't interfere with the same check
|
||||
# on the host
|
||||
assert_script_run "rm -f /tmp/installedupdatepkgs.txt";
|
||||
}
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {fatal => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
@ -1,5 +1,6 @@
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use mock;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
@ -10,18 +11,15 @@ sub run {
|
||||
my $branch;
|
||||
my $repoks;
|
||||
my $releasever;
|
||||
my $mockver;
|
||||
if ($version eq $rawrel) {
|
||||
$branch = "main";
|
||||
$repoks = "fedora-repo-rawhide.ks";
|
||||
$releasever = "Rawhide";
|
||||
$mockver = "rawhide";
|
||||
}
|
||||
else {
|
||||
$branch = "f${version}";
|
||||
$repoks = "fedora-repo-not-rawhide.ks";
|
||||
$releasever = $version;
|
||||
$mockver = $version;
|
||||
}
|
||||
my $advortask = get_var("ADVISORY_OR_TASK");
|
||||
my $arch = get_var("ARCH");
|
||||
@ -30,41 +28,10 @@ sub run {
|
||||
my $tag = get_var("TAG");
|
||||
my $copr = get_var("COPR");
|
||||
my $workarounds = get_workarounds;
|
||||
if (get_var("NUMDISKS") > 2) {
|
||||
# put /var/lib/mock on the third disk, so we don't run out of
|
||||
# space on the main disk. The second disk will have already
|
||||
# been claimed for the update repo.
|
||||
assert_script_run "echo 'type=83' | sfdisk /dev/vdc";
|
||||
assert_script_run "mkfs.ext4 /dev/vdc1";
|
||||
assert_script_run "echo '/dev/vdc1 /var/lib/mock ext4 defaults 1 2' >> /etc/fstab";
|
||||
assert_script_run "mkdir -p /var/lib/mock";
|
||||
assert_script_run "mount /var/lib/mock";
|
||||
}
|
||||
# install the tools we need
|
||||
assert_script_run "dnf -y install mock git pykickstart tar", 300;
|
||||
# base mock config on original
|
||||
assert_script_run "echo \"include('/etc/mock/fedora-${mockver}-${arch}.cfg')\" > /etc/mock/openqa.cfg";
|
||||
# make the side and workarounds repos and the serial device available inside the mock root
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_enable\'] = True" >> /etc/mock/openqa.cfg';
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/update_repo\', \'/mnt/update_repo\'))" >> /etc/mock/openqa.cfg' unless ($tag || $copr);
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workarounds_repo\', \'/mnt/workarounds_repo\'))" >> /etc/mock/openqa.cfg' if ($workarounds);
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/dev/' . $serialdev . '\', \'/dev/' . $serialdev . '\'))" >> /etc/mock/openqa.cfg';
|
||||
my $repos = 'config_opts[\'dnf.conf\'] += \"\"\"\n';
|
||||
# add the update, tag or COPR repo to the config
|
||||
$repos .= '[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' unless ($tag || $copr);
|
||||
$repos .= '[openqa-testtag]\nname=Tag test repo\nbaseurl=' . get_var("UPDATE_OR_TAG_REPO") . '/\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\npriority=1\n' if ($tag || $copr);
|
||||
# and the workaround repo
|
||||
$repos .= '\n[workarounds]\nname=Workarounds repo\nbaseurl=file:///mnt/workarounds_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if ($workarounds);
|
||||
# also the buildroot repo, for Rawhide
|
||||
if ($version eq $rawrel) {
|
||||
$repos .= '\n[koji-rawhide]\nname=Buildroot repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\nskip_if_unavailable=1\n';
|
||||
}
|
||||
$repos .= '\"\"\"';
|
||||
assert_script_run 'printf "' . $repos . '" >> /etc/mock/openqa.cfg';
|
||||
# replace metalink with mirrorlist so we don't get slow mirrors
|
||||
repos_mirrorlist("/etc/mock/templates/*.tpl");
|
||||
# upload the config so we can check it's OK
|
||||
upload_logs "/etc/mock/openqa.cfg";
|
||||
# set up the mock config
|
||||
mock_setup;
|
||||
# now check out the kickstarts
|
||||
assert_script_run 'git clone https://pagure.io/fedora-kickstarts.git';
|
||||
assert_script_run 'cd fedora-kickstarts';
|
||||
|
@ -83,8 +83,6 @@ sub run {
|
||||
assert_script_run 'git clone https://pagure.io/pungi-fedora.git';
|
||||
assert_script_run 'cd pungi-fedora/';
|
||||
assert_script_run "git checkout ${branch}";
|
||||
# drop cheese flatpak on f39 as it has not been bumped to f41 base
|
||||
assert_script_run 'sed -i -e "s,app/org.gnome.Cheese/[a-z_0-9]*/stable,,g" fedora.conf' if ($version eq "39");
|
||||
assert_script_run 'curl --retry-delay 10 --max-time 30 --retry 5 -o ostree-parse-pungi.py https://pagure.io/fedora-qa/os-autoinst-distri-fedora/raw/main/f/ostree-parse-pungi.py', timeout => 180;
|
||||
my $loraxargs = script_output "python3 ostree-parse-pungi.py $lcsubv $arch";
|
||||
|
||||
|
@ -14,12 +14,6 @@ sub run {
|
||||
# Add a new alarm using the one minute button
|
||||
assert_screen("clocks_timer_page");
|
||||
assert_and_click("clocks_button_timer_minute");
|
||||
# since GNOME 46, that was a 'quickstart', on older GNOME we
|
||||
# have to hit start; remove this when no more F39 testing
|
||||
if (check_screen("clocks_button_timer_start", 5)) {
|
||||
wait_still_screen(2);
|
||||
click_lastmatch;
|
||||
}
|
||||
sleep(10);
|
||||
assert_and_click("clocks_button_timer_pause");
|
||||
assert_screen("clocks_timer_paused");
|
||||
|
@ -12,12 +12,10 @@ sub run {
|
||||
|
||||
# Start the application
|
||||
start_with_launcher('apps_menu_camera');
|
||||
# Check that is started or we see the camera access dialog
|
||||
assert_screen ['apps_run_camera', 'grant_access'];
|
||||
if (match_has_tag 'grant_access') {
|
||||
click_lastmatch;
|
||||
assert_screen 'apps_run_camera';
|
||||
}
|
||||
# Click the camera access dialog
|
||||
assert_and_click 'grant_access';
|
||||
# Check we see the app run
|
||||
assert_screen 'apps_run_camera';
|
||||
# Register application
|
||||
register_application("gnome-snapshot");
|
||||
# Close the application
|
||||
|
@ -1,39 +0,0 @@
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
# This test checks that Konversation starts.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $relnum = get_release_number;
|
||||
# neochat replaced konversation in F40+; while we're still running
|
||||
# this test on F39 the test has to handle both...
|
||||
my $app = $relnum > 39 ? 'neochat' : 'konversation';
|
||||
|
||||
# Start the application
|
||||
menu_launch_type $app;
|
||||
# Connect to Freenode
|
||||
assert_and_click "${app}_connect", timeout => 60 if ($app eq 'konversation');
|
||||
# Check that it is started
|
||||
assert_screen "${app}_runs";
|
||||
# Close the application
|
||||
if ($app eq 'konversation') {
|
||||
send_key 'alt-f4';
|
||||
wait_still_screen 2;
|
||||
assert_and_click "${app}_confirm_close";
|
||||
}
|
||||
else {
|
||||
quit_with_shortcut();
|
||||
}
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
@ -3,18 +3,14 @@ use strict;
|
||||
use testapi;
|
||||
use utils;
|
||||
|
||||
# This test checks that Kmag starts.
|
||||
# This test checks that Neochat starts.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
# FIXME after F39 is stable, drop this test entirely
|
||||
my $relnum = get_release_number;
|
||||
return unless ($relnum < 40);
|
||||
|
||||
# Start the application
|
||||
menu_launch_type 'kmag';
|
||||
menu_launch_type 'neochat';
|
||||
# Check that it is started
|
||||
assert_screen 'kmag_runs', timeout => 60;
|
||||
assert_screen "neochat_runs";
|
||||
# Close the application
|
||||
quit_with_shortcut();
|
||||
}
|
@ -45,9 +45,6 @@ sub run {
|
||||
elsif ($current =~ "silverblue") {
|
||||
my $relnum = get_release_number;
|
||||
$rebase = $relnum - 1;
|
||||
# avoid rebasing 39 > 38 due to
|
||||
# https://github.com/fedora-silverblue/issue-tracker/issues/470
|
||||
$rebase = "40" if ($rebase eq "38");
|
||||
# on update tests, just rebase to the 'official' ref for the
|
||||
# release, as opposed to the custom ref we used when building;
|
||||
# this should be more reliable than a different release
|
||||
|