Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add yast2_clone_system to validate generated profile on stagingY #9233

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions schedule/staging/autoyast_mini@64bit-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ schedule:
- autoyast/installation
- autoyast/console
- autoyast/login
- console/yast2_clone_system
- autoyast/wicked
- autoyast/repos
- autoyast/clone
Expand Down
18 changes: 10 additions & 8 deletions tests/console/yast2_clone_system.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use base "y2_module_consoletest";
use strict;
use warnings;
use testapi;
use version_utils qw(is_sle is_opensuse);
use version_utils qw(is_sle is_opensuse is_staging);
use utils 'zypper_call';
use repo_tools 'get_repo_var_name';

Expand Down Expand Up @@ -44,21 +44,23 @@ sub run {

unless (is_opensuse) {
my $devel_repo = get_required_var(is_sle('>=15') ? get_repo_var_name("MODULE_DEVELOPMENT_TOOLS") : 'REPO_SLE_SDK');
b10n1k marked this conversation as resolved.
Show resolved Hide resolved
zypper_call "ar -c $utils::OPENQA_FTP_URL/" . $devel_repo . " devel-repo";
# As developement_tools are not build for staging, we will attempt to get the package from the factory repo
# otherwise MODULE_DEVELOPMENT_TOOLS should be used
my $uri = (is_staging) ? "http://download.opensuse.org/tumbleweed/repo/oss/" : "$utils::OPENQA_FTP_URL/" . $devel_repo;
zypper_call "ar -c $uri devel-repo";
}

zypper_call '--gpg-auto-import-keys ref';
zypper_call 'install jing';

my $rc_jing = script_run "jing $xml_schema_path $ay_profile_path";
my $rc_xmllint = script_run "xmllint --noout --relaxng $xml_schema_path $ay_profile_path";
zypper_call 'install jing';
zypper_call "rr devel-repo" if (is_staging);
my $rc_jing = script_run "jing $xml_schema_path $ay_profile_path";

if (($rc_jing) || ($rc_xmllint)) {
if ($rc_jing) {
if (is_sle('<15')) {
record_soft_failure 'bsc#1103712';
}
else {
die "autoinst.xml does not validate for unknown reason";
die "$ay_profile_path does not validate";
}
rwx788 marked this conversation as resolved.
Show resolved Hide resolved
}

Expand Down