check if the build environment supports attr before executing test
This commit is contained in:
parent
9727a59f74
commit
3eec00b8ac
23
pyxattr.spec
23
pyxattr.spec
@ -1,7 +1,7 @@
|
||||
Name: pyxattr
|
||||
Summary: Extended attributes library wrapper for Python
|
||||
Version: 0.6.1
|
||||
Release: 2
|
||||
Release: 3
|
||||
License: LGPLv2+
|
||||
URL: http://pyxattr.k1024.org/
|
||||
Source: https://pyxattr.k1024.org/downloads/%{name}-%{version}.tar.gz
|
||||
@ -53,12 +53,20 @@ pushd %{py3dir}
|
||||
popd
|
||||
|
||||
%check
|
||||
export TEST_IGNORE_XATTRS=security.selinux
|
||||
%{__python2} setup.py test
|
||||
touch check-xattr-support
|
||||
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py test
|
||||
popd
|
||||
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
|
||||
%{__python2} setup.py test
|
||||
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py test
|
||||
popd
|
||||
fi
|
||||
|
||||
rm -rf check-xattr-support
|
||||
|
||||
%files -n python2-%{name}
|
||||
%{python2_sitearch}/*.so
|
||||
@ -75,6 +83,9 @@ popd
|
||||
%doc NEWS README.rst
|
||||
|
||||
%changelog
|
||||
* Tue Nov 23 2021 wangjie <wangjie375@huawei.com> - 0.6.1-3
|
||||
- check if the build environment supports attr before executing test
|
||||
|
||||
* Tue Aug 18 2020 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 0.6.1-2
|
||||
- rebuild for requirement package update
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user