Skip to content

Commit

Permalink
Merge pull request os-autoinst#17704 from dzedro/teradata
Browse files Browse the repository at this point in the history
Update code for Teradata flavor without SCC reg
  • Loading branch information
foursixnine authored Sep 7, 2023
2 parents 09c02aa + bd09595 commit 6f7f489
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 6 deletions.
5 changes: 5 additions & 0 deletions data/autoyast_qam/15-common_base_installation.xml.ep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<suse_register>
% unless ($check_var->('FLAVOR', 'Server-DVD-Updates-TERADATA') or $check_var->('FLAVOR', 'Server-DVD-Incidents-TERADATA')) {
<do_registration config:type="boolean">true</do_registration>
% }
% if ($check_var->('FLAVOR', 'Server-DVD-Updates-TERADATA') or $check_var->('FLAVOR', 'Server-DVD-Incidents-TERADATA')) {
<do_registration config:type="boolean">false</do_registration>
% }
<email><%= $get_var->('SCC_EMAIL') %></email>
<reg_code><%= $get_var->('SCC_REGCODE') %></reg_code>
<install_updates config:type="boolean">true</install_updates>
Expand Down
5 changes: 5 additions & 0 deletions data/autoyast_qam/15_installation.xml.ep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<suse_register>
% unless ($check_var->('FLAVOR', 'Server-DVD-Updates-TERADATA') or $check_var->('FLAVOR', 'Server-DVD-Incidents-TERADATA')) {
<do_registration config:type="boolean">true</do_registration>
% }
% if ($check_var->('FLAVOR', 'Server-DVD-Updates-TERADATA') or $check_var->('FLAVOR', 'Server-DVD-Incidents-TERADATA')) {
<do_registration config:type="boolean">false</do_registration>
% }
<email><%= $get_var->('SCC_EMAIL') %></email>
<reg_code><%= $get_var->('SCC_REGCODE') %></reg_code>
<install_updates config:type="boolean">true</install_updates>
Expand Down
2 changes: 1 addition & 1 deletion lib/main_common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ sub is_updates_tests {
my $flavor = get_var('FLAVOR');
return 0 unless $flavor;
# Incidents might be also Incidents-Gnome or Incidents-Kernel
return $flavor =~ /-Updates$/ || $flavor =~ /-Incidents/;
return $flavor =~ /-Updates/ || $flavor =~ /-Incidents/;
}

sub is_migration_tests {
Expand Down
2 changes: 2 additions & 0 deletions lib/registration.pm
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,8 @@ sub skip_registration {
}
elsif (match_has_tag('scc-skip-reg-warning-yes')) {
send_key "alt-y"; # confirmed skip SCC registration
wait_still_screen;
send_key $cmd{next};
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/version_utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ sub is_using_system_role {
&& (install_this_version() || install_to_other_at_least('12-SP2'))
|| (is_sles4sap() && main_common::is_updates_test_repo())
|| is_sle('=15')
|| (is_sle('>15') && (check_var('SCC_REGISTER', 'installation') || get_var('ADDONS') || get_var('ADDONURL')))
|| (is_sle('>15') && (check_var('SCC_REGISTER', 'installation') || get_var('ADDONS') || get_var('ADDONURL') || get_var('FLAVOR') =~ /TERADATA/))
|| (is_sle('15-SP2+') && check_var('FLAVOR', 'Full'))
|| (is_opensuse && !is_leap('<15.1')) # Also on leap 15.1, TW, MicroOS
}
Expand Down
2 changes: 1 addition & 1 deletion products/sle/main.pm
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ if (is_updates_test_repo && !get_var('MAINT_TEST_REPO')) {
my $repos = join_incidents_to_repo(\%incidents);

set_var('MAINT_TEST_REPO', $repos);
set_var('SCC_REGISTER', 'installation');
set_var('SCC_REGISTER', 'installation') unless get_var('FLAVOR') =~ /TERADATA/;
}

if (get_var('ENABLE_ALL_SCC_MODULES') && !get_var('SCC_ADDONS')) {
Expand Down
2 changes: 1 addition & 1 deletion tests/boot/grub2_test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ sub run {
select_console 'root-console';
}

if (is_sle('15+')) {
if (is_sle('15+') && get_var('FLAVOR') !~ /TERADATA/) {
record_info 'grub2 zfs', 'ensure that zfs in grub2 is not available on SLE 15+ but on openSUSE';
assert_script_run 'zypper se grub2- | grep extras ; test "$?" == "1"';
assert_script_run 'rpm -qa | grep grub2 | xargs rpm -ql | grep zfs ; test "$?" == "1"';
Expand Down
12 changes: 10 additions & 2 deletions tests/installation/add_update_test_repo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@ sub run() {
set_var('SKIP_INSTALLER_SCREEN', 0);
}

assert_screen('inst-addon', 60);
send_key 'alt-k'; # install with a maint update repo
if (!check_var('SCC_REGISTER', 'installation')) {
assert_screen('module-selection');
send_key $cmd{next};
assert_screen('addon-products');
send_key 'alt-a';
}
else {
assert_screen('inst-addon', 60);
send_key 'alt-k'; # install with a maint update repo
}

set_var('MAINT_TEST_REPO', get_var('INCIDENT_REPO')) if get_var('INCIDENT_REPO');
my @repos = split(/,/, get_var('MAINT_TEST_REPO'));
Expand Down
1 change: 1 addition & 0 deletions tests/qa_automation/patch_and_reboot.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ sub run {
quit_packagekit unless check_var('DESKTOP', 'textmode');

zypper_call(q{mr -d $(zypper lr | awk -F '|' '{IGNORECASE=1} /nvidia/ {print $2}')}, exitcode => [0, 3]);
zypper_call(q{mr -e $(zypper lr | awk -F '|' '/Basesystem-Module/ {print $2}')}, exitcode => [0, 3]) if get_var('FLAVOR') =~ /TERADATA/;

add_test_repositories;

Expand Down
2 changes: 2 additions & 0 deletions tests/qam-minimal/install_update.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ sub run {
my ($self) = @_;
select_serial_terminal;

zypper_call(q{mr -e $(zypper lr | awk -F '|' '/Basesystem-Module/ {print $2}')}, exitcode => [0, 3]) if get_var('FLAVOR') =~ /TERADATA/;

# shim update will fail with old grub2 due to old signature
if (get_var('MACHINE') =~ /uefi/ && !is_transactional) {
zypper_call('up grub2 grub2-x86_64-efi kernel-default');
Expand Down
1 change: 1 addition & 0 deletions tests/qam-updinstall/update_install.pm
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ sub run {
my $zypper_version = script_output(q(rpm -q zypper|awk -F. '{print$2}'));

zypper_call(q{mr -d $(zypper lr | awk -F '|' '/NVIDIA/ {print $2}')}, exitcode => [0, 3]);
zypper_call(q{mr -f $(zypper lr | awk -F '|' '/SLES15-SP4-15.4-0/ {print $2}')}, exitcode => [0, 3]) if get_var('FLAVOR') =~ /TERADATA/;
zypper_call("ar -f http://dist.suse.de/ibs/SUSE/Updates/SLE-Live-Patching/12-SP3/" . get_var('ARCH') . "/update/ sle-module-live-patching:12-SP3::update") if is_sle('=12-SP3');

# Extract module name from repo url.
Expand Down

0 comments on commit 6f7f489

Please sign in to comment.