Hi Eddie,

I noticed that with this change we've lost some of the dependencies
in the build. For instance, after a clean deploy from the root, if
you go to netui/test/webapps/drt or netui/test/src/junitTests
and do a build, it will fail to mkdir netui/build/test-lib/.
Of course, if you go to netui/test/ant and do "ant build" the
test-lib directory is created with the "prepare" target dependency
and jars such as testRecorder.jar are built correctly.

The change seems to be to the value of testRecorder.build.dir when
executing the "build" target netui/test/ant/testRecorderCore.xml.
Previously it seemed that testRecorder.build.dir evaluated to
netui/test/ant/ (same as basedir). Then the "test.build.module"
target was executed in netui/test/ant/build.xml and it depends on
"prepare" which creates the netui/build/test-lib/ directory.

Now the value for test.build.module is netui/test/src/testRecorder/
(which I agree is correct) and we execute the "build" target in
build.xml. However, there's no dependency on the existence of the
directory netui/build/test-lib/. Therefor the other projects that
depend on the existence of the netui/build/test-lib/ fail. The same
issue exists in netui/test/src/junitTests/, netui/test/src/fauxServlet/,
netui/test/src/testRecorderQA/, etc.

We could simply add the following line to "build" target in files
like netui/test/src/testRecorder/build.xml.

   <ant antfile="${test.dir}/ant/build.xml" target="prepare"
        inheritAll="false"/>

Maybe there's a better way to include a dependence on a target of
another project. What do you think? Other thoughts?

Thanks,
Carlin

[EMAIL PROTECTED] wrote:

Author: ekoneil
Date: Mon Nov  1 13:15:17 2004
New Revision: 56282

Added:
   incubator/beehive/trunk/netui/ant/netui.properties
      - copied, changed from rev 56140, 
incubator/beehive/trunk/netui/ant/common.properties
   incubator/beehive/trunk/netui/external/jstl/
   incubator/beehive/trunk/netui/external/jstl/jstl.jar   (contents, props 
changed)
   incubator/beehive/trunk/netui/external/jstl/standard.jar   (contents, props 
changed)
Removed:
   incubator/beehive/trunk/netui/ant/bootstrap.properties
   incubator/beehive/trunk/netui/ant/buildModules.xml
   incubator/beehive/trunk/netui/ant/common.properties
   
incubator/beehive/trunk/netui/src/bootstrap/org/apache/beehive/netui/tools/ant/
   incubator/beehive/trunk/netui/test/ant/junit.xml
   incubator/beehive/trunk/netui/test/ant/junitDrt.properties
   incubator/beehive/trunk/netui/test/ant/junitReport.xml
   incubator/beehive/trunk/netui/test/ant/junitStyles/
   incubator/beehive/trunk/netui/test/ant/testRecorderJunit.properties
   incubator/beehive/trunk/netui/test/src/tools/
   incubator/beehive/trunk/netui/test/webapps/webappBuild-test/
