git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271045 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| import java.util.NoSuchElementException; | import java.util.NoSuchElementException; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| @@ -1,7 +1,7 @@ | |||||
| /* | /* | ||||
| * The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
| * | * | ||||
| * Copyright (c) 2001 The Apache Software Foundation. All rights | |||||
| * Copyright (c) 2002 The Apache Software Foundation. All rights | |||||
| * reserved. | * reserved. | ||||
| * | * | ||||
| * Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| @@ -88,7 +88,7 @@ public class ClasspathTestCollector extends ProjectComponent | |||||
| // override last one in case there are duplicates. | // override last one in case there are duplicates. | ||||
| // ie mimic classpath behavior. | // ie mimic classpath behavior. | ||||
| String[] paths = path.list(); | String[] paths = path.list(); | ||||
| for (int i = paths.length; i >= 0; i--) { | |||||
| for (int i = paths.length - 1; i >= 0; i--) { | |||||
| File f = new File(paths[i]); | File f = new File(paths[i]); | ||||
| Vector included = null; | Vector included = null; | ||||
| if (f.isDirectory()) { | if (f.isDirectory()) { | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.io.BufferedOutputStream; | import java.io.BufferedOutputStream; | ||||
| import java.io.File; | import java.io.File; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| import java.util.NoSuchElementException; | import java.util.NoSuchElementException; | ||||
| @@ -87,7 +87,7 @@ import java.util.NoSuchElementException; | |||||
| * </pre> | * </pre> | ||||
| * @author <a href="mailto:sbailliez@imediation.com">Stephane Bailliez</a> | * @author <a href="mailto:sbailliez@imediation.com">Stephane Bailliez</a> | ||||
| */ | */ | ||||
| class CompoundEnumeration implements Enumeration { | |||||
| public class CompoundEnumeration implements Enumeration { | |||||
| /** enumeration array */ | /** enumeration array */ | ||||
| private Enumeration[] enumArray; | private Enumeration[] enumArray; | ||||
| @@ -51,18 +51,18 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.lang.reflect.Constructor; | import java.lang.reflect.Constructor; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.formatter.FilterFormatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.junit.formatter.FilterStackFormatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.junit.formatter.Formatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.formatter.FilterFormatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.formatter.FilterStackFormatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.formatter.Formatter; | |||||
| import org.apache.tools.ant.types.EnumeratedAttribute; | import org.apache.tools.ant.types.EnumeratedAttribute; | ||||
| /** | /** | ||||
| * A filter element that can be use inside a FormatterElement to denote | |||||
| * A filter element that can be used inside a ResultFormatterElement to denote | |||||
| * a filtering. Note that the filtering order correspond to the element | * a filtering. Note that the filtering order correspond to the element | ||||
| * order. The first element being the top filter, the last element | * order. The first element being the top filter, the last element | ||||
| * being the bottom filter. | * being the bottom filter. | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.lang.reflect.Method; | import java.lang.reflect.Method; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.io.FilterOutputStream; | import java.io.FilterOutputStream; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.FileOutputStream; | import java.io.FileOutputStream; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | import org.apache.avalon.excalibur.i18n.Resources; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.io.OutputStream; | import java.io.OutputStream; | ||||
| import java.io.File; | import java.io.File; | ||||
| @@ -60,10 +60,10 @@ import java.util.StringTokenizer; | |||||
| import java.util.Vector; | import java.util.Vector; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.formatter.BriefFormatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.junit.formatter.Formatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.junit.formatter.XMLFormatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.junit.formatter.PlainFormatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.formatter.BriefFormatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.formatter.Formatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.formatter.XMLFormatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.formatter.PlainFormatter; | |||||
| import org.apache.tools.ant.types.EnumeratedAttribute; | import org.apache.tools.ant.types.EnumeratedAttribute; | ||||
| /** | /** | ||||
| @@ -82,7 +82,7 @@ import org.apache.tools.ant.types.EnumeratedAttribute; | |||||
| * @see RJUnitTask | * @see RJUnitTask | ||||
| * @see Formatter | * @see Formatter | ||||
| */ | */ | ||||
| public class FormatterElement { | |||||
| public class ResultFormatterElement { | |||||
| /** output stream for the formatter */ | /** output stream for the formatter */ | ||||
| private OutputStream out = new KeepAliveOutputStream(System.out); | private OutputStream out = new KeepAliveOutputStream(System.out); | ||||
| @@ -51,15 +51,15 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| import java.util.Vector; | import java.util.Vector; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.ProjectComponent; | import org.apache.tools.ant.ProjectComponent; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.formatter.Formatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.junit.remote.Server; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.formatter.Formatter; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.remote.Server; | |||||
| /** | /** | ||||
| * An element representing the server configuration. | * An element representing the server configuration. | ||||
| @@ -103,7 +103,7 @@ public final class ServerElement extends ProjectComponent { | |||||
| server = new Server(port); | server = new Server(port); | ||||
| Enumeration listeners = formatterElements.elements(); | Enumeration listeners = formatterElements.elements(); | ||||
| while (listeners.hasMoreElements()) { | while (listeners.hasMoreElements()) { | ||||
| FormatterElement fe = (FormatterElement)listeners.nextElement(); | |||||
| ResultFormatterElement fe = (ResultFormatterElement)listeners.nextElement(); | |||||
| Formatter formatter = fe.createFormatter(); | Formatter formatter = fe.createFormatter(); | ||||
| server.addListener( formatter ); | server.addListener( formatter ); | ||||
| } | } | ||||
| @@ -133,7 +133,7 @@ public final class ServerElement extends ProjectComponent { | |||||
| } | } | ||||
| /** add a new formatter element */ | /** add a new formatter element */ | ||||
| public void addFormatter(FormatterElement fe) { | |||||
| public void addFormatter(ResultFormatterElement fe) { | |||||
| formatterElements.addElement(fe); | formatterElements.addElement(fe); | ||||
| } | } | ||||
| } | } | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.util.Enumeration; | import java.util.Enumeration; | ||||
| @@ -52,7 +52,7 @@ | |||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| * | * | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import junit.extensions.TestDecorator; | import junit.extensions.TestDecorator; | ||||
| import junit.framework.AssertionFailedError; | import junit.framework.AssertionFailedError; | ||||
| @@ -1,7 +1,7 @@ | |||||
| /* | /* | ||||
| * The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
| * | * | ||||
| * Copyright (c) 2001 The Apache Software Foundation. All rights | |||||
| * Copyright (c) 2002 The Apache Software Foundation. All rights | |||||
| * reserved. | * reserved. | ||||
| * | * | ||||
| * Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| @@ -51,12 +51,12 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.formatter; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.formatter; | |||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunEvent; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunEvent; | |||||
| /** | /** | ||||
| * Provide a common set of attributes and methods to factorize | * Provide a common set of attributes and methods to factorize | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.formatter; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.formatter; | |||||
| import java.io.BufferedWriter; | import java.io.BufferedWriter; | ||||
| import java.io.FileOutputStream; | import java.io.FileOutputStream; | ||||
| @@ -62,7 +62,7 @@ import java.io.PrintWriter; | |||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.KeepAliveOutputStream; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.KeepAliveOutputStream; | |||||
| /** | /** | ||||
| * Base formatter providing default implementation to deal with | * Base formatter providing default implementation to deal with | ||||
| @@ -51,11 +51,11 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.formatter; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.formatter; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | import org.apache.avalon.excalibur.i18n.Resources; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunEvent; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunEvent; | |||||
| /** | /** | ||||
| * Display additional messages from a <tt>SummaryFormatter</tt> | * Display additional messages from a <tt>SummaryFormatter</tt> | ||||
| @@ -51,12 +51,12 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.formatter; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.formatter; | |||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunEvent; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunEvent; | |||||
| /** | /** | ||||
| * A base class that can be used to filter data. | * A base class that can be used to filter data. | ||||
| @@ -51,12 +51,12 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.formatter; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.formatter; | |||||
| import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
| import org.apache.tools.ant.util.StringUtils; | import org.apache.tools.ant.util.StringUtils; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunEvent; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunEvent; | |||||
| /** | /** | ||||
| * Filtered Formatter that strips out unwanted stack frames from the full | * Filtered Formatter that strips out unwanted stack frames from the full | ||||
| @@ -51,12 +51,12 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.formatter; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.formatter; | |||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener; | |||||
| /** | /** | ||||
| * The formatter interface. | * The formatter interface. | ||||
| @@ -51,11 +51,11 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.formatter; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.formatter; | |||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunEvent; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunEvent; | |||||
| /** | /** | ||||
| * Default formatter to text. | * Default formatter to text. | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.formatter; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.formatter; | |||||
| import org.apache.avalon.excalibur.i18n.ResourceManager; | import org.apache.avalon.excalibur.i18n.ResourceManager; | ||||
| import org.apache.avalon.excalibur.i18n.Resources; | import org.apache.avalon.excalibur.i18n.Resources; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.formatter; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.formatter; | |||||
| import java.util.Hashtable; | import java.util.Hashtable; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| @@ -64,7 +64,7 @@ import org.w3c.dom.Text; | |||||
| import org.apache.tools.ant.util.DOMElementWriter; | import org.apache.tools.ant.util.DOMElementWriter; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunEvent; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunEvent; | |||||
| /** | /** | ||||
| * XML Formatter. Due to the nature of the XML we are forced to store | * XML Formatter. Due to the nature of the XML we are forced to store | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.remote; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.remote; | |||||
| /** | /** | ||||
| * This class has been taken from jakarta-commons-sandbox in the | * This class has been taken from jakarta-commons-sandbox in the | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.remote; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.remote; | |||||
| import java.util.Vector; | import java.util.Vector; | ||||
| import java.io.InputStream; | import java.io.InputStream; | ||||
| @@ -76,7 +76,7 @@ public class EventDispatcher { | |||||
| listeners.addElement(listener); | listeners.addElement(listener); | ||||
| } | } | ||||
| public void removeListener(org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener listener) { | |||||
| public void removeListener(org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener listener) { | |||||
| listeners.removeElement(listener); | listeners.removeElement(listener); | ||||
| } | } | ||||
| @@ -123,7 +123,7 @@ public class EventDispatcher { | |||||
| protected void fireRunStarted(TestRunEvent evt) { | protected void fireRunStarted(TestRunEvent evt) { | ||||
| synchronized (listeners) { | synchronized (listeners) { | ||||
| for (int i = 0; i < listeners.size(); i++) { | for (int i = 0; i < listeners.size(); i++) { | ||||
| ((org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener) listeners.elementAt(i)).onRunStarted(evt); | |||||
| ((org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener) listeners.elementAt(i)).onRunStarted(evt); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -131,7 +131,7 @@ public class EventDispatcher { | |||||
| protected void fireRunEnded(TestRunEvent evt) { | protected void fireRunEnded(TestRunEvent evt) { | ||||
| synchronized (listeners) { | synchronized (listeners) { | ||||
| for (int i = 0; i < listeners.size(); i++) { | for (int i = 0; i < listeners.size(); i++) { | ||||
| ((org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener) listeners.elementAt(i)).onRunEnded(evt); | |||||
| ((org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener) listeners.elementAt(i)).onRunEnded(evt); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -139,7 +139,7 @@ public class EventDispatcher { | |||||
| protected void fireTestStarted(TestRunEvent evt) { | protected void fireTestStarted(TestRunEvent evt) { | ||||
| synchronized (listeners) { | synchronized (listeners) { | ||||
| for (int i = 0; i < listeners.size(); i++) { | for (int i = 0; i < listeners.size(); i++) { | ||||
| ((org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener) listeners.elementAt(i)).onTestStarted(evt); | |||||
| ((org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener) listeners.elementAt(i)).onTestStarted(evt); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -147,7 +147,7 @@ public class EventDispatcher { | |||||
| protected void fireTestEnded(TestRunEvent evt) { | protected void fireTestEnded(TestRunEvent evt) { | ||||
| synchronized (listeners) { | synchronized (listeners) { | ||||
| for (int i = 0; i < listeners.size(); i++) { | for (int i = 0; i < listeners.size(); i++) { | ||||
| ((org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener) listeners.elementAt(i)).onTestEnded(evt); | |||||
| ((org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener) listeners.elementAt(i)).onTestEnded(evt); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -155,7 +155,7 @@ public class EventDispatcher { | |||||
| protected void fireTestFailure(TestRunEvent evt) { | protected void fireTestFailure(TestRunEvent evt) { | ||||
| synchronized (listeners) { | synchronized (listeners) { | ||||
| for (int i = 0; i < listeners.size(); i++) { | for (int i = 0; i < listeners.size(); i++) { | ||||
| ((org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener) listeners.elementAt(i)).onTestFailure(evt); | |||||
| ((org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener) listeners.elementAt(i)).onTestFailure(evt); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -163,7 +163,7 @@ public class EventDispatcher { | |||||
| protected void fireTestError(TestRunEvent evt) { | protected void fireTestError(TestRunEvent evt) { | ||||
| synchronized (listeners) { | synchronized (listeners) { | ||||
| for (int i = 0; i < listeners.size(); i++) { | for (int i = 0; i < listeners.size(); i++) { | ||||
| ((org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener) listeners.elementAt(i)).onTestError(evt); | |||||
| ((org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener) listeners.elementAt(i)).onTestError(evt); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -171,7 +171,7 @@ public class EventDispatcher { | |||||
| protected void fireSuiteStarted(TestRunEvent evt) { | protected void fireSuiteStarted(TestRunEvent evt) { | ||||
| synchronized (listeners) { | synchronized (listeners) { | ||||
| for (int i = 0; i < listeners.size(); i++) { | for (int i = 0; i < listeners.size(); i++) { | ||||
| ((org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener) listeners.elementAt(i)).onSuiteStarted(evt); | |||||
| ((org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener) listeners.elementAt(i)).onSuiteStarted(evt); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -179,7 +179,7 @@ public class EventDispatcher { | |||||
| protected void fireSuiteEnded(TestRunEvent evt) { | protected void fireSuiteEnded(TestRunEvent evt) { | ||||
| synchronized (listeners) { | synchronized (listeners) { | ||||
| for (int i = 0; i < listeners.size(); i++) { | for (int i = 0; i < listeners.size(); i++) { | ||||
| ((org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener) listeners.elementAt(i)).onSuiteEnded(evt); | |||||
| ((org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener) listeners.elementAt(i)).onSuiteEnded(evt); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -187,7 +187,7 @@ public class EventDispatcher { | |||||
| protected void fireRunStopped(TestRunEvent evt) { | protected void fireRunStopped(TestRunEvent evt) { | ||||
| synchronized (listeners) { | synchronized (listeners) { | ||||
| for (int i = 0; i < listeners.size(); i++) { | for (int i = 0; i < listeners.size(); i++) { | ||||
| ((org.apache.tools.ant.taskdefs.optional.junit.remote.TestRunListener) listeners.elementAt(i)).onRunStopped(evt); | |||||
| ((org.apache.tools.ant.taskdefs.optional.rjunit.remote.TestRunListener) listeners.elementAt(i)).onRunStopped(evt); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.remote; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.remote; | |||||
| import java.io.OutputStream; | import java.io.OutputStream; | ||||
| import java.io.InputStream; | import java.io.InputStream; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.remote; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.remote; | |||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import java.net.ServerSocket; | import java.net.ServerSocket; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.remote; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.remote; | |||||
| import java.io.ByteArrayInputStream; | import java.io.ByteArrayInputStream; | ||||
| import java.io.ByteArrayOutputStream; | import java.io.ByteArrayOutputStream; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.remote; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.remote; | |||||
| import java.util.EventObject; | import java.util.EventObject; | ||||
| import java.util.Properties; | import java.util.Properties; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.remote; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.remote; | |||||
| import java.util.EventListener; | import java.util.EventListener; | ||||
| @@ -51,7 +51,7 @@ | |||||
| * information on the Apache Software Foundation, please see | * information on the Apache Software Foundation, please see | ||||
| * <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
| */ | */ | ||||
| package org.apache.tools.ant.taskdefs.optional.junit.remote; | |||||
| package org.apache.tools.ant.taskdefs.optional.rjunit.remote; | |||||
| import java.io.BufferedReader; | import java.io.BufferedReader; | ||||
| import java.io.FileInputStream; | import java.io.FileInputStream; | ||||
| @@ -70,8 +70,7 @@ import junit.framework.TestListener; | |||||
| import junit.framework.TestResult; | import junit.framework.TestResult; | ||||
| import junit.framework.TestSuite; | import junit.framework.TestSuite; | ||||
| import org.apache.tools.ant.taskdefs.optional.junit.JUnitHelper; | |||||
| import org.apache.tools.ant.taskdefs.optional.junit.TestRunListener; | |||||
| import org.apache.tools.ant.taskdefs.optional.rjunit.JUnitHelper; | |||||
| import org.apache.tools.ant.util.StringUtils; | import org.apache.tools.ant.util.StringUtils; | ||||
| /** | /** | ||||
| @@ -0,0 +1,51 @@ | |||||
| <project name="" basedir="." default="tests"> | |||||
| <target name="tests"> | |||||
| <rjunit port="1234"> | |||||
| <server> | |||||
| <formatter type="xml" filters="stacktrace"/> | |||||
| <formatter type="plain" filters="stacktrace"/> | |||||
| <formatter type="jms" filters="stacktrace"> | |||||
| <param name="queue" value="test_queue"/> | |||||
| </formatter> | |||||
| <formatter type="rmi" filters="stacktrace"> | |||||
| <param name="host" value="127.0.0.1"/> | |||||
| <param name="port" value="6789"/> | |||||
| </formatter> | |||||
| </server> | |||||
| <client host="127.0.0.1"> | |||||
| <classpath refid="test-classpath"/> | |||||
| <jvmarg value="-Xmx=512MB"/> | |||||
| <test name="org.apache.test.NullTest" if="condition1"> | |||||
| <batchtest path="${classpath}" unless="condition2"> | |||||
| <include name="**Test*"/> | |||||
| </batchtest> | |||||
| </client> | |||||
| <rjunit> | |||||
| </target> | |||||
| <target name="server-only"> | |||||
| <!-- will block until a client connect and finishes --> | |||||
| <rjunit port="1234"> | |||||
| <server> | |||||
| <formatter type="xml" filters="stacktrace"/> | |||||
| <param name="file" location="test.xml"/> | |||||
| </formatter> | |||||
| </server> | |||||
| </rjunit> | |||||
| </target> | |||||
| <target name="server-only"> | |||||
| <!-- will connect to an existing server and send results --> | |||||
| <rjunit port="1234"> | |||||
| <client host="127.0.0.1"> | |||||
| <classpath refid="test-classpath"/> | |||||
| <jvmarg value="-Xmx=512MB"/> | |||||
| <test name="org.apache.test.NullTest" if="condition1"> | |||||
| </client> | |||||
| </rjunit> | |||||
| </target> | |||||
| </project> | |||||