forked from os-autoinst/os-autoinst-distri-opensuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2024 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Package: openSUSE-repos | ||
# Summary: Basic checks for openSUSE-repos. | ||
|
||
# - Install openSUSE-repos | ||
# - Innstall openSUSE-repos-NVIDIA on aarch64 and x86_64 | ||
# - Import gpg keys and refresh repositories | ||
# - Flavors of openSUSE-repos packages correspond with flavor of openSUSE-release | ||
# Maintainer: Lubos Kocmman <[email protected]> | ||
|
||
use base "consoletest"; | ||
use strict; | ||
use warnings; | ||
use testapi; | ||
use utils; | ||
use version_utils qw(is_tumbleweed is_leap is_leapmicro is_microos is_slowroll); | ||
use serial_terminal 'select_serial_terminal'; | ||
|
||
sub run { | ||
my $timeout = 300; | ||
my $pkgname = 'openSUSE-repos-Tumbleweed'; | ||
select_serial_terminal; | ||
|
||
zypper_call "in openSUSE-repos"; | ||
|
||
$pkgname = 'openSUSE-repos-Leap' if is_leap; | ||
$pkgname = 'openSUSE-repos-LeapMicro' if is_leap_micro; | ||
$pkgname = 'openSUSE-repos-MicroOS' if is_microos; | ||
$pkgname = 'openSUSE-repos-Slowroll' if is_slowroll; | ||
|
||
assert_script_run("rpm -q $pkgname"); | ||
|
||
# NVIDIA repo is available only for x86_64 and aarch64 | ||
if (is_x86_64 || is_aarch64) { | ||
zypper_call "in openSUSE-repos-NVIDIA"; | ||
assert_script_run("rpm -q $pkgname"); | ||
} | ||
|
||
# Ensure we can refresh repositories | ||
zypper_call '--gpg-auto-import-keys ref -s'; | ||
} | ||
|
||
sub test_flags { | ||
return {milestone => 1}; | ||
} | ||
|
||
1; |