Modified:
   incubator/beehive/trunk/netui/ant/build.xml
   incubator/beehive/trunk/netui/ant/webappTemplate.xml
   incubator/beehive/trunk/netui/ant/xmlBean.xml
   incubator/beehive/trunk/netui/src/bootstrap/build.xml
   incubator/beehive/trunk/netui/src/compiler/build.xml
   incubator/beehive/trunk/netui/src/pageflow/build.xml
   incubator/beehive/trunk/netui/src/scoping/build.xml
   incubator/beehive/trunk/netui/src/tags-databinding/build.xml
   incubator/beehive/trunk/netui/src/tags-html/build.xml
   incubator/beehive/trunk/netui/src/tags-template/build.xml
   incubator/beehive/trunk/netui/src/tomcat-common/4x/build.xml
   incubator/beehive/trunk/netui/src/tomcat-common/build.xml
   incubator/beehive/trunk/netui/src/tomcat-server/4x/build.xml
   incubator/beehive/trunk/netui/src/tomcat-server/build.xml
   incubator/beehive/trunk/netui/src/tomcat-webapp/4x/build.xml
   incubator/beehive/trunk/netui/src/tomcat-webapp/build.xml
   incubator/beehive/trunk/netui/src/util/build.xml
   incubator/beehive/trunk/netui/test/ant/build.xml
   incubator/beehive/trunk/netui/test/ant/buildWebapp.xml
   incubator/beehive/trunk/netui/test/ant/test.properties
   incubator/beehive/trunk/netui/test/ant/testRecorder.xml
   incubator/beehive/trunk/netui/test/ant/testRecorderCore.xml
   incubator/beehive/trunk/netui/test/src/fauxServlet/build.xml
   incubator/beehive/trunk/netui/test/src/junitTests/build.xml
   incubator/beehive/trunk/netui/test/src/testBeans/build.xml
   incubator/beehive/trunk/netui/test/src/testRecorder/build.xml
   incubator/beehive/trunk/netui/test/src/testRecorderQA/build.xml
   incubator/beehive/trunk/netui/test/webapps/drt/build.xml
   incubator/beehive/trunk/netui/test/webapps/jsf/build.xml
   incubator/beehive/trunk/netui/test/webapps/testRecorder-test/build.xml
Log:
Significant rework of the NetUI build.

- removed all custom Ant tasks -- buildModules and junit
  - switched to <subant> and <junit>
- changed "compile" target to "build" so the netui/src/<module-name> and 
netui/test/src/<module-name> targets are more consistent with regular Ant builds
- remove the webappBuild-test webapp
- remove the junitReport.xml Ant file as this isn't needed any longer
- move the NetUI test targets into netui/test/ant/build.xml
- remove the netui/ant/buildModules.xml Ant file
- break the build dependence from NetUI on Tomcat.  jstl.jar and standard.jar 
were referenced in Tomcat and are now installed in netui/external/jstl/...

BB: self
DRT: Beehive pass
BVT: NetUI pass


...



