Make CI tests work on RHEL 8, configure gating
This commit is contained in:
parent
d1ed1b809b
commit
c184ebaeb5
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--- !Policy
|
||||||
|
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
@ -2,39 +2,39 @@
|
|||||||
# This script requires root privileges and you should never run it on your own machine
|
# This script requires root privileges and you should never run it on your own machine
|
||||||
test $EUID -eq 0
|
test $EUID -eq 0
|
||||||
|
|
||||||
PYTHON_VERSION=$(/usr/bin/python3 -c 'import sys; print("{}.{}".format(*sys.version_info))')
|
PYTHON_VERSION=$(/usr/bin/python3.12 -c 'import sys; print("{}.{}".format(*sys.version_info))')
|
||||||
RPM_SITELIB="/usr/lib/python${PYTHON_VERSION}/site-packages"
|
RPM_SITELIB="/usr/lib/python${PYTHON_VERSION}/site-packages"
|
||||||
LOCAL_SITELIB="/usr/local/lib/python${PYTHON_VERSION}/site-packages"
|
LOCAL_SITELIB="/usr/local/lib/python${PYTHON_VERSION}/site-packages"
|
||||||
USER_SITELIB="/home/fedora-test-user/.local/lib/python${PYTHON_VERSION}/site-packages"
|
USER_SITELIB="/home/fedora-test-user/.local/lib/python${PYTHON_VERSION}/site-packages"
|
||||||
|
|
||||||
# First, let's install older Pello with pip as if it was installed by RPM
|
# First, let's install older Pello with pip as if it was installed by RPM
|
||||||
# This is an approximation, but it usually works
|
# This is an approximation, but it usually works
|
||||||
RPM_BUILD_ROOT=/ /usr/bin/pip install 'Pello==1.0.1'
|
RPM_BUILD_ROOT=/ /usr/bin/pip-3.12 install 'Pello==1.0.1'
|
||||||
|
|
||||||
# Now, we'll upgrade it with regular pip
|
# Now, we'll upgrade it with regular pip
|
||||||
/usr/bin/pip install --upgrade 'Pello==1.0.2'
|
/usr/bin/pip-3.12 install --upgrade 'Pello==1.0.2'
|
||||||
|
|
||||||
# pip should see it
|
# pip should see it
|
||||||
/usr/bin/pip freeze | grep '^Pello==1\.0\.2$'
|
/usr/bin/pip-3.12 freeze | grep '^Pello==1\.0\.2$'
|
||||||
|
|
||||||
# Both installations should still exist
|
# Both installations should still exist
|
||||||
test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info"
|
test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info"
|
||||||
test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info"
|
test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info"
|
||||||
|
|
||||||
# Let's ditch the local one
|
# Let's ditch the local one
|
||||||
/usr/bin/pip uninstall --yes Pello
|
/usr/bin/pip-3.12 uninstall --yes Pello
|
||||||
|
|
||||||
# It should only remove one of them
|
# It should only remove one of them
|
||||||
test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info"
|
test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info"
|
||||||
! test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info"
|
! test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info"
|
||||||
|
|
||||||
# And pip should still see the RPM-installed one
|
# And pip should still see the RPM-installed one
|
||||||
/usr/bin/pip freeze | grep '^Pello==1\.0\.1$'
|
/usr/bin/pip-3.12 freeze | grep '^Pello==1\.0\.1$'
|
||||||
|
|
||||||
# Again, but as regular user
|
# Again, but as regular user
|
||||||
useradd fedora-test-user
|
useradd fedora-test-user
|
||||||
su fedora-test-user -c '/usr/bin/pip install "Pello==1.0.2"'
|
su fedora-test-user -c '/usr/bin/pip-3.12 install "Pello==1.0.2"'
|
||||||
test -d "${USER_SITELIB}/Pello-1.0.2.dist-info"
|
test -d "${USER_SITELIB}/Pello-1.0.2.dist-info"
|
||||||
su fedora-test-user -c '/usr/bin/pip freeze' | grep '^Pello==1\.0\.2$'
|
su fedora-test-user -c '/usr/bin/pip-3.12 freeze' | grep '^Pello==1\.0\.2$'
|
||||||
su fedora-test-user -c '/usr/bin/pip uninstall --yes Pello'
|
su fedora-test-user -c '/usr/bin/pip-3.12 uninstall --yes Pello'
|
||||||
su fedora-test-user -c '/usr/bin/pip freeze' | grep '^Pello==1\.0\.1$'
|
su fedora-test-user -c '/usr/bin/pip-3.12 freeze' | grep '^Pello==1\.0\.1$'
|
||||||
|
@ -7,93 +7,15 @@
|
|||||||
repositories:
|
repositories:
|
||||||
- repo: "https://src.fedoraproject.org/tests/python.git"
|
- repo: "https://src.fedoraproject.org/tests/python.git"
|
||||||
dest: "python"
|
dest: "python"
|
||||||
- repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git"
|
|
||||||
dest: "pyproject-rpm-macros"
|
|
||||||
tests:
|
tests:
|
||||||
- smoke35_optional:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.5 INSTALL_OR_SKIP=true ./venv.sh
|
|
||||||
- smoke36:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.6 ./venv.sh
|
|
||||||
- smoke37:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.7 ./venv.sh
|
|
||||||
- smoke38:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.8 ./venv.sh
|
|
||||||
- smoke39:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.9 ./venv.sh
|
|
||||||
- smoke310:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.10 ./venv.sh
|
|
||||||
- smoke311:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.11 ./venv.sh
|
|
||||||
- smoke312:
|
- smoke312:
|
||||||
dir: python/smoke
|
dir: python/smoke
|
||||||
run: VERSION=3.12 ./venv.sh
|
run: VERSION=3.12 TOX=false ./venv.sh
|
||||||
- smoke27:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=2.7 METHOD=virtualenv ./venv.sh
|
|
||||||
- smoke35_virtualenv_optional:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.5 METHOD=virtualenv INSTALL_OR_SKIP=true ./venv.sh
|
|
||||||
- smoke36_virtualenv:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.6 METHOD=virtualenv ./venv.sh
|
|
||||||
- smoke37_virtualenv:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.7 METHOD=virtualenv ./venv.sh
|
|
||||||
- smoke38_virtualenv:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.8 METHOD=virtualenv ./venv.sh
|
|
||||||
- smoke39_virtualenv:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.9 METHOD=virtualenv ./venv.sh
|
|
||||||
- smoke310_virtualenv:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.10 METHOD=virtualenv ./venv.sh
|
|
||||||
- smoke311_virtualenv:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.11 METHOD=virtualenv ./venv.sh
|
|
||||||
- smoke312_virtualenv:
|
|
||||||
dir: python/smoke
|
|
||||||
run: VERSION=3.12 METHOD=virtualenv ./venv.sh
|
|
||||||
- pipenv:
|
|
||||||
run: pipenv install six
|
|
||||||
- pyproject_pytest:
|
|
||||||
dir: pyproject-rpm-macros/tests
|
|
||||||
run: ./mocktest.sh python-pytest
|
|
||||||
- pyproject_entrypoints:
|
|
||||||
dir: pyproject-rpm-macros/tests
|
|
||||||
run: ./mocktest.sh python-entrypoints
|
|
||||||
- pyproject_pluggy:
|
|
||||||
dir: pyproject-rpm-macros/tests
|
|
||||||
run: ./mocktest.sh python-pluggy
|
|
||||||
- pyproject_clikit:
|
|
||||||
dir: pyproject-rpm-macros/tests
|
|
||||||
run: ./mocktest.sh python-clikit
|
|
||||||
- pip_install_upgrade
|
- pip_install_upgrade
|
||||||
required_packages:
|
required_packages:
|
||||||
- gcc
|
- gcc
|
||||||
- virtualenv
|
|
||||||
- python2.7
|
|
||||||
- python3.6
|
|
||||||
- python3.7
|
|
||||||
- python3.8
|
|
||||||
- python3.9
|
|
||||||
- python3.10-devel
|
|
||||||
- python3.11-devel
|
|
||||||
- python3.12-devel
|
- python3.12-devel
|
||||||
- python2-devel
|
- python3.12-pip
|
||||||
- python3-devel
|
|
||||||
- python3-tox
|
|
||||||
- pipenv
|
|
||||||
- mock
|
|
||||||
- rpmdevtools
|
|
||||||
- rpm-build
|
|
||||||
- grep
|
- grep
|
||||||
- util-linux
|
- util-linux
|
||||||
- shadow-utils
|
- shadow-utils
|
||||||
|
Loading…
Reference in New Issue
Block a user