1. Creating $BEEHIVE_HOME/external/beehive-antext directory for custom Ant tasks which may prove useful to other groups.
2. Adding GetHostName task to beehive-antext and a build.xml file to
support creating
$BEEHIVE_HOME/external/beehive-antext/beehive-antext.jar
3. Adding the first beehive-antext.jar which contains task listed in #2
4. Adding support to HttpReportTestCase class in Milton to search for
multiple HOSTNAME variables. This is mostly for Windows which does not
have a HOSTNAME variable available. One could use the GetHostName task
in an Ant script to set TEST_HOSTNAME or HOSTNAME automatically. If
HOSTNAME and TEST_HOSTNAME are null it will default to "localhost". (It
looks for TEST_HOSTNAME and then HOSTNAME and then defaults to
"localhost")
5. Fixing a few hard-coded paths and build/run class paths in build
scripts
Getting a bit closer to running the controls pageflow tests
automagically
===========================================================
=== diff inline since .diff files are being stipped off ===
===========================================================
Index:
controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/juni
t/HtmlReportTestCase.java
===================================================================
---
controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/juni
t/HtmlReportTestCase.java (revision 36637)
+++
controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/juni
t/HtmlReportTestCase.java (working copy)
@@ -25,7 +25,20 @@
public HtmlReportTestCase(String name)
{
super(name);
- this.urlPrefix = HTTP_PREFIX +
TestContext.getProperty("HOSTNAME");
+
+ String hostName = TestContext.getProperty("TEST_HOSTNAME");
+ String hostNamePort =
TestContext.getProperty("TEST_HOSTNAME_PORT");
+
+ if (null == hostName || hostName.equals("")) {
+ hostName = TestContext.getProperty("HOSTNAME");
+ if (null == hostName || hostName.equals(""))
+ hostName = "localhost";
+ }
+
+ if (null != hostNamePort)
+ hostName += ":" + hostNamePort;
+
+ this.urlPrefix = HTTP_PREFIX + hostName;
}
public String getUrlPrefix()
Index: controls/test/webapps/build.xml
===================================================================
--- controls/test/webapps/build.xml (revision 36640)
+++ controls/test/webapps/build.xml (working copy)
@@ -57,7 +57,7 @@
<!--property name="webapp.dir"
location="C:/beehive/work_dir/controls/test/webapps/${webapp.name}"/-->
<property name="webapp.dir" location="./${webapp.name}"/>
- <ant antfile="${buildWebapp.ant}" target="deploy.netui"
inheritAll="false">
+ <ant antfile="${deployNetui.ant}" target="deploy.netui"
inheritAll="false">
<property name="webapp.dir" value="${webapp.dir}" />
</ant>
@@ -86,10 +86,10 @@
<echo message="| Controls controlsWeb clean starting
|"/>
<echo
message="----------------------------------------------"/>
- <ant antfile="${buildWebapp.ant}" target="undeploy.netui"
inheritAll="false">
+ <ant antfile="${deployNetui.ant}" target="undeploy.netui"
inheritAll="false">
<property name="webapp.dir" location="./${webapp.name}"/>
</ant>
- <ant antfile="${buildWebapp.ant}" target="clean.webapp"
inheritAll="false">
+ <ant antfile="${deployNetui.ant}" target="clean.webapp"
inheritAll="false">
<property name="webapp.dir" location="./${webapp.name}"/>
</ant>
@@ -163,7 +163,7 @@
<target name="deploy" description="Deploy webapp">
<ant antfile="${runTomcat.ant}" target="deploy"
inheritAll="false">
<property name="context.path" value="${webapp.name}"/>
- <property name="webapp.root"
value="C:/beehive/work_dir/controls/test/webapps/${webapp.name}"/>
+ <property name="webapp.root"
value="${basedir}/${webapp.name}"/>
</ant>
</target>
Index: controls/test/common/path.properties
===================================================================
--- controls/test/common/path.properties (revision 36637)
+++ controls/test/common/path.properties (working copy)
@@ -24,7 +24,10 @@
xerces.jar=${external.dir}/xerces/xerces-1.4.4.jar
xbean.jar=${external.dir}/xmlbeans/apache-xbeans.jar
httpunit.jar=${external.dir}/httpunit/httpunit.jar
+httpunit-xerces.jar=${external.dir}/httpunit/xercesImpl.jar
+nekohtml.jar=${external.dir}/httpunit/nekohtml.jar
junit.jar=${external.dir}/junit/junit.jar
+beehive-antext.jar=${external.dir}/beehive-antext/beehive-antext.jar
#properties for mantis
mantis.home=${controls.test.infra.dir}/mantis
@@ -32,4 +35,4 @@
tchschema.jar=${mantis.home}/tchschema.jar
mantis.tools.jar=${os.JAVA_HOME}/lib/tools.jar
mantis.xbean.jar=${mantis.home}/xbean-1.0.2.jar
-mantis.config=${mantis.home}/mantis.properties
\ No newline at end of file
+mantis.config=${mantis.home}/mantis.properties
Index: controls/test/build.xml
===================================================================
--- controls/test/build.xml (revision 36640)
+++ controls/test/build.xml (working copy)
@@ -8,6 +8,8 @@
<property name="dev.root" value="${os.DEV_ROOT}"/>
+ <taskdef name="gethostname"
classname="org.apache.beehive.test.tools.antext.GetHostName"
+ classpath="${beehive-antext.jar}" />
<taskdef name="apt"
classname="org.apache.beehive.controls.runtime.generator.AptTask"
classpath="../build/jars/controls.jar" onerror="report" />
@@ -24,6 +26,7 @@
<property name="build.beansrc" location="${build.dir}/beansrc"/>
<property name="build.jars" location="${build.dir}/jars"/>
<property name="test.logs" location="${basedir}/logs"/>
+
<condition property="test.os" value="windows" >
<os family="windows" />
</condition>
@@ -31,7 +34,6 @@
<os family="unix" />
</condition>
-
<path id="tch.run.classpath">
<pathelement location="${tch.jar}"/>
<pathelement location="${tch.schema.jar}"/>
@@ -52,6 +54,9 @@
<pathelement location="${build.tests}" />
<pathelement location="${jakarta.jar}"/>
+ <pathelement location="${httpunit.jar}"/>
+ <pathelement location="${httpunit-xerces.jar}"/>
+ <pathelement location="${nekohtml.jar}"/>
</path>
@@ -180,22 +185,27 @@
<echo message="milton.jar: ${milton.jar}"/>
<target name="run">
+
+ <gethostname/> <!-- set ${hostname} -->
+
+ <property name="test.hostname" value="${hostname}" />
+ <property name="test.hostname.port" value="8080" /> <!-- tomcat
default port -->
+
<property name="test-suite" value="${junit.src.dir}/root.xml"/>
<property name="tch.base-logfile-name" value="tch"/>
-
<tch tchHome="${tch.home}"
testfile="${test-suite}"
fork="true"
classpathref="tch.run.classpath"
failureproperty="run.failed">
-
-
<arg value="-emacs"/>
<property name="tch.replication.entry-point" value="ant -f
${controls.test.dir}/build.xml run"/>
+ <sysproperty key="TEST_HOSTNAME" value="${test.hostname}" />
+ <sysproperty key="TEST_HOSTNAME_PORT"
value="${test.hostname.port}" />
+
</tch>
-
<ant antfile="${controls.test.infra.dir}/tch/runtime/build.xml"
target="generate-html-log" dir="${basedir}">
<property name="gtlf.file"
value="${basedir}/${tch.base-logfile-name}.xml"/>
@@ -245,5 +255,5 @@
aptcommand="${os.JAVA_HOME}/bin/apt"
/>
</target>
-
+
</project>
milton_change_08190401.tgz
Description: milton_change_08190401.tgz
