Skip to content

Commit

Permalink
Fix nvidia repo removal in patch_and_reboot
Browse files Browse the repository at this point in the history
- in autoyast installation skip nvidia repo when it's unreachable, will be disabled later anyway
- nvidia repo wil be disabled only when present, thus exit 3 is not needed
- disable nvidia repo because following tests repos and clone will fail due to unreachable nvidia repo
  • Loading branch information
dzedro committed Jul 12, 2019
1 parent 83e0132 commit 70ad5c8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
17 changes: 17 additions & 0 deletions data/autoyast_qam/12_installation.xml.ep
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,21 @@
<username>root</username>
</user>
</users>
<scripts>
<post-scripts config:type="list">
<script>
<filename>post.sh</filename>
<interpreter>shell</interpreter>
<source><![CDATA[
#!/bin/sh
# zypper process is locked by some ruby process, physically delete the repo file
cd /etc/zypp/repos.d
sed -i 's/enabled=1/enabled=0/' $(ls|grep -i nvidia)
zypper lr
exit 0
]]></source>
</script>
</post-scripts>
</scripts>
</profile>
6 changes: 5 additions & 1 deletion tests/autoyast/installation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ sub run {
$stage = 'stage2';

check_screen \@needles, $check_time;
@needles = qw(reboot-after-installation autoyast-postinstall-error autoyast-boot warning-pop-up inst-bootmenu lang_and_keyboard);
@needles = qw(reboot-after-installation autoyast-postinstall-error autoyast-boot unreachable-repo warning-pop-up inst-bootmenu lang_and_keyboard);
# Do not try to fail early in case of autoyast_error_dialog scenario
# where we test that certain error are properly handled
push @needles, 'autoyast-error' unless get_var('AUTOYAST_EXPECT_ERRORS');
Expand All @@ -297,6 +297,10 @@ sub run {
elsif (match_has_tag('prague-pxe-menu') || match_has_tag('qa-net-selection')) {
last; # we missed reboot-after-installation, wait for boot is in autoyast/console
}
elsif (match_has_tag('unreachable-repo')) {
# skip nvidia repo, this repo is problematic and not needed
send_key 'alt-s';
}
elsif (match_has_tag('warning-pop-up')) {
handle_warnings; # Process warnings during stage 2
}
Expand Down
4 changes: 3 additions & 1 deletion tests/qa_automation/patch_and_reboot.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ sub run {

pkcon_quit unless check_var('DESKTOP', 'textmode');

zypper_call(q{mr -d $(zypper lr | awk -F '|' '/NVIDIA/ {print $2}')}, exitcode => [0, 3]);
unless (script_run('zypper lr|grep -i nvidia')) {
zypper_call(q{mr -d $(zypper lr | awk -F '|' '{IGNORECASE=1} /nvidia/ {print $2}')});
}

add_test_repositories;

Expand Down

0 comments on commit 70ad5c8

Please sign in to comment.