Contains all the functions related to version checking
Returns true if called on jeos
Returns true if called on vmware
Returns true if called on krypton or argon
Returns true if called on Gnome-Live
Returns true if 'INSTALLCHECK' is set
Returns true if called on a rescue system
Returns true if called on a virtualization server
Returns true if executed on a live cd
Usage: check_version('>15.0', get_var('VERSION'), '\d{2}') Query format: [= > < >= <=] version [+] (Example: <=12-sp3 =12-sp1 <4.0 >=15 3.0+) Check against: product version to check against - probably get_var('VERSION') Regex format: checks query version format (Example: /\d{2}\.\d/)#
Check if distribution is openSUSE MicroOS with optional filter: Media type: DVD (iso) or VMX (all disk images) Version: Tumbleweed | 15.2 (Leap) Flavor: DVD | MS-HyperV | XEN | KVM-and-Xen | ..
Check if distribution is openSUSE Leap Micro
Check if distribution is SUSE Linux Enterprise Micro
Check if distribution is any of MicroOS, Leap Micro or SL-Micro
Check if distribution is ALP
Check if SLEM is in flavor of self installable iso
Returns true if called on tumbleweed
Returns true if called on slowroll
Check if distribution is Leap with optional filter for: Version: <=42.2 =15.0 >15.0 >=42.3 15.0+
Returns true if called on opensuse
Check if distribution is SLE with optional filter for: Version: <=12-sp3 =12-sp1 >11-sp1 >=15 15+ (>=15 and 15+ are equivalent)
Returns true if called on a transactional server
Returns true if called in a migration scenario
Returns true if called in a SAP test
Returns true if called in an SAP standard test
Returns true if called on a real time system
Returns true if called in an HPC test
Returns true if called on a released build
Returns true if called in staging
Returns true if storage_ng is used
Returns true in upgrade scenarios
Returns true if called in SLES12 upgrade scenario
Returns true if a desktop is installed
#TODO this should be documented
Returns if system is older than SLE or Leap 15
Returns true if system is aarch64 with uefi and shall boot an hdd image
Returns true if executed on a server pattern, SLES4SAP or SLES4MIGRATION
Returns true if INSTALL_TO_OTHERS is not set
Check the real version of the test machine is at least some value, rather than the VERSION variable It is for version checking for tests with variable "INSTALL_TO_OTHERS".
system_role selection during installation was added as a new feature since sles12sp2 so system_role.pm should be loaded for all tests that actually install to versions over sles12sp2 no matter with or without INSTALL_TO_OTHERS tag On SLE 15 SP0 we unconditionally have system roles screen SLE 15 SP1: * Has system roles only if more than one is available, meaning either registered or with all packages DVD; * RT Product has only one (minimal) role. On microos, leap 15.1+, TW we have it instead of desktop selection screen
On leap 15.0 we have desktop selection first, and everywhere, where we have system roles
If there is only one role, there is no selection offered
has_product_selection;
Identify cases when Installer has to show Product Selection screen.
Starting with SLE 15, all products are distributed using one medium, and Product to install has to be chosen explicitly.
Though, there are some exceptions (like s390x on Sle15 SP0) when there is only one Product, so that License agreement is shown directly, skipping the Product selection step. Also, Product Selection screen is not shown during upgrade. on SLE 15+, zVM preparation test shouldn't show Product Selection screen.
Returns true (1) if Product Selection step has to be shown for the certain configuration, otherwise returns false (0).
has_license_on_welcome_screen;
Identify cases when License Agreement has to be shown on Welcome screen and should be accepted there.
Returns true (1) if License Agreement has to be shown on Welcome screen for the certain configuration, otherwise returns false (0).
Returns true if the system has a license that needs to be accepted
Returns true if the SUT uses qa net hardware
Get SLE release version, service pack and distribution name info from any running sles os without any dependencies It parses the info from /etc/os-release file, which can reside in any physical host or virtual machine The file can also be placed anywhere as long as it can be reached somehow by its absolute file path, which should be passed in as the second argument os_release_file, for example, "/etc/os-release" At the same time, connection method to the entity in which the file reside should be passed in as the first argument go_to_target, for example, "ssh root at name or ip address" or "way to download the file" For use only on locahost, no argument needs to be specified
Identify running os without any dependencies parsing the /etc/os-release.
distri_name
- The expected distribution name to compare.line
- The line we'll be parsing and checking.go_to_target
- Command connecting to the SUTos_release_file
- The full path to the Operating system identification file. Default to /etc/os-release.Returns 1 (true) if the ID_LIKE variable contains distri_name
.
Returns 1 (true) if os release version matches the one passed as arguement. If no arguements are given, the function will compare the os release version in /etc/os-release file with "VERSION" var.
Returns true if PUBLIC_CLOUD is set to 1
Returns true if the tests loads Cloud image in OpenStack environment NO_CLOUD variable is set in order to test the image in QEMU
Returns true if called in a leap to sle migration scenario
Returns true if TUNNELED is set to 1
Returns true if the SUT uses GRUB2 as bootloader
Returns true if the SUT uses systemd-boot as bootloader
Returns true if the SUT uses Plasma 6.
Returns true if test issues are present (i.e. is update tests are present)
Compare two SUSE-style version strings. Returns an integer that is less than, equal to, or greater than zero if the first argument is less than, equal to, or greater than the second one, respectively.
Returns true if called in quarterly iso testing
get_version_id(dst_machine => 'machine')
Get SLES version from VERSION_ID in /etc/os-release. This subroutine also supports performing query on remote machine if dst_machine is given specific ip address or fqdn text of the remote machine. If dst_machine
is given it will run on the remote as root. To run it as another user, dst_machine
can be also specified as [user@]hostname.
The default location that contains VERSION_ID is file /etc/os-release if nothing else is passed in to argument verid_file.
Returns true for tests using the images built by the "JeOS" package on OBS
Returns true if the distro has SELinux as default MAC
Check if agama installation is being used