Skip to content

Commit

Permalink
Add yast2_clone_system to validate generated profile on stagingY
Browse files Browse the repository at this point in the history
I updated the yaml scheduler.
I havent done any other change in test_suite but it seems that
adding yast2_clone_system the variable
REPO_SLE_MODULE_DEVELOPMENT_TOOLS needs to be excluded.
Also I removed the xmllint and I modified the block of code to
display the output of the jing.
  • Loading branch information
b10n1k committed Jan 9, 2020
1 parent 1a21779 commit 4159ce7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
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
22 changes: 15 additions & 7 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 All @@ -42,23 +42,22 @@ sub run {
# Check and upload profile for chained tests
upload_asset $ay_profile_path;

unless (is_opensuse) {
unless (is_opensuse || is_staging) {
my $devel_repo = get_required_var(is_sle('>=15') ? get_repo_var_name("MODULE_DEVELOPMENT_TOOLS") : 'REPO_SLE_SDK');
zypper_call "ar -c $utils::OPENQA_FTP_URL/" . $devel_repo . " devel-repo";
}

zypper_call '--gpg-auto-import-keys ref';
zypper_call 'install jing';
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";
my $output_jing = script_output "jing $xml_schema_path $ay_profile_path";

if (($rc_jing) || ($rc_xmllint)) {
if ($output_jing) {
if (is_sle('<15')) {
record_soft_failure 'bsc#1103712';
}
else {
die "autoinst.xml does not validate for unknown reason";
die "autoinst.xml does not validate for reason\n$output_jing";
}
}

Expand All @@ -68,6 +67,15 @@ sub run {
select_console 'root-console';
}

sub install_jing {
my $jingrpm = 'https://rpmfind.net/linux/opensuse/distribution/leap/15.2/repo/oss/noarch/jing-20151127-lp152.3.28.noarch.rpm';
my $deprpm = 'https://rpmfind.net/linux/opensuse/distribution/leap/15.1/repo/oss/noarch/relaxngDatatype-2011.1-lp151.2.1.noarch.rpm';

zypper_call "--no-gpg-checks install $deprpm";
#script_run "wget " . $rpmlink . $packagename . " -O " . $rpmname, output=>"get jing from $rpmling";
zypper_call "--no-gpg-checks install $jingrpm";
}

sub post_fail_hook {
my $self = shift;
$self->SUPER::post_fail_hook;
Expand Down

0 comments on commit 4159ce7

Please sign in to comment.