File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ our @EXPORT = qw(
7272 load_ase_env
7373 upload_ase_logs
7474 modify_selinux_setenforce
75+ get_test_repos
7576) ;
7677
7778=head1 SYNOPSIS
@@ -1452,6 +1453,36 @@ sub modify_selinux_setenforce {
14521453 }
14531454}
14541455
1456+ =head2 get_test_repos
1457+
1458+ Constructs an array of repos to be added to SUTs.
1459+
1460+ =cut
1461+ sub get_test_repos {
1462+ # In Incidents there is INCIDENT_REPO instead of MAINT_TEST_REPO
1463+ # Those two variables contain list of repositories separated by comma
1464+ set_var(' MAINT_TEST_REPO' , get_var(' INCIDENT_REPO' )) if get_var(' INCIDENT_REPO' );
1465+ my @repos = split (/ ,/ , get_var(' MAINT_TEST_REPO' ));
1466+ # Add aggregate repos to @repos, if they are provided
1467+ for my $repo (qw(
1468+ BASE_TEST_REPOS
1469+ CONTM_TEST_REPOS
1470+ DESKTOP_TEST_REPOS
1471+ LEGACY_TEST_REPOS
1472+ OS_TEST_REPOS
1473+ PYTHON2_TEST_REPOS
1474+ SCRIPT_TEST_REPOS
1475+ SDK_TEST_REPOS
1476+ SERVERAPP_TEST_REPOS
1477+ WE_TEST_REPOS
1478+ ) ) {
1479+ if (my $value = get_var($repo )) {
1480+ push @repos , split (/ ,/ , $value );
1481+ }
1482+ }
1483+ return @repos ;
1484+ }
1485+
14551486sub post_run_hook {
14561487 my ($self ) = @_ ;
14571488
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ use warnings;
1313use testapi;
1414use strict;
1515use utils;
16+ use sles4sap qw( get_test_repos) ;
1617use publiccloud::ssh_interactive " select_host_console" ;
1718use publiccloud::utils " validate_repo" ;
1819
@@ -25,10 +26,7 @@ sub run {
2526 record_info(' Skip validation' , ' Skipping maintenance update validation (triggered by setting)' );
2627 return ;
2728 } else {
28- # In Incidents there is INCIDENT_REPO instead of MAINT_TEST_REPO
29- # Those two variables contain list of repositories separated by comma
30- set_var(' MAINT_TEST_REPO' , get_var(' INCIDENT_REPO' )) unless get_var(' MAINT_TEST_REPO' );
31- my @repos = split (/ ,/ , get_var(' MAINT_TEST_REPO' ));
29+ my @repos = get_test_repos();
3230 # Failsafe: Fail if there are no test repositories, otherwise we have the wrong template link
3331 my $count = scalar @repos ;
3432 my $check_empty_repos = get_var(' PUBLIC_CLOUD_IGNORE_EMPTY_REPO' , 0) == 0;
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ sub test_flags {
1717sub run {
1818 my ($self , $run_args ) = @_ ;
1919 $self -> import_context($run_args );
20-
21- set_var(' MAINT_TEST_REPO' , get_var(' INCIDENT_REPO' )) if get_var(' INCIDENT_REPO' );
22- my @repos = split (/ ,/ , get_var(' MAINT_TEST_REPO' ));
20+ my @repos = get_test_repos();
2321 my $count = 0;
2422 my @zypper_cmd ;
2523
You can’t perform that action at this time.
0 commit comments