FEATURE: Add DNF_CONTENTDIR
override support
#119
17
lib/utils.pm
17
lib/utils.pm
@ -8,7 +8,7 @@ use Exporter;
|
|||||||
use feature "switch";
|
use feature "switch";
|
||||||
use lockapi;
|
use lockapi;
|
||||||
use testapi;
|
use testapi;
|
||||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely 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 repo_setup setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut lo_dismiss_tip disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number get_code_name check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper/;
|
our @EXPORT = qw/run_with_error_check type_safely type_very_safely 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 repo_setup dnf_contentdir setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut lo_dismiss_tip disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number get_code_name check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper/;
|
||||||
|
|
||||||
# We introduce this global variable to hold the list of applications that have
|
# We introduce this global variable to hold the list of applications that have
|
||||||
# registered during the apps_startstop_test when they have sucessfully run.
|
# registered during the apps_startstop_test when they have sucessfully run.
|
||||||
@ -628,6 +628,21 @@ sub repo_setup {
|
|||||||
assert_script_run "rm -f /etc/yum.repos.d/fedora-cisco-openh264.repo";
|
assert_script_run "rm -f /etc/yum.repos.d/fedora-cisco-openh264.repo";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub _dnf_contentdir_reset {
|
||||||
|
# Restore default repository contentdir
|
||||||
|
script_run 'printf "pub/rocky\n" > /etc/dnf/vars/contentdir';
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _dnf_contentdir_set {
|
||||||
|
# Point at staging repositories by modifying contentdir
|
||||||
|
script_run 'printf "stg/rocky\n" > /etc/dnf/vars/contentdir';
|
||||||
|
}
|
||||||
|
|
||||||
|
sub dnf_contentdir {
|
||||||
|
# Modify the Rocky Linux repository baseurl's if needed
|
||||||
|
get_var("DNF_CONTENTDIR") ? _dnf_contentdir_set : _dnf_contentdir_reset
|
||||||
|
}
|
||||||
|
|
||||||
sub console_initial_setup {
|
sub console_initial_setup {
|
||||||
# Handle console initial-setup. Currently used only for ARM disk
|
# Handle console initial-setup. Currently used only for ARM disk
|
||||||
# image tests.
|
# image tests.
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
use base "installedtest";
|
use base "installedtest";
|
||||||
use strict;
|
use strict;
|
||||||
use testapi;
|
use testapi;
|
||||||
|
use utils;
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->root_console(tty=>4);
|
$self->root_console(tty=>4);
|
||||||
|
# support switching to stg repos
|
||||||
|
dnf_contentdir();
|
||||||
assert_script_run 'top -i -n20 -b > /var/tmp/top.log', 120;
|
assert_script_run 'top -i -n20 -b > /var/tmp/top.log', 120;
|
||||||
upload_logs '/var/tmp/top.log';
|
upload_logs '/var/tmp/top.log';
|
||||||
unless (get_var("CANNED")) {
|
unless (get_var("CANNED")) {
|
||||||
|
@ -2,11 +2,14 @@ use base "installedtest";
|
|||||||
use strict;
|
use strict;
|
||||||
use testapi;
|
use testapi;
|
||||||
use packagetest;
|
use packagetest;
|
||||||
|
use utils;
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
# switch to TTY3 for both, graphical and console tests
|
# switch to TTY3 for both, graphical and console tests
|
||||||
$self->root_console(tty=>3);
|
$self->root_console(tty=>3);
|
||||||
|
# support switching to stg repos
|
||||||
|
dnf_contentdir();
|
||||||
# enable test repos and install test packages
|
# enable test repos and install test packages
|
||||||
prepare_test_packages;
|
prepare_test_packages;
|
||||||
# check rpm agrees they installed good
|
# check rpm agrees they installed good
|
||||||
|
Loading…
Reference in New Issue
Block a user