[httpunit] Fix build against junit 4.x.
Alexander Kurtakov
akurtakov at fedoraproject.org
Wed Apr 18 11:05:28 UTC 2012
commit 70f3c5dbb12ce9c69fcc85e06a26e4d9305729c0
Author: Alexander Kurtakov <akurtako at redhat.com>
Date: Wed Apr 18 14:05:16 2012 +0300
Fix build against junit 4.x.
httpunit.spec | 8 +++++++-
junit4.patch | 26 ++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/httpunit.spec b/httpunit.spec
index 69e340b..e93a720 100644
--- a/httpunit.spec
+++ b/httpunit.spec
@@ -30,7 +30,7 @@
Name: httpunit
Version: 1.7
-Release: 6%{?dist}
+Release: 7%{?dist}
Epoch: 0
Summary: Automated web site testing toolkit
License: MIT
@@ -38,6 +38,7 @@ Source0: http://download.sourceforge.net/httpunit/httpunit-%{version}.zip
Patch1: %{name}-JavaScript-NotAFunctionException.patch
Patch2: %{name}-servlettest.patch
Patch3: %{name}-not-implemented.patch
+Patch4: junit4.patch
URL: http://httpunit.sourceforge.net/
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: ant >= 0:1.6
@@ -93,6 +94,8 @@ Documentation for %{name}
#%%{__unzip} -qd META-INF lib/httpunit.jar "*.dtd" # 1.6 dist zip is borked
# remove all binary libs and javadocs
+%patch4
+
sed -i -e 's|destdir|encoding="iso-8859-1" destdir|g' build.xml
sed -i -e 's|setCharEncoding( org.w3c.tidy.Configuration.UTF8 )|setInputEncoding("UTF-8")|g' src/com/meterware/httpunit/parsing/JTidyHTMLParser.java
@@ -140,6 +143,9 @@ popd
%doc doc/*
%changelog
+* Wed Apr 18 2012 Alexander Kurtakov <akurtako at redhat.com> 0:1.7-7
+- Fix build against junit 4.x.
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0:1.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/junit4.patch b/junit4.patch
new file mode 100644
index 0000000..ddd1218
--- /dev/null
+++ b/junit4.patch
@@ -0,0 +1,26 @@
+--- src/com/meterware/servletunit/JUnitServlet.java.sav 2008-05-20 16:25:36.000000000 +0300
++++ src/com/meterware/servletunit/JUnitServlet.java 2012-04-18 14:00:39.653850687 +0300
+@@ -29,8 +29,6 @@ import javax.servlet.http.HttpServletRes
+ import javax.servlet.ServletException;
+
+ import junit.runner.BaseTestRunner;
+-import junit.runner.TestSuiteLoader;
+-import junit.runner.StandardTestSuiteLoader;
+ import junit.framework.Test;
+ import junit.framework.AssertionFailedError;
+ import junit.framework.TestResult;
+@@ -148,12 +146,8 @@ public class JUnitServlet extends HttpSe
+ }
+
+
+- /**
+- * Always use the StandardTestSuiteLoader. Overridden from
+- * BaseTestRunner.
+- */
+- public TestSuiteLoader getLoader() {
+- return new StandardTestSuiteLoader();
++ protected boolean useReloadingTestSuiteLoader() {
++ return false;
+ }
+
+ }
More information about the scm-commits
mailing list