Skip to content
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

ci: use new vdsm-test container #366

Merged
merged 6 commits into from
Feb 21, 2023
Merged
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
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [centos-8, centos-9]
container: quay.io/ovirt/vdsm-test-${{ matrix.distro }}
distro: [centos-8, centos-9, alma-9]
container: quay.io/ovirt/vdsm-test:${{ matrix.distro }}
steps:
- uses: ovirt/checkout-action@main
- name: Run linters
Expand All @@ -24,9 +24,9 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [centos-8, centos-9]
distro: [centos-8, centos-9, alma-9]
container:
image: quay.io/ovirt/vdsm-test-${{ matrix.distro }}
image: quay.io/ovirt/vdsm-test:${{ matrix.distro }}
# Required to create loop devices.
options: --privileged
steps:
Expand All @@ -40,9 +40,9 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [centos-8, centos-9]
distro: [centos-8, centos-9, alma-9]
container:
image: quay.io/ovirt/vdsm-test-${{ matrix.distro }}
image: quay.io/ovirt/vdsm-test:${{ matrix.distro }}
# Required to create loop devices.
options: --privileged
steps:
Expand All @@ -56,9 +56,9 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [centos-8, centos-9]
distro: [centos-8, centos-9, alma-9]
container:
image: quay.io/ovirt/vdsm-test-${{ matrix.distro }}
image: quay.io/ovirt/vdsm-test:${{ matrix.distro }}
# Needed for many operations, i.e. creating bridges
options: --privileged
steps:
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ gitignore:

.PHONY: pylint
pylint: tox
tox -e pylint \
tox -e pylint -- \
$(PYLINT_TARGETS)

execcmd:
Expand Down
10 changes: 10 additions & 0 deletions ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
# SPDX-FileCopyrightText: Red Hat, Inc.
# SPDX-License-Identifier: GPL-2.0-or-later

# Only when running in a container
[ -d /venv ] && {
# Workaround to avoid this warning:
# fatal: detected dubious ownership in repository at '/dir'
git config --global --add safe.directory "$(pwd)"

# Activate the tests venv (for containers only)
source /venv/bin/activate
}

./autogen.sh --system
make
make lint
10 changes: 10 additions & 0 deletions ci/tests-storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ if [ -z "$user" ]; then
exit 1
fi

# Only when running in a container
[ -d /venv ] && {
# Workaround to avoid this warning:
# fatal: detected dubious ownership in repository at '/dir'
git config --global --add safe.directory "$(pwd)"

# Activate the tests venv (for containers only)
source /venv/bin/activate
}

echo "Running tests as user $user"

setup_storage
Expand Down
10 changes: 10 additions & 0 deletions ci/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6
SUFFIX=$RANDOM
ip link add mod_bond$SUFFIX type bond && ip link del mod_bond$SUFFIX

# Only when running in a container
[ -d /venv ] && {
# Workaround to avoid this warning:
# fatal: detected dubious ownership in repository at '/dir'
git config --global --add safe.directory "$(pwd)"

# Activate the tests venv (for containers only)
source /venv/bin/activate
}

./autogen.sh --system
make
make tests
13 changes: 7 additions & 6 deletions tests/pywatch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ def has_py_gdb_support():
pkg_name = "python{}".format(sys.version_info.major)
pkg_ver = package_version(pkg_name)

# On CentOS we we don't have "python2" package and we must query "python"
# and "python-debuginfo".
if pkg_name == "python2" and not pkg_ver:
pkg_name = "python"
pkg_ver = package_version(pkg_name)

pkg_dbg_ver = package_version("{}-debuginfo".format(pkg_name))

# On CentOS Stream 9 debuginfo packages now include the minor version in
# the name, i.e. python3.9-debuginfo-...
if pkg_dbg_ver == "":
pkg_name2 = "python{}.{}".format(sys.version_info.major,
sys.version_info.minor)
pkg_dbg_ver = package_version("{}-debuginfo".format(pkg_name2))

return pkg_dbg_ver != "" and pkg_dbg_ver == pkg_ver


Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ commands =
./lib/vdsm/network/ \
./tests/network

[testenv:reuse]
[reuse]
deps =
reuse
commands =
Expand Down