Modified: incubator/beehive/trunk/netui/test/ant/testRecorderCore.xml
==============================================================================
--- incubator/beehive/trunk/netui/test/ant/testRecorderCore.xml (original)
+++ incubator/beehive/trunk/netui/test/ant/testRecorderCore.xml Mon Nov 1 13:15:17 2004
@@ -22,7 +22,6 @@
<property name="_report.root.dir" location="${_testRecorder.base.dir}/junit"/>
<property name="_testRecorder.config.dir" location="${_testRecorder.base.dir}/config"/>
<property name="_testRecorder.scratch.dir" location="${_testRecorder.base.dir}/scratch"/>
- <property name="_testRecorder.output" value="TEST-org.apache.beehive.netui.tools.testrecorder.client.MasterTestRecorderJUnitTest"/>
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath>
@@ -138,7 +137,7 @@
<target name="drt.errors" if="drt.errors.stop">
<echo>!!!!! Errors or failures occurred running test recorder tests !!!!!</echo>
<antcall target="stop.server"/>
- <fail message="NetUI Server DRTs Failed"/>
+ <fail message="NetUI Server Tests Failed"/>
</target>
<!-- @@ -179,13 +178,6 @@
all categories.
</fail>
- <!-- remove old junit output -->
- <delete>
- <fileset dir=".">
- <include name="${_testRecorder.output}.*"/>
- </fileset>
- </delete>
-
<condition property="_log4j.config" value="${_log4j.config.verbose}">
<not>
<isset property="log4j.quiet"/>
@@ -224,31 +216,59 @@
</or>
</condition>
+ <property name="_report.dir" location="${_report.root.dir}/${_categories}"/>
+
+ <!-- remove old junit output -->
+ <delete failOnError="false">
+ <fileset dir="${_report.dir}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ </delete>
+
+ <mkdir dir="${_report.dir}"/>
+
<echo>log4j.config: ${_log4j.config}</echo>
<echo>playback list: ${_list}</echo>
<echo>playback categories: ${_categories}</echo>
<echo>playback webapps: ${playback.webapps}</echo>
<echo>delete results: ${_results.delete}</echo>
+ <echo>junit output directory: ${_report.dir}</echo>
- <junit dir="${netui.ant.dir}" fork="true" errorproperty="playback.drt.error" failureproperty="playback.drt.failure" showoutput="true">
+ <junit dir="${netui.ant.dir}" + fork="true" + errorproperty="playback.drt.error" + failureproperty="playback.drt.failure" + showoutput="true">
<classpath refid="test.recorder.classpath"/>
- <sysproperty key="test.recorder.run.webapps" value="${playback.webapps}"/>
<formatter type="${formatter.type}" usefile="${formatter.usefile}"/>
+ <sysproperty key="test.recorder.run.webapps" value="${playback.webapps}"/>
<sysproperty key="test.recorder.run.tests" value="${_list}"/>
<sysproperty key="test.recorder.run.categories" value="${_categories}"/>
<sysproperty key="test.recorder.run.results.delete" value="${_results.delete}"/>
<sysproperty key="netuidrt.logdir" path="${_testRecorder.base.dir}"/>
<sysproperty key="log4j.configuration" value="file:${_log4j.config}"/>
- <test name="org.apache.beehive.netui.tools.testrecorder.client.MasterTestRecorderJUnitTest"/>
+ <test name="org.apache.beehive.netui.tools.testrecorder.client.MasterTestRecorderJUnitTest" + todir="${_report.dir}"/>
</junit>
- <!-- Create a JUnit report based on the results of executing the test recorder test cases -->
- <antcall target="make.report">
- <param name="test.report.dir" value="${_report.root.dir}/${_categories}"/>
- </antcall>
+ <mkdir dir="${_report.dir}/html"/>
+
+ <!-- build a report -->
+ <junitreport todir="${_report.dir}/">
+ <fileset dir="${_report.dir}/">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="noframes" todir="${_report.dir}/html"/>
+ </junitreport>
+
+ <delete>
+ <fileset dir="${_report.dir}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ </delete>
<!-- Determine if the tests have an error or failure -->
<condition property="drt.errors.found">
@@ -257,6 +277,7 @@
<isset property="playback.drt.failure"/>
</or>
</condition>
+
<echo>drt.errors.found: ${drt.errors.found}</echo>
<!-- @@ -286,28 +307,6 @@
</antcall>
</target>
- <!--
- Param:
- test.report.dir == the directory into which to generate the report. This value is provided by the caller.
- -->
- <target name="make.report">
- <property name="html.report.dir" location="${test.report.dir}/html"/>
-
- <mkdir dir="${test.report.dir}" />
- <mkdir dir="${html.report.dir}"/>
-
- <ant dir="${basedir}" antfile="${_junitReport.ant}" target="run">
- <property name="test.report.dir" location="${test.report.dir}"/>
- <property name="type" value="testrecorder"/>
- </ant>
-
- <delete>
- <fileset dir=".">
- <include name="${_testRecorder.output}.*"/>
- </fileset>
- </delete>
- </target>
-
<!-- Deploy the Test Recorder to the given webapp
Params:
@@ -361,17 +360,12 @@
<!-- Build the test recorder -->
<target name="build" description="build the Test Recorder module">
- <echo>basedir: ${basedir}</echo>
- <ant dir="${testRecorder.build.dir}" antfile="build.xml" target="test.build.module" inheritAll="false">
- <property name="module.name" value="testRecorder"/>
- </ant>
+ <ant dir="${testRecorder.build.dir}" antfile="build.xml" target="build" inheritAll="false"/>
</target>
<!-- Clean the test recorder -->
<target name="clean" description="clean the Test Recorder module">
- <ant dir="${testRecorder.build.dir}" antfile="build.xml" target="test.clean.module" inheritAll="false">
- <property name="module.name" value="testRecorder"/>
- </ant>
+ <ant dir="${testRecorder.build.dir}" antfile="build.xml" target="clean" inheritAll="false"/>
</target>
<!--






Reply via email to