Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1628 - in development/main: central/site/src/docs/products/magic/tasks magic/core/src/main/net/dpml/magic/tasks

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: pneubauer AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1628 - in development/main: central/site/src/docs/products/magic/tasks magic/core/src/main/net/dpml/magic/tasks
  • Date: Sat, 29 Jan 2005 22:25:36 +0100

Author: pneubauer
Date: Sat Jan 29 22:25:35 2005
New Revision: 1628

Modified:
development/main/central/site/src/docs/products/magic/tasks/junit.xml
development/main/central/site/src/docs/products/magic/tasks/reactor.xml

development/main/magic/core/src/main/net/dpml/magic/tasks/JUnitTestTask.java
development/main/magic/core/src/main/net/dpml/magic/tasks/ReactorTask.java
Log:
- added the reactor properties in order to be able to build subprojects
with test failures/errors and fail after everything is done, including
test reports. good for contineous integration.
- changed the default of project.test.halt-on-errors to true.


Modified:
development/main/central/site/src/docs/products/magic/tasks/junit.xml
==============================================================================
--- development/main/central/site/src/docs/products/magic/tasks/junit.xml
(original)
+++ development/main/central/site/src/docs/products/magic/tasks/junit.xml
Sat Jan 29 22:25:35 2005
@@ -77,7 +77,7 @@
</tr>
<tr>
<td>${project.test.halt-on-error}</td>
- <td>false</td>
+ <td>true</td>
<td></td>
</tr>
<tr>

