Compare commits

...

No commits in common. 'i8c-stream-201801' and 'c9' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/junit-4.12-clean.tar.gz
SOURCES/junit-4.13.1.tar.gz

@ -1 +1 @@
8638be921555bc2a38baee8cfe0c7325b7d34650 SOURCES/junit-4.12-clean.tar.gz
f076a21f66401bdd79263ba0e464c95018a2365d SOURCES/junit-4.13.1.tar.gz

@ -0,0 +1,108 @@
From 85c780b61cd35b4544d2926393805e1699641f38 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Fri, 6 Mar 2020 14:28:05 +0100
Subject: [PATCH] Port to hamcrest 2.2
---
.../org/junit/internal/matchers/StacktracePrintingMatcher.java | 3 ---
.../org/junit/internal/matchers/ThrowableCauseMatcher.java | 2 --
.../org/junit/internal/matchers/ThrowableMessageMatcher.java | 2 --
src/main/java/org/junit/matchers/JUnitMatchers.java | 2 +-
.../experimental/theories/runner/WithDataPointMethod.java | 2 +-
5 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java b/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java
index 93a6827..3ea4a81 100644
--- a/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java
+++ b/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java
@@ -1,7 +1,6 @@
package org.junit.internal.matchers;
import org.hamcrest.Description;
-import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.junit.internal.Throwables;
@@ -39,13 +38,11 @@ public class StacktracePrintingMatcher<T extends Throwable> extends
return Throwables.getStacktrace(throwable);
}
- @Factory
public static <T extends Throwable> Matcher<T> isThrowable(
Matcher<T> throwableMatcher) {
return new StacktracePrintingMatcher<T>(throwableMatcher);
}
- @Factory
public static <T extends Exception> Matcher<T> isException(
Matcher<T> exceptionMatcher) {
return new StacktracePrintingMatcher<T>(exceptionMatcher);
diff --git a/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java b/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java
index 6e2ff5e..1f0a0a0 100644
--- a/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java
+++ b/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java
@@ -1,7 +1,6 @@
package org.junit.internal.matchers;
import org.hamcrest.Description;
-import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
@@ -43,7 +42,6 @@ public class ThrowableCauseMatcher<T extends Throwable> extends
* @param matcher to apply to the cause of the outer exception
* @param <T> type of the outer exception
*/
- @Factory
public static <T extends Throwable> Matcher<T> hasCause(final Matcher<?> matcher) {
return new ThrowableCauseMatcher<T>(matcher);
}
diff --git a/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java b/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java
index 74386a8..7d16b11 100644
--- a/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java
+++ b/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java
@@ -1,7 +1,6 @@
package org.junit.internal.matchers;
import org.hamcrest.Description;
-import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
@@ -30,7 +29,6 @@ public class ThrowableMessageMatcher<T extends Throwable> extends
matcher.describeMismatch(item.getMessage(), description);
}
- @Factory
public static <T extends Throwable> Matcher<T> hasMessage(final Matcher<String> matcher) {
return new ThrowableMessageMatcher<T>(matcher);
}
diff --git a/src/main/java/org/junit/matchers/JUnitMatchers.java b/src/main/java/org/junit/matchers/JUnitMatchers.java
index 13407cc..8889266 100644
--- a/src/main/java/org/junit/matchers/JUnitMatchers.java
+++ b/src/main/java/org/junit/matchers/JUnitMatchers.java
@@ -56,7 +56,7 @@ public class JUnitMatchers {
* @deprecated Please use {@link CoreMatchers#everyItem(Matcher)} instead.
*/
@Deprecated
- public static <T> Matcher<Iterable<T>> everyItem(final Matcher<T> elementMatcher) {
+ public static <T> Matcher<Iterable<? extends T>> everyItem(final Matcher<T> elementMatcher) {
return CoreMatchers.everyItem(elementMatcher);
}
diff --git a/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java b/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java
index f2b2753..e5759ed 100644
--- a/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java
+++ b/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java
@@ -108,7 +108,7 @@ public class WithDataPointMethod {
return JUnitCore.runClasses(type).getFailures();
}
- private Matcher<Iterable<Failure>> empty() {
+ private Matcher<Iterable<? extends Failure>> empty() {
return everyItem(nullValue(Failure.class));
}
}
--
2.25.2

@ -1,22 +0,0 @@
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: ./create-tarball.sh VERSION"
exit 1
fi
VERSION=${1}
NAME="junit"
wget https://github.com/${NAME}-team/${NAME}/archive/r${VERSION}.tar.gz
tar xvf r${VERSION}.tar.gz
(
cd ${NAME}-r${VERSION}
find . -name "*.jar" -delete
find . -name "*.class" -delete
)
tar czvf ${NAME}-${VERSION}-clean.tar.gz ${NAME}-r${VERSION}
rm -Rf ${NAME}-${VERSION}.tar.gz

@ -0,0 +1,22 @@
#!/bin/bash
set -e
name=junit
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
wget "https://github.com/junit-team/junit/archive/r${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
pushd tarball-tmp
tar -xf "../${name}-${version}.orig.tar.gz"
# CLEAN TARBALL
find -name '*.jar' -delete
find -name '*.class' -delete
rm -r "junit4-r${version}/src/site"
tar -czf "../${name}-${version}.tar.gz" *
popd
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"

@ -1,22 +1,35 @@
%bcond_with bootstrap
Name: junit
Epoch: 1
Version: 4.12
Release: 9%{?dist}
Version: 4.13.1
Release: 7%{?dist}
Summary: Java regression test package
License: EPL-1.0
URL: http://www.junit.org/
BuildArch: noarch
# ./clean-tarball.sh %{version}
Source0: %{name}-%{version}-clean.tar.gz
Source3: create-tarball.sh
# ./generate-tarball.sh
Source0: %{name}-%{version}.tar.gz
Source1: generate-tarball.sh
Patch1: 0001-Port-to-hamcrest-2.2.patch
BuildRequires: maven-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.hamcrest:hamcrest-core)
%endif
Obsoletes: %{name}-demo < 4.12
# For other packages, surefire-junit4 is normally pulled as transitive
# runtime dependency of junit, but junit doesn't build-depend on
# itself, so explicit BR on surefire-junit4 is needed.
%if %{without bootstrap}
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit4)
%endif
%description
JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
@ -37,7 +50,9 @@ Summary: Javadoc for %{name}
Javadoc for %{name}.
%prep
%setup -q -n %{name}-r%{version}
%setup -q -n junit4-r%{version}
%patch -P 1 -p1
# InaccessibleBaseClassTest fails with Java 8
sed -i /InaccessibleBaseClassTest/d src/test/java/org/junit/tests/AllTests.java
@ -70,24 +85,91 @@ sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >sr
%mvn_file : %{name}
%build
%mvn_build
%mvn_build -- -DjdkVersion=1.6
%install
%mvn_install
%files -f .mfiles
%doc LICENSE-junit.txt README.md
%license LICENSE-junit.txt
%doc README.md
%files javadoc -f .mfiles-javadoc
%doc LICENSE-junit.txt
%license LICENSE-junit.txt
%files manual
%doc LICENSE-junit.txt
%license LICENSE-junit.txt
%doc doc/*
%changelog
* Tue Dec 12 2023 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1:4.12-9
- Rebuilt for MSVSphere 8.8
* Thu Nov 21 2024 Marián Konček <mkoncek@redhat.com> - 1:4.13.1-7
- Fix patch usage
* Tue Nov 19 2024 Marián Konček <mkoncek@redhat.com> - 1:4.13.1-6
- Rebuild with regenerated Requires on Java
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:4.13.1-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Jun 09 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.13.1-4
- Rebuild to workaround DistroBaker issue
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.13.1-3
- Bootstrap Maven for CentOS Stream 9
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.13.1-2
- Bootstrap build
- Non-bootstrap build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Dec 4 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.13.1-1
- Update to upstream version 4.13.1
* Sun Aug 16 2020 Fabio Valentini <decathorpe@gmail.com> - 1:4.13-2
- Bump release to account for previously untagged 4.13-1.fc33 build.
* Thu Aug 13 2020 Jerry James <loganjerry@gmail.com> - 1:4.13-1
- Update to upstream version 4.13
* Tue Aug 04 2020 Mat Booth <mat.booth@redhat.com> - 1:4.12-18
- Add automatic module name
* Tue Aug 04 2020 Mat Booth <mat.booth@redhat.com> - 1:4.12-17
- Allow building on Java 11
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-16
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 1:4.12-14
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Fri Mar 06 2020 Marian Koncek <mkoncek@redhat.com> - 4.13-1
- Update to upstream version 4.13
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.12-11
- Mass rebuild for javapackages-tools 201902
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.12-10
- Mass rebuild for javapackages-tools 201901
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 2 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.12-9
- Update license tag
@ -246,6 +328,7 @@ sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >sr
* Mon Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:3.8.1-4jpp
- Rebuild with ant-1.6.2
* Fri May 09 2003 David Walluck <david@anti-microsoft.org> 0:3.8.1-3jpp
- update for JPackage 1.5

Loading…
Cancel
Save