From 97b64564f911ef965193a6749f7a391a7e0ba35d Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Wed, 11 May 2022 11:56:40 -0700 Subject: [PATCH] Enable tests Signed-off-by: Michel Alexandre Salim --- ...dumpfile-disable-python-test_addrxlat.diff | 35 +++++++++++++++++++ libkdumpfile.spec | 10 +++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 libkdumpfile-disable-python-test_addrxlat.diff diff --git a/libkdumpfile-disable-python-test_addrxlat.diff b/libkdumpfile-disable-python-test_addrxlat.diff new file mode 100644 index 0000000..5333d53 --- /dev/null +++ b/libkdumpfile-disable-python-test_addrxlat.diff @@ -0,0 +1,35 @@ +Description: disable test_addrxlat.py + In the Debian build environment, it can't find the built object files. + And because this is built with autotools the python helpers don't apply either. +Author: Michel Alexandre Salim +Last-Update: 2022-05-11 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: libkdumpfile-0.4.1/python/Makefile.am +=================================================================== +--- libkdumpfile-0.4.1.orig/python/Makefile.am 2020-09-26 11:29:19.000000000 +0000 ++++ libkdumpfile-0.4.1/python/Makefile.am 2022-05-11 20:38:48.799039477 +0000 +@@ -89,8 +89,7 @@ + noinst_HEADERS = \ + addrxlatmod.h + +-test_scripts = \ +- test_addrxlat.py ++test_scripts = + + dist_check_SCRIPTS = \ + $(test_scripts) +Index: libkdumpfile-0.4.1/python/Makefile.in +=================================================================== +--- libkdumpfile-0.4.1.orig/python/Makefile.in 2021-11-04 10:37:35.000000000 +0000 ++++ libkdumpfile-0.4.1/python/Makefile.in 2022-05-11 20:38:40.042798711 +0000 +@@ -590,8 +590,7 @@ + noinst_HEADERS = \ + addrxlatmod.h + +-test_scripts = \ +- test_addrxlat.py ++test_scripts = + + dist_check_SCRIPTS = \ + $(test_scripts) diff --git a/libkdumpfile.spec b/libkdumpfile.spec index 4d69fde..7c5db51 100644 --- a/libkdumpfile.spec +++ b/libkdumpfile.spec @@ -10,6 +10,7 @@ License: LGPLv3+ or GPLv2+ URL: https://github.com/ptesarik/libkdumpfile Source: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz Patch: %{name}-0.4.1-fix-for-gcc12.patch +Patch: %{name}-disable-python-test_addrxlat.diff BuildRequires: gcc-c++ BuildRequires: doxygen @@ -67,7 +68,7 @@ sed -e "\|#!/usr/bin/env python|d" -i python/*/*.py %build -%configure --disable-static +%configure %make_build %{__make} doxygen-doc @@ -75,6 +76,13 @@ sed -e "\|#!/usr/bin/env python|d" -i python/*/*.py %install %make_install find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +# static artifacts are needed to run tests, but we don't +# want to ship them +find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' + + +%check +make check %files