diff --git a/backport-Updated-the-build-system-to-use-pytest-for-tests.patch b/backport-Updated-the-build-system-to-use-pytest-for-tests.patch new file mode 100644 index 0000000..314be36 --- /dev/null +++ b/backport-Updated-the-build-system-to-use-pytest-for-tests.patch @@ -0,0 +1,28 @@ +From 573440fc7dce774e1f695470b2387d84aaf85352 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C4=9Bj=20T=C3=BD=C4=8D?= +Date: Thu, 21 Jun 2018 10:50:07 +0200 +Subject: [PATCH] Updated the build system to use pytest for tests. + +--- + Makefile | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 32a3420..4676e2e 100644 +--- a/Makefile ++++ b/Makefile +@@ -88,11 +88,11 @@ test: + @find . -name '*.py' -print|xargs -n1 --max-procs=$(NUM_PROCS) pylint$(PYVERSION) -E 2> /dev/null + @echo "[ OK ]" + @echo "***Running unittests checks***" +- @PYTHONPATH=. nosetests$(PYVERSION) --processes=-1 -vw tests/ ++ @PYTHONPATH=. py.test$(PYVERSION) --processes=-1 -vw tests/ + + runpylint: + @find . -name '*.py' -print|xargs -n1 --max-procs=$(NUM_PROCS) pylint$(PYVERSION) -E 2> /dev/null + @echo "[ OK ]" + + unittest: +- PYTHONPATH=. nosetests$(PYVERSION) --processes=-1 -vw tests/ ++ PYTHONPATH=. py.test$(PYVERSION) -v tests/ + diff --git a/oscap-anaconda-addon.spec b/oscap-anaconda-addon.spec index b41037a..0f328a4 100644 --- a/oscap-anaconda-addon.spec +++ b/oscap-anaconda-addon.spec @@ -1,6 +1,6 @@ Name: oscap-anaconda-addon Version: 1.0 -Release: 3 +Release: 4 Summary: Anaconda addon integrating OpenSCAP to the installation process License: GPLv2+ URL: https://github.com/OpenSCAP/oscap-anaconda-addon @@ -8,9 +8,10 @@ Source0: https://github.com/OpenSCAP/%{name}/releases/download/r%{ve # Fix check fail Patch0001: oscap-anaconda-addon-Bumped-the-schematron-version-to-match-the-SCAP-version.patch +Patch0002: backport-Updated-the-build-system-to-use-pytest-for-tests.patch BuildArch: noarch -BuildRequires: gettext python3-devel python3-pycurl python3-mock python3-nose python3-cpio +BuildRequires: gettext python3-devel python3-pycurl python3-mock python3-pytest python3-cpio BuildRequires: openscap openscap-utils openscap-python3 anaconda >= 28.22 Requires: anaconda >= 28.22 python3-cpio openscap openscap-utils openscap-python3 @@ -35,5 +36,8 @@ make install DESTDIR=%{buildroot} %doc COPYING ChangeLog README.md %changelog +* Sat May 07 2022 gaihuiying - 1.0-4 +- Updated the build system to use pytest for tests + * Mon Apr 20 2020 Shuaishuai Song - 1.0-3 - package init