diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20221f6537..23c2e9c863 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: @@ -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: @@ -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: diff --git a/Makefile.am b/Makefile.am index c640aaca56..deacb0b785 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,7 +72,7 @@ gitignore: .PHONY: pylint pylint: tox - tox -e pylint \ + tox -e pylint -- \ $(PYLINT_TARGETS) execcmd: diff --git a/ci/lint.sh b/ci/lint.sh index 1237ffff95..a18987a405 100755 --- a/ci/lint.sh +++ b/ci/lint.sh @@ -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 diff --git a/ci/tests-storage.sh b/ci/tests-storage.sh index c2de43ce65..c1e5e9195b 100755 --- a/ci/tests-storage.sh +++ b/ci/tests-storage.sh @@ -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 diff --git a/ci/tests.sh b/ci/tests.sh index 6b68babf3a..ed449dc743 100755 --- a/ci/tests.sh +++ b/ci/tests.sh @@ -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 diff --git a/tests/pywatch_test.py b/tests/pywatch_test.py index 520aebdebe..e4e0d0d5e2 100644 --- a/tests/pywatch_test.py +++ b/tests/pywatch_test.py @@ -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 diff --git a/tox.ini b/tox.ini index dc57e8f135..9c73bc806d 100644 --- a/tox.ini +++ b/tox.ini @@ -200,7 +200,7 @@ commands = ./lib/vdsm/network/ \ ./tests/network -[testenv:reuse] +[reuse] deps = reuse commands =