Re-enable tests
This commit is contained in:
parent
44dc399968
commit
1c95f315c8
@ -1,7 +1,7 @@
|
||||
From ea8e50b737a8b8210417af767df50f6299d94d23 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Sun, 21 Nov 2021 11:19:41 +0100
|
||||
Subject: [PATCH] Update ivy-local-classpath
|
||||
Subject: [PATCH 1/2] Update ivy-local-classpath
|
||||
|
||||
---
|
||||
configs/ivy-local-classpath | 2 +-
|
||||
@ -17,5 +17,5 @@ index 9ab48d25..d65d6358 100644
|
||||
xmvn/xmvn-launcher
|
||||
xmvn/xmvn-api
|
||||
--
|
||||
2.33.1
|
||||
2.35.3
|
||||
|
||||
|
40
0002-Allow-running-check-without-coverage.patch
Normal file
40
0002-Allow-running-check-without-coverage.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From d12a3bbf7055d59e737d5b99f1afa848dba6ad42 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Tue, 14 Jun 2022 18:56:47 +0200
|
||||
Subject: [PATCH 2/2] Allow running check without coverage
|
||||
|
||||
---
|
||||
check | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/check b/check
|
||||
index 16e005a9..2305307d 100755
|
||||
--- a/check
|
||||
+++ b/check
|
||||
@@ -47,8 +47,11 @@ if [ -z "$pyinterpreter" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
+cov_config=--cov-config=../.coveragerc
|
||||
+
|
||||
if ! coverage --version >/dev/null 2>&1; then
|
||||
coverage(){ :;}
|
||||
+ cov_config=
|
||||
fi
|
||||
|
||||
cat >.coveragerc <<EOF
|
||||
@@ -65,9 +68,9 @@ export COVERAGE_PROCESS_START="${PWD}/.coveragerc"
|
||||
export PYTHONPATH="${PWD}/test/coverage${PYTHONPATH:+:}${PYTHONPATH:-}"
|
||||
|
||||
echo "Running Python tests with ${pyinterpreter}..."
|
||||
-(cd ./python && "${pyinterpreter}" -m pytest -v --cov-config=../.coveragerc)
|
||||
+(cd ./python && "${pyinterpreter}" -m pytest -v ${cov_config})
|
||||
r1=$?
|
||||
-(cd ./test && PYTHONPATH="${PWD}/../python${PYTHONPATH:+:}${PYTHONPATH:-}" "${pyinterpreter}" -m pytest -v --cov-config=../.coveragerc)
|
||||
+(cd ./test && PYTHONPATH="${PWD}/../python${PYTHONPATH:+:}${PYTHONPATH:-}" "${pyinterpreter}" -m pytest -v ${cov_config})
|
||||
r2=$?
|
||||
|
||||
if [ ${r1} -lt ${r2} ]; then
|
||||
--
|
||||
2.35.3
|
||||
|
@ -33,6 +33,7 @@ Source17: toolchains-openjdk17.xml
|
||||
|
||||
# Upstream patch for rhbz#2025272
|
||||
Patch0: 0001-Update-ivy-local-classpath.patch
|
||||
Patch1: 0002-Allow-running-check-without-coverage.patch
|
||||
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: which
|
||||
@ -42,10 +43,7 @@ BuildRequires: xmlto
|
||||
BuildRequires: %{python_prefix}-devel
|
||||
BuildRequires: %{python_prefix}-lxml
|
||||
BuildRequires: %{python_prefix}-setuptools
|
||||
%if !0%{?rhel}
|
||||
BuildRequires: %{python_prefix}-pytest
|
||||
BuildRequires: %{python_prefix}-pytest-cov
|
||||
%endif
|
||||
|
||||
Requires: javapackages-filesystem = %{version}-%{release}
|
||||
Requires: coreutils
|
||||
@ -157,6 +155,7 @@ OpenJDK 17 toolchain for XMvn
|
||||
%prep
|
||||
%setup -q -n javapackages-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure --pyinterpreter=%{python_interpreter} \
|
||||
@ -184,10 +183,8 @@ cp -p %{SOURCE17} %{buildroot}%{maven_home}/conf/toolchains.xml-openjdk17
|
||||
|
||||
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/java/javapackages-config.json
|
||||
|
||||
%if !0%{?rhel}
|
||||
%check
|
||||
#./check
|
||||
%endif
|
||||
./check
|
||||
|
||||
%files -f files-tools
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user