Add CI tests for python(abi) provides
This commit is contained in:
parent
486ca7e540
commit
eae8dd0f57
16
tests/pythonabi.sh
Executable file
16
tests/pythonabi.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/bash -eux
|
||||
rpmbuild -ba pythonabi.spec
|
||||
|
||||
PYVER=$(rpm --eval '%python3_version')
|
||||
RPMDIR=$(rpm --eval '%_topdir')/RPMS
|
||||
ARCH=$(rpm --eval '%_arch')
|
||||
ABI='^python(abi) = '${PYVER}'$'
|
||||
|
||||
rpm -qp --provides ${RPMDIR}/${ARCH}/python-interpreter-0-0.${ARCH}.rpm | grep "${ABI}"
|
||||
rpm -qp --requires ${RPMDIR}/${ARCH}/python-interpreter-0-0.${ARCH}.rpm | grep -v "${ABI}"
|
||||
|
||||
rpm -qp --requires ${RPMDIR}/${ARCH}/python-arched-0-0.${ARCH}.rpm | grep "${ABI}"
|
||||
rpm -qp --provides ${RPMDIR}/${ARCH}/python-arched-0-0.${ARCH}.rpm | grep -v "${ABI}"
|
||||
|
||||
rpm -qp --requires ${RPMDIR}/noarch/python-noarch-0-0.noarch.rpm | grep "${ABI}"
|
||||
rpm -qp --provides ${RPMDIR}/noarch/python-noarch-0-0.noarch.rpm | grep -v "${ABI}"
|
43
tests/pythonabi.spec
Normal file
43
tests/pythonabi.spec
Normal file
@ -0,0 +1,43 @@
|
||||
Name: pythonabi
|
||||
Version: 0
|
||||
Release: 0
|
||||
Summary: ...
|
||||
License: MIT
|
||||
BuildRequires: python3-devel
|
||||
|
||||
%description
|
||||
...
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{python3_sitelib}
|
||||
mkdir -p %{buildroot}%{python3_sitearch}
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
echo "print()" > %{buildroot}%{python3_sitelib}/file.py
|
||||
cp %{python3_sitearch}/../lib-dynload/cmath.*.so %{buildroot}%{python3_sitearch}/file.so
|
||||
cp %{_bindir}/python%{python3_version} %{buildroot}%{_bindir}/python%{python3_version}
|
||||
|
||||
|
||||
%package -n python-noarch
|
||||
Summary: ...
|
||||
BuildArch: noarch
|
||||
%description -n python-noarch
|
||||
...
|
||||
%files -n python-noarch
|
||||
%pycached %{python3_sitelib}/file.py
|
||||
|
||||
|
||||
%package -n python-arched
|
||||
Summary: ...
|
||||
%description -n python-arched
|
||||
...
|
||||
%files -n python-arched
|
||||
%{python3_sitearch}/file.so
|
||||
|
||||
|
||||
%package -n python-interpreter
|
||||
Summary: ...
|
||||
%description -n python-interpreter
|
||||
...
|
||||
%files -n python-interpreter
|
||||
%{_bindir}/python%{python3_version}
|
||||
|
21
tests/tests.yml
Normal file
21
tests/tests.yml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
tasks:
|
||||
- dnf:
|
||||
name: "*"
|
||||
state: latest
|
||||
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- pythonabi:
|
||||
dir: .
|
||||
run: ./pythonabi.sh
|
||||
required_packages:
|
||||
- rpm-build
|
||||
- python3-devel
|
Loading…
Reference in New Issue
Block a user