msimacek pushed to powermock (master). "Update to upstream version 1.6.2"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed May 20 14:21:49 UTC 2015
From 089139c250aed0b17cde966aa5f0ad029ffddf7f Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek at redhat.com>
Date: Wed, 20 May 2015 16:07:04 +0200
Subject: Update to upstream version 1.6.2
diff --git a/.gitignore b/.gitignore
index a5a5101..77c6c27 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/powermock-1.4.12.tar.xz
+/powermock-1.6.2.tar.gz
diff --git a/make-powermock-sourcetarball.sh b/make-powermock-sourcetarball.sh
deleted file mode 100644
index 7ed8641..0000000
--- a/make-powermock-sourcetarball.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-VERSION=1.4.12
-SRCDIR=powermock-${VERSION}
-
-svn export http://powermock.googlecode.com/svn/tags/powermock-${VERSION} ${SRCDIR}
-rm -rf ${SRCDIR}/modules/module-impl/agent
-rm -rf ${SRCDIR}/modules/module-impl/junit4-rule-agent/src/main/java/org/junit
-tar -cvJf powermock-${VERSION}.tar.xz ${SRCDIR}
-
diff --git a/powermock-disable-broken-tests.patch b/powermock-disable-broken-tests.patch
deleted file mode 100644
index 8c55f34..0000000
--- a/powermock-disable-broken-tests.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Index: classloading/classloading-objenesis/src/test/java/powermock/classloading/ObjenesisDeepClonerTest.java
-===================================================================
---- classloading/classloading-objenesis/src/test/java/powermock/classloading/ObjenesisDeepClonerTest.java (Revision 1774)
-+++ classloading/classloading-objenesis/src/test/java/powermock/classloading/ObjenesisDeepClonerTest.java (Arbeitskopie)
-@@ -28,7 +28,7 @@
-
- public class ObjenesisDeepClonerTest {
-
-- @Test
-+ //@Test
- public void clonesJavaInstances() throws Exception {
- final URL original = new URL("http://www.powermock.org");
- URL clone = new DeepCloner().clone(original);
-@@ -36,7 +36,7 @@
- assertNotSame(clone, original);
- }
-
-- @Test
-+ //@Test
- public void clonesUnmodifiableLists() throws Exception {
- final UnmodifiableListExample original = new UnmodifiableListExample();
- UnmodifiableListExample clone = new DeepCloner().clone(original);
-@@ -44,7 +44,7 @@
- assertNotSame(clone, original);
- }
-
-- @Test
-+ //@Test
- public void clonesArraysWithNullValues() throws Exception {
- Object[] original = new Object[] { "Test", null };
- Object[] clone = new DeepCloner().clone(original);
-@@ -110,4 +110,4 @@
- return false;
- return true;
- }
--}
-\ No newline at end of file
-+}
-Index: modules/module-test/easymock/junit4-test/src/test/java/samples/junit4/staticinitializer/StaticInitializerExampleTest.java
-===================================================================
---- modules/module-test/easymock/junit4-test/src/test/java/samples/junit4/staticinitializer/StaticInitializerExampleTest.java (Revision 1774)
-+++ modules/module-test/easymock/junit4-test/src/test/java/samples/junit4/staticinitializer/StaticInitializerExampleTest.java (Arbeitskopie)
-@@ -31,7 +31,7 @@
- @SuppressStaticInitializationFor("samples.staticinitializer.StaticInitializerExample")
- public class StaticInitializerExampleTest {
-
-- @Test
-+ //@Test
- public void testSupressStaticInitializer() throws Exception {
- assertNull("Should be null because the static initializer should be suppressed", StaticInitializerExample.getMySet());
- }
-Index: modules/module-test/easymock/junit4-test/src/test/java/samples/junit4/equalswithgetclass/EqualsWithGetClassTest.java
-===================================================================
---- modules/module-test/easymock/junit4-test/src/test/java/samples/junit4/equalswithgetclass/EqualsWithGetClassTest.java (Revision 1774)
-+++ modules/module-test/easymock/junit4-test/src/test/java/samples/junit4/equalswithgetclass/EqualsWithGetClassTest.java (Arbeitskopie)
-@@ -43,7 +43,7 @@
- assertTrue(mock1.getClass().getName().startsWith(EqualsWithGetClass.class.getName()));
- }
-
-- @Test(expected = AssertionError.class)
-+ //@Test(expected = AssertionError.class)
- public void callingGetClassOnAMockFailsWhenTheCallWasUnexpectedAndMockStandardMethodsIsSet() throws Exception {
- MockGateway.MOCK_GET_CLASS_METHOD = true;
- try {
-Index: modules/module-test/mockito/junit4-rule-objenesis/src/test/java/org/powermock/modules/test/junit4/rule/objenesis/StaticInitializerExampleTest.java
-===================================================================
---- modules/module-test/mockito/junit4-rule-objenesis/src/test/java/org/powermock/modules/test/junit4/rule/objenesis/StaticInitializerExampleTest.java (Revision 1774)
-+++ modules/module-test/mockito/junit4-rule-objenesis/src/test/java/org/powermock/modules/test/junit4/rule/objenesis/StaticInitializerExampleTest.java (Arbeitskopie)
-@@ -18,7 +18,7 @@
- @Rule
- public PowerMockRule rule = new PowerMockRule();
-
-- @Test
-+ //@Test
- public void testSupressStaticInitializer() throws Exception {
- assertNull("Should be null because the static initializer should be suppressed", StaticInitializerExample.getMySet());
- }
-@@ -30,4 +30,4 @@
- Whitebox.setInternalState(StaticInitializerExample.class, "mySet", hashSet);
- assertSame(hashSet, Whitebox.getInternalState(StaticInitializerExample.class, "mySet"));
- }
--}
-\ No newline at end of file
-+}
-Index: modules/module-test/mockito/junit4-rule-xstream/src/test/java/org/powermock/modules/test/junit4/rule/xstream/StaticInitializerExampleTest.java
-===================================================================
---- modules/module-test/mockito/junit4-rule-xstream/src/test/java/org/powermock/modules/test/junit4/rule/xstream/StaticInitializerExampleTest.java (Revision 1774)
-+++ modules/module-test/mockito/junit4-rule-xstream/src/test/java/org/powermock/modules/test/junit4/rule/xstream/StaticInitializerExampleTest.java (Arbeitskopie)
-@@ -18,7 +18,7 @@
- @Rule
- public PowerMockRule rule = new PowerMockRule();
-
-- @Test
-+ //@Test
- public void testSupressStaticInitializer() throws Exception {
- assertNull("Should be null because the static initializer should be suppressed", StaticInitializerExample.getMySet());
- }
-@@ -30,4 +30,4 @@
- Whitebox.setInternalState(StaticInitializerExample.class, "mySet", hashSet);
- assertSame(hashSet, Whitebox.getInternalState(StaticInitializerExample.class, "mySet"));
- }
--}
-\ No newline at end of file
-+}
-Index: reflect/src/test/java/org/powermock/reflect/WhiteBoxTest.java
-===================================================================
---- reflect/src/test/java/org/powermock/reflect/WhiteBoxTest.java (Revision 1774)
-+++ reflect/src/test/java/org/powermock/reflect/WhiteBoxTest.java (Arbeitskopie)
-@@ -618,7 +618,7 @@
- assertEquals((Long) myContext.getMyLongState(), (Long) tested.getSomeStaticLongState());
- }
-
-- @Test
-+ //@Test
- public void testSetInternalStateFromContext_contextHasOneInstanceAndOneStaticFieldOfSameType_onlyInstanceContext()
- throws Exception {
- ClassWithStaticAndInstanceInternalStateOfSameType tested = new ClassWithStaticAndInstanceInternalStateOfSameType();
diff --git a/powermock.spec b/powermock.spec
index 2de4624..46fc7ef 100644
--- a/powermock.spec
+++ b/powermock.spec
@@ -1,14 +1,12 @@
Name: powermock
-Version: 1.4.12
-Release: 12%{?dist}
+Version: 1.6.2
+Release: 1%{?dist}
Summary: A Java mocking framework
License: ASL 2.0
-URL: http://code.google.com/p/powermock/
-Source0: powermock-%{version}.tar.xz
-Source1: make-powermock-sourcetarball.sh
-# Disable broken tests.
-Patch0: powermock-disable-broken-tests.patch
+URL: https://github.com/jayway/powermock
+Source0: https://github.com/jayway/%{name}/archive/%{name}-%{version}.tar.gz
+
# Fix cglib dependency of mockito
Patch2: powermock-fix-cglib-mockito.patch
# Fix compatibility with JUnit3
@@ -17,14 +15,18 @@ Patch3: powermock-fix-junit3-compat.patch
BuildArch: noarch
BuildRequires: maven-local
-BuildRequires: maven-enforcer-plugin
-BuildRequires: maven-surefire-plugin
-BuildRequires: maven-install-plugin
-BuildRequires: objenesis
-BuildRequires: junit
-BuildRequires: mockito
-BuildRequires: easymock3
-BuildRequires: javassist
+BuildRequires: mvn(cglib:cglib-nodep)
+BuildRequires: mvn(commons-logging:commons-logging)
+BuildRequires: mvn(javax.servlet:servlet-api)
+BuildRequires: mvn(junit:junit)
+BuildRequires: mvn(net.sf.cglib:cglib)
+BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
+BuildRequires: mvn(org.easymock:easymock)
+BuildRequires: mvn(org.javassist:javassist)
+BuildRequires: mvn(org.mockito:mockito-all)
+BuildRequires: mvn(org.mockito:mockito-core)
+BuildRequires: mvn(org.objenesis:objenesis)
+BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
%global desc \
PowerMock is a framework that extend other mock libraries\
@@ -108,11 +110,19 @@ Summary: JavaDocs for %{name}
This package contains the API documentation for %{name}.
%prep
-%setup -q
-%patch0
+%setup -q -n %{name}-%{name}-%{version}
+
%patch2
%patch3
+# bundled sources of various libraries
+rm -r modules/module-impl/agent
+
+find -name '*.java' | xargs sed -i 's/org\.mockito\.cglib/net.sf.cglib/g'
+
+# Assumes different JUnit version
+rm modules/module-impl/junit4-common/src/test/java/org/powermock/modules/junit4/common/internal/impl/JUnitVersionTest.java
+
# Disable modules that we cannot build (yet).
%pom_disable_module module-test modules
%pom_disable_module junit4-legacy modules/module-impl
@@ -143,7 +153,7 @@ This package contains the API documentation for %{name}.
%mvn_package org.powermock.tests: __noinstall
-# poms are not neede by anything
+# poms are not needed by anything
%mvn_package ::pom: __noinstall
%build
@@ -154,7 +164,7 @@ This package contains the API documentation for %{name}.
%files common
%dir %{_javadir}/%{name}
-%doc LICENSE.txt
+%license LICENSE.txt
%files reflect -f .mfiles-reflect
%files core -f .mfiles-core
%files junit4 -f .mfiles-junit4
@@ -163,9 +173,15 @@ This package contains the API documentation for %{name}.
%files api-easymock -f .mfiles-api-easymock
%files javadoc -f .mfiles-javadoc
-%doc LICENSE.txt
+%license LICENSE.txt
%changelog
+* Wed May 20 2015 Michael Simacek <msimacek at redhat.com> - 1.6.2-1
+- Update to upstream version 1.6.2
+- Update upstream URL
+- Use upstream tarball since the bundled files are opensource and thus can be
+ removed in %prep
+
* Tue Jun 10 2014 Severin Gehwolf <sgehwolf at redhat.com> - 1.4.12-12
- Fix FTBFS by dropping obsolete junit4 surefire provider and
changing BR to junit over junit4.
diff --git a/sources b/sources
index 111f8ce..cddc78c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1e2502be8568befc5f9e09b8d9934d60 powermock-1.4.12.tar.xz
+77edd12c2aa280f7cb30c47eddc8d474 powermock-1.6.2.tar.gz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/powermock.git/commit/?h=master&id=089139c250aed0b17cde966aa5f0ad029ffddf7f
More information about the scm-commits
mailing list