Move the test to the %check stage

This commit is contained in:
maminjie 2021-04-27 16:34:37 +08:00
parent 57e26f03e7
commit eec5b99004

View File

@ -5,7 +5,7 @@
%bcond_with jaxws %bcond_with jaxws
Name: grizzly Name: grizzly
Version: 2.3.24 Version: 2.3.24
Release: 1 Release: 2
Summary: Java NIO Server Framework Summary: Java NIO Server Framework
License: (CDDL or GPLv2 with exceptions) and BSD and ASL 2.0 and Public Domain License: (CDDL or GPLv2 with exceptions) and BSD and ASL 2.0 and Public Domain
URL: http://grizzly.java.net/ URL: http://grizzly.java.net/
@ -113,13 +113,16 @@ for m in http2 spdy ; do
</archive>' modules/${m} </archive>' modules/${m}
done done
%mvn_package org.glassfish.grizzly.samples: samples %mvn_package org.glassfish.grizzly.samples: samples
# remove <scope>test</scope>
%pom_xpath_remove "pom:dependency[pom:artifactId='junit']/pom:scope"
%pom_xpath_remove "pom:dependency[pom:artifactId='mockito-all']/pom:scope" modules/http-server
%build %build
%mvn_build \ %mvn_build \
%ifarch %{arm} %ifarch %{arm}
-f -- \ -f -- \
%else %else
-- -Dmaven.test.failure.ignore=true \ --skipTests -- \
%endif %endif
-Dmaven.local.depmap.file="%{_mavendepmapfragdir}/glassfish-servlet-api.xml" -Dmaven.local.depmap.file="%{_mavendepmapfragdir}/glassfish-servlet-api.xml"
@ -130,6 +133,11 @@ done
ln -sf %{name}-framework.jar %{name}.jar ln -sf %{name}-framework.jar %{name}.jar
) )
%check
%ifnarch %{arm}
xmvn test --batch-mode --offline verify -Dmaven.test.failure.ignore=true
%endif
%files -f .mfiles %files -f .mfiles
%{_javadir}/%{name}/%{name}.jar %{_javadir}/%{name}/%{name}.jar
%license LICENSE.txt Grizzly_THIRDPARTYLICENSEREADME.txt %license LICENSE.txt Grizzly_THIRDPARTYLICENSEREADME.txt
@ -141,5 +149,8 @@ done
%license LICENSE.txt Grizzly_THIRDPARTYLICENSEREADME.txt %license LICENSE.txt Grizzly_THIRDPARTYLICENSEREADME.txt
%changelog %changelog
* Tue Apr 27 2021 maminjie <maminjie1@huawei.com> - 2.3.24-2
- Move the test to the %check stage
* Fri Aug 28 2020 Anan Fu <fuanan3@huawei.com> - 2.3.24-1 * Fri Aug 28 2020 Anan Fu <fuanan3@huawei.com> - 2.3.24-1
- package init - package init