Modified:
development/main/central/site/src/docs/products/magic/tasks/reactor.xml
==============================================================================
--- development/main/central/site/src/docs/products/magic/tasks/reactor.xml
(original)
+++ development/main/central/site/src/docs/products/magic/tasks/reactor.xml
Sat Jan 29 22:25:35 2005
@@ -41,158 +41,53 @@
[artifact:jar:dpml/metro/private/dpml-parameters-impl#SNAPSHOT]
[artifact:jar:dpml/metro/private/dpml-configuration-impl#SNAPSHOT]
[artifact:jar:dpml/util/dpml-util-i18n#SNAPSHOT]
-[artifact:jar:dpml/metro/protected/dpml-meta-api#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-meta-spi#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-meta-impl#SNAPSHOT]
-[artifact:jar:dpml/metro/tools/dpml-meta-tools#SNAPSHOT]
-[artifact:jar:dpml/http/dpml-http-api#SNAPSHOT]
-[artifact:jar:dpml/http/dpml-http-util#SNAPSHOT]
-[artifact:jar:dpml/metro/public/dpml-logging-api#SNAPSHOT]
-[artifact:jar:dpml/central/dpml-tutorial-context-casting]
-[artifact:jar:dpml/transit/dpml-transit-main#SNAPSHOT]
-[artifact:jar:dpml/metro/protected/dpml-extension-api#SNAPSHOT]
-[artifact:jar:dpml/metro/protected/dpml-logging-data#SNAPSHOT]
-[artifact:jar:dpml/metro/public/dpml-context-api#SNAPSHOT]
-[artifact:jar:dpml/metro/protected/dpml-composition-api#SNAPSHOT]
-[artifact:jar:dpml/console/dpml-console-api#SNAPSHOT]
-[artifact:jar:dpml/console/dpml-console-commands#SNAPSHOT]
-[artifact:jar:dpml/util/dpml-util-cli#SNAPSHOT]
-[artifact:jar:dpml/util/dpml-util-exception#SNAPSHOT]
-[artifact:jar:dpml/util/dpml-util-criteria#SNAPSHOT]
-[artifact:jar:dpml/transit/dpml-transit-plugin#SNAPSHOT]
-[artifact:jar:dpml/transit/dpml-transit-installer#SNAPSHOT]
-[artifact:jar:dpml/http/dpml-http-spi#SNAPSHOT]
-[artifact:jar:dpml/metro/public/dpml-activity-api#SNAPSHOT]
-[artifact:jar:dpml/http/dpml-http-impl#SNAPSHOT]
-[artifact:block:dpml/http/dpml-http-tapestry#1.0]
-[artifact:jar:dpml/http/examples/hangman/hangman-api#2.0.0]
-[artifact:war:dpml/http/examples/hangman/hangman-view]
-[artifact:jar:dpml/http/examples/hangman/hangman-game#2.0.0]
-[artifact:block:dpml/http/examples/hangman/hangman-app#2.0.0]
-[artifact:jar:dpml/central/dpml-tutorial-config-defaults]
-[artifact:jar:dpml/db/dpml-db-api#SNAPSHOT]
-[artifact:jar:dpml/dbcp/dpml-dbcp-api#SNAPSHOT]
-[artifact:jar:dpml/dbcp/dpml-dbcp-impl#SNAPSHOT]
-[artifact:block:dpml/http/dpml-http-servlet#1.0]
-[artifact:jar:dpml/metro/private/dpml-system-api#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-logging-spi#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-logging-logkit-api#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-util-defaults#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-logging-criteria#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-logging-logkit-impl#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-logging-logkit-datagram#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-logging-logkit-syslog#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-logging-log4j#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-context-impl#SNAPSHOT]
-[artifact:jar:dpml/test/dpml-test-playground]
-[artifact:jar:dpml/metro/private/dpml-system-spi#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-system-impl#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-composition-spi#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-activation-api#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-activation-avalon-provider#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-activation-metro-provider#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-activation-impl#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-extension-impl#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-composition-impl#SNAPSHOT]
-[artifact:jar:dpml/central/dpml-tutorial-config-injection]
-[artifact:block:dpml/central/dpml-tutorial-config-override]
-[artifact:jar:dpml/central/dpml-tutorial-selection]
-[artifact:jar:dpml/magic/dpml-magic-bootstrap#SNAPSHOT]
-[artifact:jar:dpml/reflector/dpml-reflector-api#SNAPSHOT]
-[artifact:jar:dpml/reflector/dpml-reflector-spi#SNAPSHOT]
-[artifact:jar:dpml/reflector/dpml-reflector-typehandlers#SNAPSHOT]
-[artifact:jar:dpml/central/dpml-tutorial-publisher-api]
-[artifact:jar:dpml/central/dpml-tutorial-publisher-impl]
-[artifact:jar:dpml/central/dpml-tutorial-context-phased]
-[artifact:jar:dpml/jms/dpml-jms-api#SNAPSHOT]
-[artifact:jar:dpml/central/dpml-tutorial-config-block]
-[artifact:jar:dpml/central/dpml-tutorial-dependency-manual]
-[artifact:jar:dpml/jms/dpml-jms-impl#SNAPSHOT]
-[artifact:jar:dpml/jms/dpml-jms-test]
-[artifact:jar:dpml/magic/dpml-magic-core#SNAPSHOT]
-[artifact:jar:dpml/magic/dpml-magic-upload#SNAPSHOT]
-[artifact:jar:dpml/test/dpml-test-testa]
-[artifact:jar:dpml/test/dpml-test-teste]
-[artifact:jar:dpml/test/dpml-test-testd]
-[artifact:jar:dpml/test/dpml-test-testb]
-[artifact:jar:dpml/test/dpml-test-testc]
-[artifact:jar:dpml/test/dpml-test-includes]
-[artifact:jar:dpml/central/dpml-tutorial-dynamics]
-[artifact:jar:dpml/central/dpml-tutorial-dependency-auto]
-[artifact:block:dpml/http/dpml-http-webappserver#1.0]
-[artifact:block:dpml/http/dpml-http-static#1.0]
-[artifact:jar:dpml/magic/dpml-magic-doc#SNAPSHOT]
-[artifact:theme:dpml/magic/dpml-magic-themes-modern]
-[artifact:jar:dpml/test/dpml-test-testschema]
-[artifact:jar:dpml/test/dpml-test-dynamics]
-[artifact:jar:dpml/test/dpml-test-testcyclic]
-[artifact:jar:dpml/test/dpml-composition-test#SNAPSHOT]
-[artifact:jar:dpml/test/dpml-magic-example#SNAPSHOT]
-[artifact:jar:dpml/magic/dpml-magic-bar#SNAPSHOT]
-[artifact:jar:dpml/magic/dpml-magic-publish#SNAPSHOT]
-[artifact:plugin:dpml/test/dpml-magic-test#SNAPSHOT]
-[artifact:jar:dpml/metro/tools/dpml-metro-unit#SNAPSHOT]
-[artifact:jar:dpml/central/dpml-tutorial-hello]
-[artifact:block:dpml/http/dpml-http-hash-basic#1.0]
-[artifact:jar:dpml/central/dpml-tutorial-location-api]
-[artifact:jar:dpml/central/dpml-tutorial-profiles]
-[artifact:jar:dpml/tutorial/dpml-transit-tutorial-artifact]
-[artifact:jar:dpml/finder/dpml-finder-api#SNAPSHOT]
-[artifact:jar:dpml/test/dpml-test-components]
-[artifact:jar:dpml/console/dpml-console-impl#SNAPSHOT]
-[artifact:jar:dpml/reflector/dpml-reflector-impl#SNAPSHOT]
-[artifact:block:dpml/reflector/dpml-reflector-blocks-standard#SNAPSHOT]
-[artifact:jar:dpml/jmx/dpml-jmx-util#SNAPSHOT]
-[artifact:jar:dpml/jmx/dpml-jmx-api#SNAPSHOT]
-[artifact:jar:dpml/jmx/dpml-jmx-spi#SNAPSHOT]
-[artifact:jar:dpml/jmx/dpml-jmx-mx4j#SNAPSHOT]
-[artifact:block:dpml/http/dpml-http-server#1.0]
-[artifact:jar:dpml/magic/dpml-magic-style#SNAPSHOT]
-[artifact:jar:dpml/magic/dpml-magic-checkstyle#SNAPSHOT]
-[artifact:module:dpml/util/dpml-util#SNAPSHOT]
-[artifact:jar:dpml/magic/dpml-magic-eclipse#SNAPSHOT]
-[artifact:module:dpml/transit/dpml-transit#SNAPSHOT]
-[artifact:theme:dpml/magic/dpml-magic-themes-docbook.sf.net]
-[artifact:module:dpml/magic/dpml-magic#SNAPSHOT]
-[artifact:jar:dpml/jmx/dpml-jmx-handler#SNAPSHOT]
-[artifact:jar:dpml/jmx/dpml-jmx-test]
-[artifact:jar:dpml/central/dpml-tutorial-main]
-[artifact:jar:dpml/tutorial/dpml-transit-tutorial-plugin-cli]
-[artifact:jar:dpml/tutorial/dpml-transit-tutorial-plugin-controller]
-[artifact:jar:dpml/central/dpml-tutorial-parameters]
-[artifact:jar:dpml/test/dpml-system-test#SNAPSHOT]
-[artifact:jar:dpml/finder/dpml-finder-impl#SNAPSHOT]
-[artifact:jar:dpml/metro/private/dpml-logging-logkit-socket#SNAPSHOT]
-[artifact:jar:dpml/test/dpml-logging-logkit-test#SNAPSHOT]
-[artifact:jar:dpml/central/dpml-tutorial-location-impl]
-[artifact:jar:dpml/central/dpml-tutorial-application-impl]
-[artifact:jar:dpml/http/dpml-http-test]
-[artifact:jar:dpml/test/dpml-logging-log4j-test#SNAPSHOT]
-[artifact:jar:dpml/metro/tools/dpml-metro-main#SNAPSHOT]
-[artifact:module:dpml/metro/dpml-metro#SNAPSHOT]
-[artifact:jar:dpml/central/dpml-tutorial-context-injection]
-[artifact:jar:dpml/central/dpml-tutorial-context-custom]
-[artifact:doc:dpml/central/dpml-central-site]
-[artifact:jar:dpml/central/dpml-tutorial-context-alias]
-[artifact:jar:dpml/central/dpml-tutorial-lifecycle-modern]
-[artifact:module:dpml/central/dpml-central#SNAPSHOT]
-[artifact:block:dpml/http/dpml-http-hash-form#1.0]
-[artifact:block:dpml/console/dpml-console-default#SNAPSHOT]
-[artifact:jar:dpml/tutorial/dpml-transit-tutorial-plugin-simple]
-[artifact:jar:dpml/http/examples/hello/dpml-http-hello#2.0.0]
-[artifact:block:dpml/http/dpml-http-hash-clientcert#1.0]
-[artifact:block:dpml/http/dpml-http-hash-digest#1.0]
-[artifact:block:dpml/http/dpml-http-context#1.0]
-[artifact:module:dpml/http/dpml-http#SNAPSHOT]
-[artifact:block:dpml/reflector/dpml-reflector-blocks-complete#SNAPSHOT]
-[artifact:jar:dpml/db/dpml-db-hsql#SNAPSHOT]
-[artifact:jar:dpml/tutorial/dpml-transit-tutorial-extension]
-[artifact:jar:dpml/test/dpml-activation-test#SNAPSHOT]
-
....

</pre>
</section>
+ <section name="Properties">
+
+ <p>
+ The following properties are used to set the handling of subproject
test failures/errors.
+ </p>
+
+ <table>
+ <tr><th>Property</th><th>Default value</th><th>Description</th></tr>
+ <tr>
+ <td>${reactor.test.halt-on-failure}</td>
+ <td>true</td>
+ <td>Setting this to false will result in a successful build even
if subprojects had test failures.
+ if any subprojects had failures, the property
${reactor.test.failures} will be set to "true" on
+ the reactor project.
+ </td>
+ </tr>
+ <tr>
+ <td>${reactor.test.halt-on-errors}</td>
+ <td>true</td>
+ <td>Setting this to false will result in a successful build even
if subprojects had test errors.
+ if any subprojects had failures, the property
${reactor.test.errors} will be set to "true" on
+ the reactor project.
+ </td>
+ </tr>
+ </table>
+ <p>
+ This enables you to exacute the whole build, collect the test
reports etc and then in the top level reactor project
+ do something like:
+ <source><![CDATA[
+ <target name="test-for-errors" depends="install">
+ <echo>${reactor.test.errors}</echo>
+ <echo>${reactor.test.failures}</echo>
+ <fail message="some subproject had test errors">
+ <condition>
+ <not>
+ <isset
property="${reactor.test.errors}"/>
+ </not>
+ </condition>
+ </fail>
+ </target>
+ ]]></source>
+ </p>
+ </section>
</body>

</document>

Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/JUnitTestTask.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/tasks/JUnitTestTask.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/tasks/JUnitTestTask.java
Sat Jan 29 22:25:35 2005
@@ -58,12 +58,14 @@
public static final boolean FORK_VALUE = false;

public static final String HALT_ON_ERROR_KEY =
"project.test.halt-on-error";
- public static final boolean HALT_ON_ERROR_VALUE = false;
+ public static final boolean HALT_ON_ERROR_VALUE = true;

public static final String TEST_FORK_MODE_KEY = "project.test.fork.mode";

public static final String HALT_ON_FAILURE_KEY =
"project.test.halt-on-failure";
public static final boolean HALT_ON_FAILURE_VALUE = true;
+
+

public static final String CACHE_PATH_KEY = "dpml.cache";

@@ -166,21 +168,39 @@
final String error = project.getProperty( ERROR_KEY );
if( null != error )
{
- if( getHaltOnErrorProperty() )
+ final String message =
+ "One or more unit test errors occured.";
+ if ( !getBooleanProperty( ReactorTask.REACTOR_HALT_ON_ERROR_KEY,
true ) )
+ {
+ getIndex().getProject().setProperty(
ReactorTask.REACTOR_TEST_ERRORS_KEY, "true" );
+ project.log( message + ", IGNORED since " +
ReactorTask.REACTOR_HALT_ON_ERROR_KEY
+ + "=" + getBooleanProperty(
ReactorTask.REACTOR_HALT_ON_ERROR_KEY, true ));
+ }
+ else
{
- final String message =
- "One or more unit test errors occured.";
- fail( message );
+ if( getHaltOnErrorProperty() )
+ {
+ fail( message );
+ }
}
}
final String failure = project.getProperty( FAILURE_KEY );
if( null != failure )
{
- if( getHaltOnFailureProperty() )
+ final String message =
+ "One or more unit test failures occured.";
+ if ( !getBooleanProperty(
ReactorTask.REACTOR_HALT_ON_FAILURE_KEY,
ReactorTask.REACTOR_HALT_ON_ERROR_VALUE ) )
+ {
+ getIndex().getProject().setProperty(
ReactorTask.REACTOR_TEST_FAILURES_KEY, "true" );
+ project.log( message + ", IGNORED since " +
ReactorTask.REACTOR_HALT_ON_FAILURE_KEY
+ + "=" + getBooleanProperty(
ReactorTask.REACTOR_HALT_ON_FAILURE_KEY, true ));
+ }
+ else
{
- final String message =
- "One or more unit test failures occured.";
- fail( message );
+ if( getHaltOnFailureProperty() )
+ {
+ fail( message );
+ }
}
}


Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/ReactorTask.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/tasks/ReactorTask.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/tasks/ReactorTask.java
Sat Jan 29 22:25:35 2005
@@ -26,6 +26,8 @@
import org.apache.tools.ant.taskdefs.Ant;
import org.apache.tools.ant.taskdefs.Sequential;

+import sun.security.action.GetBooleanAction;
+
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
@@ -40,6 +42,15 @@
*/
public class ReactorTask extends Sequential
{
+
+ public static final String REACTOR_HALT_ON_FAILURE_KEY =
"reactor.test.halt-on-failure";
+ public static final boolean REACTOR_HALT_ON_FAILURE_VALUE = true;
+ public static final String REACTOR_TEST_FAILURES_KEY =
"reactor.test.failures";
+
+ public static final String REACTOR_HALT_ON_ERROR_KEY =
"reactor.test.halt-on-error";
+ public static final boolean REACTOR_HALT_ON_ERROR_VALUE = true;
+ public static final String REACTOR_TEST_ERRORS_KEY =
"reactor.test.errors";
+
private String m_target;

private Context m_context;
@@ -112,11 +123,14 @@
}
catch( Throwable e )
{
+
throw new BuildException( e );
+
}
}
}

+
private List getDefinitionList()
{
final Project project = getProject();



  • svn commit: r1628 - in development/main: central/site/src/docs/products/magic/tasks magic/core/src/main/net/dpml/magic/tasks, pneubauer, 01/29/2005

Archive powered by MHonArc 2.6.24.

Top of Page