Skip to content

System tests: export env vars for host distro, release and skip a test on rawhide #26389

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/system/520-checkpoint.bats
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,19 @@ function setup() {

# bats test_tags=ci:parallel
@test "podman checkpoint --export, with volumes" {
# get_host_distribution_info
# if [[ "$HOST_DISTRO_NAME" == "fedora" && "$HOST_DISTRO_RELEASE" == "43" ]]; then
# skip "Broken on Fedora 43: https://github.com/containers/crun/issues/1770"
# fi
local osrelease=/etc/os-release
if [[ -e $osrelease ]]; then
local osid=$(source $osrelease; echo $ID)
local osversion=$(source $osrelease; echo $VERSION_ID)
if [[ $osid == "fedora" && $osversion == "43" ]]; then
skip "Broken on Fedora 43: https://github.com/containers/crun/issues/1770"
fi
fi

skip_if_remote "Test uses --root/--runroot, which are N/A over remote"

local p_opts="$(podman_isolation_opts ${PODMAN_TMPDIR}) --events-backend file"
Expand Down
17 changes: 16 additions & 1 deletion test/system/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ if [ $(id -u) -eq 0 ]; then
_LOG_PROMPT='#'
fi

# Invocations via su may not set this. Although all container tools make
# an effort to determine a default if unset, there are corner cases (rootless
# namespace preservation) that run before the default is set.
# For purposes of system tests (CI, gating, OpenQA) we force a default early.
Expand Down Expand Up @@ -1371,6 +1370,22 @@ function wait_for_restart_count() {
done
}

############################
# Get Host Distribution Info
############################
function get_host_distribution_info() {
local osrelease=/etc/os-release
if [[ -e $osrelease ]]; then
# shellcheck source=/etc/os-release
HOST_DISTRO_NAME=$(source $osrelease; echo "$ID")
export HOST_DISTRO_NAME
# shellcheck source=/etc/os-release
HOST_DISTRO_RELEASE=$(source $osrelease; echo "$VERSION_ID")
export HOST_DISTRO_RELEASE
fi
}

# Invocations via su may not set this. Although all container tools make

# END miscellaneous tools
###############################################################################
2 changes: 2 additions & 0 deletions test/tmt/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -exo pipefail

uname -r

cat /etc/os-release

loginctl enable-linger "$ROOTLESS_USER"

rpm -q \
Expand Down