Compare commits
No commits in common. "c8-stream-201902" and "c9-beta" have entirely different histories.
c8-stream-
...
c9-beta
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/mockito-3.1.2.tar.xz
|
||||
SOURCES/mockito-3.7.13.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
15683d23b64ec2b289dccd9898efcbbde7741765 SOURCES/mockito-3.1.2.tar.xz
|
||||
e95d6ff6732c8b2e2ff61ca4e68b89f5ff2539f9 SOURCES/mockito-3.7.13.tar.gz
|
||||
|
22
SOURCES/generate-tarball.sh
Executable file
22
SOURCES/generate-tarball.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
name=mockito
|
||||
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
||||
|
||||
# RETRIEVE
|
||||
wget "https://github.com/mockito/mockito/archive/v${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 -rf gradlew gradlew.bat src/javadoc
|
||||
|
||||
tar -czf "../${name}-${version}.tar.gz" *
|
||||
popd
|
||||
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"
|
@ -1,20 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
VERSION="$(sed -n 's/Version:\s*//p' *.spec)"
|
||||
SRCDIR=mockito-${VERSION}
|
||||
|
||||
git clone https://github.com/mockito/mockito.git ${SRCDIR}
|
||||
pushd $SRCDIR
|
||||
git archive --format=tar --prefix=${SRCDIR}/ v${VERSION} > ../${SRCDIR}.tar
|
||||
popd
|
||||
|
||||
rm -rf ${SRCDIR}
|
||||
|
||||
tar -xf ${SRCDIR}.tar
|
||||
rm ${SRCDIR}.tar
|
||||
pushd ${SRCDIR}
|
||||
find -name '*.jar' -delete
|
||||
rm -rf gradlew gradlew.bat src/javadoc
|
||||
popd
|
||||
|
||||
tar -cvJf mockito-${VERSION}.tar.xz ${SRCDIR}
|
@ -90,26 +90,6 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<executable>cp</executable>
|
||||
<arguments>
|
||||
<argument>${project.build.sourceDirectory}/org/mockito/internal/creation/bytebuddy/inject/MockMethodDispatcher.class</argument>
|
||||
<argument>${project.build.outputDirectory}/org/mockito/internal/creation/bytebuddy/inject/MockMethodDispatcher.raw</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java b/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java
|
||||
index 34b1e89..326a64f 100644
|
||||
index 187f1ea..f8fa355 100644
|
||||
--- a/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java
|
||||
+++ b/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java
|
||||
@@ -18,8 +18,8 @@ import net.bytebuddy.dynamic.ClassFileLocator;
|
||||
@@ -30,8 +30,8 @@ import net.bytebuddy.dynamic.ClassFileLocator;
|
||||
import net.bytebuddy.dynamic.scaffold.MethodGraph;
|
||||
import net.bytebuddy.dynamic.scaffold.TypeValidation;
|
||||
import net.bytebuddy.implementation.Implementation;
|
||||
@ -14,63 +14,63 @@ index 34b1e89..326a64f 100644
|
||||
import net.bytebuddy.pool.TypePool;
|
||||
import net.bytebuddy.utility.OpenedClassReader;
|
||||
diff --git a/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java b/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java
|
||||
index 2b08c10..a19ffa1 100644
|
||||
index f5b807a..c9ca662 100644
|
||||
--- a/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java
|
||||
+++ b/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java
|
||||
@@ -19,6 +19,7 @@ import org.mockito.plugins.MockMaker;
|
||||
@@ -26,6 +26,7 @@ import org.mockito.plugins.MockMaker;
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.mockitoutil.ClassLoaders;
|
||||
import org.mockitoutil.SimpleSerializationUtil;
|
||||
+import org.objectweb.asm.ClassVisitor;
|
||||
import org.objenesis.ObjenesisStd;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -138,7 +139,7 @@ public abstract class AbstractByteBuddyMockMakerTest<MM extends MockMaker> {
|
||||
public void instantiate_fine_when_objenesis_on_the_classpath() throws Exception {
|
||||
public abstract class AbstractByteBuddyMockMakerTest<MM extends MockMaker> {
|
||||
@@ -154,7 +155,7 @@ public abstract class AbstractByteBuddyMockMakerTest<MM extends MockMaker> {
|
||||
// given
|
||||
ClassLoader classpath_with_objenesis = ClassLoaders.excludingClassLoader()
|
||||
- .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class)
|
||||
+ .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class, ClassVisitor.class)
|
||||
.withCodeSourceUrlOf(coverageTool())
|
||||
.build();
|
||||
ClassLoader classpath_with_objenesis =
|
||||
ClassLoaders.excludingClassLoader()
|
||||
- .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class)
|
||||
+ .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class, ClassVisitor.class)
|
||||
.withCodeSourceUrlOf(coverageTool())
|
||||
.build();
|
||||
|
||||
diff --git a/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java b/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java
|
||||
index 7d5968d..f5c1644 100644
|
||||
index f971893..63af9cd 100644
|
||||
--- a/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java
|
||||
+++ b/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
package org.mockito.internal.junit;
|
||||
@@ -8,6 +8,7 @@ import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.mockingDetails;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
+import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mock;
|
||||
@@ -41,6 +42,7 @@ public class JUnitRuleTest {
|
||||
@@ -42,6 +43,7 @@ public class JUnitRuleTest {
|
||||
|
||||
@SuppressWarnings({"CheckReturnValue", "MockitoUsage"})
|
||||
@Test
|
||||
+ @Ignore
|
||||
public void does_not_check_invalid_mockito_usage_on_failure() throws Throwable {
|
||||
//This intended behavior is questionable
|
||||
//However, it was like that since the beginning of JUnit rule support
|
||||
// This intended behavior is questionable
|
||||
// However, it was like that since the beginning of JUnit rule support
|
||||
diff --git a/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java b/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java
|
||||
index 85e0113..64f2083 100644
|
||||
index 9cd47da..356a3e0 100644
|
||||
--- a/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java
|
||||
+++ b/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java
|
||||
@@ -12,6 +12,7 @@ import org.junit.Test;
|
||||
@@ -16,6 +16,7 @@ import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.internal.configuration.plugins.Plugins;
|
||||
import org.mockitoutil.ClassLoaders;
|
||||
+import org.objectweb.asm.ClassVisitor;
|
||||
import org.objenesis.Objenesis;
|
||||
|
||||
import java.util.Set;
|
||||
@@ -30,6 +31,7 @@ public class NoJUnitDependenciesTest {
|
||||
Matcher.class,
|
||||
ByteBuddy.class,
|
||||
ByteBuddyAgent.class,
|
||||
+ ClassVisitor.class,
|
||||
Objenesis.class
|
||||
)
|
||||
.withCodeSourceUrlOf(coverageTool())
|
||||
public class NoJUnitDependenciesTest {
|
||||
@@ -32,6 +33,7 @@ public class NoJUnitDependenciesTest {
|
||||
Matcher.class,
|
||||
ByteBuddy.class,
|
||||
ByteBuddyAgent.class,
|
||||
+ ClassVisitor.class,
|
||||
Objenesis.class)
|
||||
.withCodeSourceUrlOf(coverageTool())
|
||||
.without("junit", "org.junit", "org.opentest4j")
|
||||
|
@ -1,14 +1,16 @@
|
||||
%bcond_with bootstrap
|
||||
|
||||
Name: mockito
|
||||
Version: 3.1.2
|
||||
Release: 2%{?dist}
|
||||
Version: 3.7.13
|
||||
Release: 5%{?dist}
|
||||
Summary: Tasty mocking framework for unit tests in Java
|
||||
License: MIT
|
||||
URL: https://site.mockito.org/
|
||||
BuildArch: noarch
|
||||
|
||||
# Source tarball and the script to generate it
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: make-mockito-sourcetarball.sh
|
||||
# ./generate-tarball.sh
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: generate-tarball.sh
|
||||
|
||||
# A custom build script to allow building with maven instead of gradle
|
||||
Source2: mockito-core.pom
|
||||
@ -18,16 +20,19 @@ Source2: mockito-core.pom
|
||||
Patch0: use-unbundled-asm.patch
|
||||
|
||||
BuildRequires: maven-local
|
||||
%if %{with bootstrap}
|
||||
BuildRequires: javapackages-bootstrap
|
||||
%else
|
||||
BuildRequires: mvn(junit:junit)
|
||||
BuildRequires: mvn(net.bytebuddy:byte-buddy)
|
||||
BuildRequires: mvn(net.bytebuddy:byte-buddy-agent)
|
||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||
BuildRequires: mvn(org.assertj:assertj-core)
|
||||
BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin)
|
||||
BuildRequires: mvn(org.hamcrest:hamcrest)
|
||||
BuildRequires: mvn(org.objenesis:objenesis)
|
||||
BuildRequires: mvn(org.opentest4j:opentest4j)
|
||||
BuildRequires: mvn(org.ow2.asm:asm)
|
||||
%endif
|
||||
|
||||
%description
|
||||
Mockito is a mocking framework that tastes really good. It lets you write
|
||||
@ -45,6 +50,10 @@ This package contains the API documentation for %{name}.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
# Disable failing test
|
||||
# TODO check status: https://github.com/mockito/mockito/issues/2162
|
||||
sed -i '/add_listeners_concurrently_sanity_check/i @org.junit.Ignore' src/test/java/org/mockitousage/debugging/StubbingLookupListenerCallbackTest.java
|
||||
|
||||
# Use our custom build script
|
||||
sed -e 's/@VERSION@/%{version}/' %{SOURCE2} > pom.xml
|
||||
|
||||
@ -61,9 +70,13 @@ EOF
|
||||
# Compatibility alias
|
||||
%mvn_alias org.%{name}:%{name}-core org.%{name}:%{name}-all
|
||||
|
||||
sed -i 's/net\.bytebuddy\.jar\.asm/org.objectweb.asm/' src/main/java/org/mockito/internal/creation/bytebuddy/MockMethodAdvice.java
|
||||
|
||||
%build
|
||||
# See the usage of exec-maven-plugin in the pom
|
||||
javac src/main/java/org/mockito/internal/creation/bytebuddy/inject/MockMethodDispatcher.java
|
||||
mkdir -p target/classes/
|
||||
javac -d target/classes/ src/main/java/org/mockito/internal/creation/bytebuddy/inject/MockMethodDispatcher.java
|
||||
mv target/classes/org/mockito/internal/creation/bytebuddy/inject/MockMethodDispatcher.{class,raw}
|
||||
|
||||
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
|
||||
|
||||
@ -78,6 +91,50 @@ javac src/main/java/org/mockito/internal/creation/bytebuddy/inject/MockMethodDis
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.7.13-5
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Wed Jun 09 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.7.13-4
|
||||
- Rebuild to workaround DistroBaker issue
|
||||
|
||||
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.7.13-3
|
||||
- Bootstrap Maven for CentOS Stream 9
|
||||
|
||||
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.7.13-2
|
||||
- Bootstrap build
|
||||
- Non-bootstrap build
|
||||
|
||||
* Thu Feb 04 2021 Marian Koncek <mkoncek@redhat.com> - 3.7.13-1
|
||||
- Update to upstream version 3.7.13
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.13-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri Oct 9 2020 Stuart Gathman <stuart@gathman.org> - 3.5.13-1
|
||||
- Update to version 3.5.13
|
||||
|
||||
* Wed Sep 30 2020 Marian Koncek <mkoncek@redhat.com> - 3.5.13-1
|
||||
- Update to ustream version 3.5.13
|
||||
|
||||
* Sun Aug 23 2020 Jerry James <loganjerry@gmail.com> - 3.5.5-1
|
||||
- Update to version 3.5.5
|
||||
|
||||
* Fri Aug 14 2020 Jerry James <loganjerry@gmail.com> - 2.28.2-1
|
||||
- Update to version 2.28.2
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.23.9-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jul 22 2020 Marian Koncek <mkoncek@redhat.com> - 3.4.5-1
|
||||
- Update to upstream version 3.4.5
|
||||
|
||||
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 2.23.9-7
|
||||
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.23.9-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1.2-2
|
||||
- Mass rebuild for javapackages-tools 201902
|
||||
|
||||
@ -87,9 +144,15 @@ javac src/main/java/org/mockito/internal/creation/bytebuddy/inject/MockMethodDis
|
||||
* Thu Sep 19 2019 Marian Koncek <mkoncek@redhat.com> - 3.0.8-1
|
||||
- Update to upstream version 3.0.8
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.23.9-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.23.9-4
|
||||
- Mass rebuild for javapackages-tools 201901
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.23.9-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Wed Dec 12 2018 Mat Booth <mat.booth@redhat.com> - 2.23.9-3
|
||||
- Set the source encoding for the build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user