Update to upstream version 3.0.8
This commit is contained in:
parent
9ee22cdca2
commit
0f23c18c26
@ -1,29 +0,0 @@
|
||||
--- conf/mockito-core.bnd.orig 2014-12-31 16:43:56.000000000 +0000
|
||||
+++ conf/mockito-core.bnd 2015-09-01 19:36:18.534549995 +0100
|
||||
@@ -1,21 +1,19 @@
|
||||
--versionpolicy=[${version;==;${@}},${version;+;${@}})
|
||||
-
|
||||
-Bundle-Name= Mockito Mock Library for Java. Core bundle requires Hamcrest-core and Objenesis.
|
||||
+Bundle-Name= Mockito Mock Library for Java.
|
||||
Bundle-SymbolicName= org.mockito.mockito-core
|
||||
Bundle-Version= ${version}
|
||||
|
||||
Export-Package= !org.mockito.asm.*, \
|
||||
!org.mockito.cglib.*, \
|
||||
!org.mockito.internal.*, \
|
||||
- org.mockito.*;version=${version}
|
||||
+ org.mockito.*
|
||||
|
||||
Import-Package= junit.*;resolution:=optional, \
|
||||
org.junit.*;resolution:=optional, \
|
||||
org.apache.tools.ant.*;resolution:=optional, \
|
||||
- org.hamcrest;version="[1.0,3.0)", \
|
||||
- org.objenesis;version="[2.1,3.0)", \
|
||||
+ org.objenesis;version="[1.0,3.0)", \
|
||||
org.mockito.asm.signature;resolution:=optional, \
|
||||
- org.mockito.*
|
||||
+ org.mockito.*, \
|
||||
+ net.sf.cglib.core,net.sf.cglib.proxy,net.sf.cglib.reflect
|
||||
|
||||
Private-Package: org.mockito.*
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
VERSION=2.23.9
|
||||
VERSION="$(sed -n 's/Version:\s*//p' *.spec)"
|
||||
SRCDIR=mockito-${VERSION}
|
||||
|
||||
git clone https://github.com/mockito/mockito.git ${SRCDIR}
|
||||
@ -13,7 +13,8 @@ rm -rf ${SRCDIR}
|
||||
tar -xf ${SRCDIR}.tar
|
||||
rm ${SRCDIR}.tar
|
||||
pushd ${SRCDIR}
|
||||
rm -rf `find -name *.jar` gradlew gradlew.bat src/javadoc
|
||||
find -name '*.jar' -delete
|
||||
rm -rf gradlew gradlew.bat src/javadoc
|
||||
popd
|
||||
|
||||
tar -cvJf mockito-${VERSION}.tar.xz ${SRCDIR}
|
||||
|
@ -35,6 +35,12 @@
|
||||
<version>2.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.opentest4j</groupId>
|
||||
<artifactId>opentest4j</artifactId>
|
||||
<version>1.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-core</artifactId>
|
||||
@ -56,6 +62,15 @@
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
@ -90,8 +105,8 @@
|
||||
<configuration>
|
||||
<executable>cp</executable>
|
||||
<arguments>
|
||||
<argument>${project.build.outputDirectory}/org/mockito/internal/creation/bytebuddy/MockMethodDispatcher.class</argument>
|
||||
<argument>${project.build.outputDirectory}/org/mockito/internal/creation/bytebuddy/MockMethodDispatcher.raw</argument>
|
||||
<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>
|
||||
|
21
mockito.spec
21
mockito.spec
@ -1,6 +1,6 @@
|
||||
Name: mockito
|
||||
Version: 2.23.9
|
||||
Release: 4%{?dist}
|
||||
Version: 3.0.8
|
||||
Release: 1%{?dist}
|
||||
Summary: Tasty mocking framework for unit tests in Java
|
||||
License: MIT
|
||||
URL: https://site.mockito.org/
|
||||
@ -8,7 +8,7 @@ BuildArch: noarch
|
||||
|
||||
# Source tarball and the script to generate it
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: make-%{name}-sourcetarball.sh
|
||||
Source1: make-mockito-sourcetarball.sh
|
||||
|
||||
# A custom build script to allow building with maven instead of gradle
|
||||
Source2: mockito-core.pom
|
||||
@ -26,6 +26,7 @@ BuildRequires: mvn(org.assertj:assertj-core)
|
||||
BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin)
|
||||
BuildRequires: mvn(org.hamcrest:hamcrest-core)
|
||||
BuildRequires: mvn(org.objenesis:objenesis)
|
||||
BuildRequires: mvn(org.opentest4j:opentest4j)
|
||||
BuildRequires: mvn(org.ow2.asm:asm)
|
||||
|
||||
%description
|
||||
@ -42,7 +43,7 @@ This package contains the API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch0 -p1
|
||||
|
||||
# Use our custom build script
|
||||
sed -e 's/@VERSION@/%{version}/' %{SOURCE2} > pom.xml
|
||||
@ -60,11 +61,10 @@ EOF
|
||||
# Compatibility alias
|
||||
%mvn_alias org.%{name}:%{name}-core org.%{name}:%{name}-all
|
||||
|
||||
# Test fails with java.lang.VerifyError
|
||||
# Most likely a bug in byte-buddy
|
||||
sed -i '/test_parameters_retention/i@org.junit.Ignore' $(find -name InlineByteBuddyMockMakerTest.java)
|
||||
|
||||
%build
|
||||
# See the usage of exec-maven-plugin in the pom
|
||||
javac src/main/java/org/mockito/internal/creation/bytebuddy/inject/MockMethodDispatcher.java
|
||||
|
||||
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
|
||||
|
||||
%install
|
||||
@ -72,12 +72,15 @@ sed -i '/test_parameters_retention/i@org.junit.Ignore' $(find -name InlineByteBu
|
||||
|
||||
%files -f .mfiles
|
||||
%license LICENSE
|
||||
%doc doc/design-docs/custom-argument-matching.md
|
||||
%doc README.md doc/design-docs/custom-argument-matching.md
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Thu Sep 19 2019 Marian Koncek <mkoncek@redhat.com> - 3.0.8-1
|
||||
- Update to upstream version 3.0.8
|
||||
|
||||
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.23.9-4
|
||||
- Mass rebuild for javapackages-tools 201901
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (mockito-2.23.9.tar.xz) = 2c6a8315cf043ec1c3fd38e4fa0609753dc7d898509eda88d2a20b2682ce4684c5ad7eab3c39effa7dfb3358a54b90ade5bc2a7547ea5c418449384a8eebe0f7
|
||||
SHA512 (mockito-3.0.8.tar.xz) = 657077cc645350a783dac3ae23680f07108e1dace83b92f9c8ba431075dd69476ae7a17e69eae81a4805d983fd75953da9221bab25c80d8e1b8eba5080195168
|
||||
|
@ -1,39 +1,23 @@
|
||||
--- src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java.orig 2018-12-04 23:47:19.396895633 +0000
|
||||
+++ src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java 2018-12-04 23:48:19.129703720 +0000
|
||||
@@ -18,9 +18,9 @@
|
||||
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
|
||||
--- 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;
|
||||
import net.bytebuddy.dynamic.scaffold.MethodGraph;
|
||||
import net.bytebuddy.dynamic.scaffold.TypeValidation;
|
||||
import net.bytebuddy.implementation.Implementation;
|
||||
-import net.bytebuddy.jar.asm.ClassVisitor;
|
||||
-import net.bytebuddy.jar.asm.MethodVisitor;
|
||||
-import net.bytebuddy.jar.asm.Opcodes;
|
||||
+import org.objectweb.asm.ClassVisitor;
|
||||
+import org.objectweb.asm.MethodVisitor;
|
||||
+import org.objectweb.asm.Opcodes;
|
||||
import net.bytebuddy.matcher.ElementMatchers;
|
||||
import net.bytebuddy.pool.TypePool;
|
||||
import net.bytebuddy.utility.OpenedClassReader;
|
||||
--- ./src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java.orig 2018-12-04 23:49:03.170562228 +0000
|
||||
+++ ./src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java 2018-12-04 23:49:46.061424433 +0000
|
||||
@@ -12,6 +12,7 @@
|
||||
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 @@
|
||||
Matcher.class,
|
||||
ByteBuddy.class,
|
||||
ByteBuddyAgent.class,
|
||||
+ ClassVisitor.class,
|
||||
Objenesis.class
|
||||
)
|
||||
.withCodeSourceUrlOf(coverageTool())
|
||||
--- src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java.orig 2018-12-05 00:18:50.707528013 +0000
|
||||
+++ src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java 2018-12-05 00:19:49.520329138 +0000
|
||||
@@ -19,6 +19,7 @@
|
||||
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
|
||||
--- 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;
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.mockitoutil.ClassLoaders;
|
||||
import org.mockitoutil.SimpleSerializationUtil;
|
||||
@ -41,7 +25,7 @@
|
||||
import org.objenesis.ObjenesisStd;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -138,7 +139,7 @@
|
||||
@@ -138,7 +139,7 @@ public abstract class AbstractByteBuddyMockMakerTest<MM extends MockMaker> {
|
||||
public void instantiate_fine_when_objenesis_on_the_classpath() throws Exception {
|
||||
// given
|
||||
ClassLoader classpath_with_objenesis = ClassLoaders.excludingClassLoader()
|
||||
@ -50,8 +34,10 @@
|
||||
.withCodeSourceUrlOf(coverageTool())
|
||||
.build();
|
||||
|
||||
--- src/test/java/org/mockito/internal/junit/JUnitRuleTest.java.orig 2018-12-05 00:26:24.279002285 +0000
|
||||
+++ src/test/java/org/mockito/internal/junit/JUnitRuleTest.java 2018-12-05 00:27:47.327723119 +0000
|
||||
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
|
||||
--- 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;
|
||||
@ -60,7 +46,7 @@
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mock;
|
||||
@@ -41,6 +42,7 @@
|
||||
@@ -41,6 +42,7 @@ public class JUnitRuleTest {
|
||||
|
||||
@SuppressWarnings({"CheckReturnValue", "MockitoUsage"})
|
||||
@Test
|
||||
@ -68,3 +54,23 @@
|
||||
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
|
||||
diff --git a/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java b/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java
|
||||
index 85e0113..64f2083 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;
|
||||
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())
|
||||
|
Loading…
Reference in New Issue
Block a user