check if the build environment supports attr before executing test
This commit is contained in:
parent
ae30506002
commit
a0b5aadcef
19
pyxattr.spec
19
pyxattr.spec
@ -1,7 +1,7 @@
|
|||||||
Name: pyxattr
|
Name: pyxattr
|
||||||
Summary: Extended attributes library wrapper for Python
|
Summary: Extended attributes library wrapper for Python
|
||||||
Version: 0.8.0
|
Version: 0.8.0
|
||||||
Release: 2
|
Release: 3
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://pyxattr.k1024.org/
|
URL: http://pyxattr.k1024.org/
|
||||||
Source: https://pyxattr.k1024.org/downloads/%{name}-%{version}.tar.gz
|
Source: https://pyxattr.k1024.org/downloads/%{name}-%{version}.tar.gz
|
||||||
@ -33,9 +33,17 @@ cp -a . %{py3dir}
|
|||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export TEST_IGNORE_XATTRS=security.selinux
|
touch check-xattr-support
|
||||||
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
|
||||||
%{__python3} -m pytest -v
|
if ! attr -s test -V test check-xattr-support >& /dev/null ;then
|
||||||
|
echo "skipping tests because BUILD_FILE seem to lack xattr support"
|
||||||
|
else
|
||||||
|
export TEST_IGNORE_XATTRS=security.selinux
|
||||||
|
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||||
|
%{__python3} -m pytest -v
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf check-xattr-support
|
||||||
|
|
||||||
%files -n python3-%{name}
|
%files -n python3-%{name}
|
||||||
%{python3_sitearch}/*.so
|
%{python3_sitearch}/*.so
|
||||||
@ -45,6 +53,9 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
|||||||
%doc NEWS README.md
|
%doc NEWS README.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 5 2023 zhangruifang <zhangruifang1@h-partners.com> - 0.8.0-3
|
||||||
|
- check if the build environment supports attr before executing test
|
||||||
|
|
||||||
* Wed Mar 29 2023 fuanan <fuanan3@h-partners.com> - 0.8.0-2
|
* Wed Mar 29 2023 fuanan <fuanan3@h-partners.com> - 0.8.0-2
|
||||||
- make the test check
|
- make the test check
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user