[packages/python-elftools] - did some tests investigation

qboosh qboosh at pld-linux.org
Sun Feb 22 15:39:13 CET 2026


commit 0a16366bd9ddb88c75c5787f93915dd6fb1b3b12
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Feb 22 15:39:14 2026 +0100

    - did some tests investigation

 python-elftools.spec | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/python-elftools.spec b/python-elftools.spec
index 3151c90..a0777b5 100644
--- a/python-elftools.spec
+++ b/python-elftools.spec
@@ -1,9 +1,6 @@
 #
-# TODO:
-#	- check why the tests fail
-#
 # Conditional build:
-%bcond_with	tests	# run tests
+%bcond_with	tests	# run tests (require some specific version of binutils)
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 
@@ -28,6 +25,12 @@ BuildRequires:	python-setuptools
 BuildRequires:	python3-devel
 BuildRequires:	python3-setuptools
 %endif
+%if %{with tests}
+# readelf
+BuildRequires:	binutils
+# llvm-dwarfdump
+BuildRequires:	llvm
+%endif
 Requires:	python-modules
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -57,6 +60,13 @@ informacji dla debuggera DWARF.
 %prep
 %setup -q -n pyelftools-%{version}
 
+# prebuilt x86_64 binaries
+%{__rm} test/external_tools/{readelf,llvm-dwarfdump}
+%if %{with tests}
+ln -sf /usr/bin/readelf test/external_tools/readelf
+ln -sf /usr/bin/llvm-dwarfdump test/external_tools/llvm-dwarfdump
+%endif
+
 %build
 %if %{with python2}
 %py_build
@@ -67,7 +77,7 @@ informacji dla debuggera DWARF.
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
 
 %if %{with tests}
 %{__python3} ./test/all_tests.py
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-elftools.git/commitdiff/0a16366bd9ddb88c75c5787f93915dd6fb1b3b12



More information about the pld-cvs-commit mailing list