Compare commits

..

No commits in common. "rawhide" and "f42" have entirely different histories.

2 changed files with 29 additions and 9 deletions

View file

@ -25,7 +25,7 @@ Patch: use-unbundled-asm.patch
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: maven-local-openjdk25
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(net.bytebuddy:byte-buddy)
BuildRequires: mvn(net.bytebuddy:byte-buddy-agent)
@ -35,8 +35,6 @@ BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api)
BuildRequires: mvn(org.objenesis:objenesis)
BuildRequires: mvn(org.opentest4j:opentest4j)
%endif
# TODO Remove in Fedora 46
Obsoletes: %{name}-javadoc < 5.8.0-16
%description
Mockito is a mocking framework that tastes really good. It lets you write
@ -44,6 +42,12 @@ beautiful tests with clean & simple API. Mockito doesn't give you hangover
because the tests are very readable and they produce clean verification
errors.
%package javadoc
Summary: API documentation for %{name}
%description javadoc
API documentation for %{name}.
%package junit-jupiter
Summary: Mockito JUnit 5 support
Requires: %{name} = %{version}-%{release}
@ -62,6 +66,11 @@ cp %{SOURCE4} subprojects/junit-jupiter/pom.xml
# 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
# Workaround easymock incompatibility with Java 17 that should be fixed
# in easymock 4.4: https://github.com/easymock/easymock/issues/274
%pom_add_plugin :maven-surefire-plugin . "<configuration>
<argLine>--add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED</argLine></configuration>"
# Compatibility alias
%mvn_alias org.%{name}:%{name}-core org.%{name}:%{name}-all
@ -79,7 +88,11 @@ echo 'member-accessor-module' > src/main/resources/mockito-extensions/org.mockit
echo 'mock-maker-subclass' > src/main/resources/mockito-extensions/org.mockito.plugins.MockMaker
# see gradle/mockito-core/inline-mock.gradle
%pom_add_plugin org.apache.maven.plugins:maven-antrun-plugin '
%pom_xpath_inject 'pom:project/pom:build/pom:plugins' '
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>any</version>
<executions>
<execution>
<phase>process-classes</phase>
@ -94,19 +107,23 @@ echo 'mock-maker-subclass' > src/main/resources/mockito-extensions/org.mockito.p
</goals>
</execution>
</executions>
'
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin '
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>any</version>
<configuration>
<excludes>
<exclude>org/mockito/internal/creation/bytebuddy/inject/*.class</exclude>
</excludes>
</configuration>
</plugin>
'
%mvn_package :aggregator __noinstall
%build
%mvn_build -j -f -- -Dmaven.compiler.release=11 -Dproject.build.sourceEncoding=UTF-8 -f aggregator.pom
%mvn_build -f -- -Dmaven.compiler.release=11 -Dproject.build.sourceEncoding=UTF-8 -f aggregator.pom
%mvn_package org.mockito:mockito-junit-jupiter junit-jupiter
@ -117,6 +134,9 @@ echo 'mock-maker-subclass' > src/main/resources/mockito-extensions/org.mockito.p
%license LICENSE
%doc README.md doc/design-docs/custom-argument-matching.md
%files javadoc -f .mfiles-javadoc
%license LICENSE
%files junit-jupiter -f .mfiles-junit-jupiter
%changelog

View file

@ -1,7 +1,7 @@
summary: Run javapackages-specific tests
discover:
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/javapackages.git
ref: f43
url: https://src.fedoraproject.org/tests/javapackages
ref: f42
execute:
how: tmt