Update to 0.5.0
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
This commit is contained in:
parent
8b3b02e83a
commit
c2bcfc86ce
@ -1,69 +0,0 @@
|
|||||||
From 04d7211140b1ed1e0bd6b2927a0b36824febe987 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michel Alexandre Salim <michel@michel-slm.name>
|
|
||||||
Date: Fri, 5 Aug 2022 14:51:06 -0500
|
|
||||||
Subject: [PATCH] Fix Python tests for Python 3.11
|
|
||||||
|
|
||||||
The exception raised has changed:
|
|
||||||
|
|
||||||
```
|
|
||||||
======================================================================
|
|
||||||
FAIL: test_lookup_tbl (__main__.TestMethod.test_lookup_tbl)
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
|
|
||||||
|
|
||||||
During handling of the above exception, another exception occurred:
|
|
||||||
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "/builddir/build/BUILD/libkdumpfile-4829feb8a46e76ac2f2bc98f47b2f3f1d32300df/python/./test_addrxlat.py", line 293, in test_lookup_tbl
|
|
||||||
with self.assertRaisesRegexp(TypeError, 'must be.* a number'):
|
|
||||||
AssertionError: "must be.* a number" does not match "int() argument must be a string, a bytes-like object or a real number, not 'NoneType'"
|
|
||||||
|
|
||||||
======================================================================
|
|
||||||
FAIL: test_step_idx (__main__.TestStep.test_step_idx)
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
|
|
||||||
|
|
||||||
During handling of the above exception, another exception occurred:
|
|
||||||
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "/builddir/build/BUILD/libkdumpfile-4829feb8a46e76ac2f2bc98f47b2f3f1d32300df/python/./test_addrxlat.py", line 595, in test_step_idx
|
|
||||||
with self.assertRaisesRegexp(TypeError, 'must be.* a number'):
|
|
||||||
AssertionError: "must be.* a number" does not match "int() argument must be a string, a bytes-like object or a real number, not 'NoneType'"
|
|
||||||
```
|
|
||||||
|
|
||||||
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
|
|
||||||
---
|
|
||||||
python/test_addrxlat.py | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/python/test_addrxlat.py b/python/test_addrxlat.py
|
|
||||||
index 7a413c2..610cb29 100644
|
|
||||||
--- a/python/test_addrxlat.py
|
|
||||||
+++ b/python/test_addrxlat.py
|
|
||||||
@@ -290,11 +290,11 @@ class TestMethod(unittest.TestCase):
|
|
||||||
meth.tbl = ((1,),)
|
|
||||||
with self.assertRaisesRegexp(ValueError, 'must be integer pairs'):
|
|
||||||
meth.tbl = ((1, 2, 3),)
|
|
||||||
- with self.assertRaisesRegexp(TypeError, 'must be.* a number'):
|
|
||||||
+ with self.assertRaisesRegexp(TypeError, 'must be.* a .*number'):
|
|
||||||
meth.tbl = ((None, None),)
|
|
||||||
- with self.assertRaisesRegexp(TypeError, 'must be.* a number'):
|
|
||||||
+ with self.assertRaisesRegexp(TypeError, 'must be.* a .*number'):
|
|
||||||
meth.tbl = ((1, None),)
|
|
||||||
- with self.assertRaisesRegexp(TypeError, 'must be.* a number'):
|
|
||||||
+ with self.assertRaisesRegexp(TypeError, 'must be.* a .*number'):
|
|
||||||
meth.tbl = ((None, 1),)
|
|
||||||
|
|
||||||
def test_memarr_defaults(self):
|
|
||||||
@@ -592,7 +592,7 @@ class TestStep(unittest.TestCase):
|
|
||||||
step.idx = None
|
|
||||||
with self.assertRaisesRegexp(ValueError, 'more than [0-9]+ indices'):
|
|
||||||
step.idx = (0,) * (addrxlat.FIELDS_MAX + 2)
|
|
||||||
- with self.assertRaisesRegexp(TypeError, 'must be.* a number'):
|
|
||||||
+ with self.assertRaisesRegexp(TypeError, 'must be.* a .*number'):
|
|
||||||
step.idx = (None,)
|
|
||||||
|
|
||||||
class TestOperator(unittest.TestCase):
|
|
||||||
--
|
|
||||||
2.37.1
|
|
||||||
|
|
@ -1,22 +1,14 @@
|
|||||||
%global mainlibsover 10
|
%global mainlibsover 10
|
||||||
%global addrlibsover 3
|
%global addrlibsover 3
|
||||||
|
|
||||||
%global upstream_ver 0.4.1
|
|
||||||
%global commit 9184e5c9519ea10efc74d2c4c27a62bd4fbf50fa
|
|
||||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
||||||
%global date 20220806
|
|
||||||
|
|
||||||
Name: libkdumpfile
|
Name: libkdumpfile
|
||||||
Version: %{upstream_ver}^%{date}%{shortcommit}
|
Version: 0.5.0
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
Summary: Kernel coredump file access
|
Summary: Kernel coredump file access
|
||||||
|
|
||||||
License: LGPLv3+ or GPLv2+
|
License: LGPLv3+ or GPLv2+
|
||||||
URL: https://github.com/ptesarik/libkdumpfile
|
URL: https://github.com/ptesarik/libkdumpfile
|
||||||
# Source: %%{url}/releases/download/v%%{version}/%%{name}-%%{version}.tar.gz
|
Source: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||||
Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
|
||||||
# https://github.com/ptesarik/libkdumpfile/pull/45
|
|
||||||
Patch: fix-python-311-tests.diff
|
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
@ -27,10 +19,6 @@ BuildRequires: lzo-devel
|
|||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: snappy-devel
|
BuildRequires: snappy-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
# for non-release builds
|
|
||||||
BuildRequires: autoconf
|
|
||||||
BuildRequires: automake
|
|
||||||
BuildRequires: libtool
|
|
||||||
|
|
||||||
%global _description %{expand:
|
%global _description %{expand:
|
||||||
libkdumpfile is a library to read kdump-compressed kernel core dumps.}
|
libkdumpfile is a library to read kdump-compressed kernel core dumps.}
|
||||||
@ -73,11 +61,9 @@ The %{name}-devel package contains misc utilities built with %{name}.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n %{name}-%{commit}
|
%autosetup -p1
|
||||||
# Remove unneeded shebang
|
# Remove unneeded shebang
|
||||||
sed -e "\|#!/usr/bin/env python|d" -i python/*/*.py
|
sed -e "\|#!/usr/bin/env python|d" -i python/*/*.py
|
||||||
# non-release builds
|
|
||||||
autoreconf -fiv
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -116,7 +102,7 @@ find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
|
|||||||
%doc doc/html
|
%doc doc/html
|
||||||
|
|
||||||
%files -n python3-%{name}
|
%files -n python3-%{name}
|
||||||
%{python3_sitearch}/%{name}-%{upstream_ver}-*.egg-info
|
%{python3_sitearch}/%{name}-%{version}-*.egg-info
|
||||||
%{python3_sitearch}/addrxlat/
|
%{python3_sitearch}/addrxlat/
|
||||||
%{python3_sitearch}/_addrxlat.*.so
|
%{python3_sitearch}/_addrxlat.*.so
|
||||||
%{python3_sitearch}/kdumpfile/
|
%{python3_sitearch}/kdumpfile/
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (libkdumpfile-9184e5c.tar.gz) = 2d04270a0c15e2395a5f8c82c7c5681a79b687b64c9904ed4c73fd1acd0d8f31efaa14e5e383be40c1e4f1dd190eaad72ba16da4d75b645546796184d38e56dd
|
SHA512 (libkdumpfile-0.5.0.tar.gz) = 86c36cd1b4950f9d843ce3cf1ac3d0de571324d67ff5416196fd891c08d9c849d3897b200f7edda527b06e47f42cf1374ee6722ddee4c9ff3b9677c4ec741b3b
|
||||||
|
Loading…
Reference in New Issue
Block a user