run readelf tests on all arches

Use system readelf binary on non-x86_64 and ignore test failures.
They're expected due to readelf output differences.
This commit is contained in:
Dominik 'Rathann' Mierzejewski 2020-10-30 23:43:46 +01:00
parent a58c7f0267
commit ca5e67ddd2

View File

@ -17,6 +17,7 @@ and DWARF debugging information.
Summary: %{summary} Summary: %{summary}
# https://github.com/eliben/pyelftools/issues/180 # https://github.com/eliben/pyelftools/issues/180
Provides: bundled(python3-construct) = 2.6 Provides: bundled(python3-construct) = 2.6
BuildRequires: %{_bindir}/readelf
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
BuildArch: noarch BuildArch: noarch
@ -25,6 +26,9 @@ BuildArch: noarch
%prep %prep
%setup -q %setup -q
%ifnarch x86_64
rm test/external_tools/readelf
%endif
%build %build
%{py3_build} %{py3_build}
@ -40,12 +44,10 @@ popd
%check %check
%{__python3} test/run_all_unittests.py %{__python3} test/run_all_unittests.py
%{__python3} test/run_examples_test.py %{__python3} test/run_examples_test.py
%ifarch x86_64
# tests may fail because of differences in output-formatting # tests may fail because of differences in output-formatting
# from binutils' readelf. See: # from binutils' readelf. See:
# https://github.com/eliben/pyelftools/wiki/Hacking-guide#tests # https://github.com/eliben/pyelftools/wiki/Hacking-guide#tests
%{__python3} test/run_readelf_tests.py || : %{__python3} test/run_readelf_tests.py || :
%endif
%files -n python3-%{name} %files -n python3-%{name}
%license LICENSE %license LICENSE
@ -59,6 +61,7 @@ popd
%changelog %changelog
* Fri Oct 30 2020 Dominik Mierzejewski <rpm@greysector.net> - 0.27-1 * Fri Oct 30 2020 Dominik Mierzejewski <rpm@greysector.net> - 0.27-1
- update to 0.27 (#1891845) - update to 0.27 (#1891845)
- run readelf tests on all arches
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.26-4 * Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.26-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild