Add HTTP access checking for JUnit tests
diff --git a/releng.wtpbuilder/distribution/wtp.tests/build.xml b/releng.wtpbuilder/distribution/wtp.tests/build.xml
index ccfce64..c053145 100644
--- a/releng.wtpbuilder/distribution/wtp.tests/build.xml
+++ b/releng.wtpbuilder/distribution/wtp.tests/build.xml
@@ -6,8 +6,8 @@
some variables, e.g. ones we set, since properties are case sensitive, even if
the environment variables on your operating system are not, e.g. it will
be ${env.Path} not ${env.PATH} on Windows -->
- <property environment="env" />
-
+ <property
+ environment="env" />
<fail
message="testRoot must be set for this task"
unless="testRoot" />
@@ -15,7 +15,8 @@
<!-- ===================================================================== -->
<!-- Steps to do after the build is done. -->
<!-- ===================================================================== -->
- <target name="test">
+ <target
+ name="test">
<dirname
file="${ant.file}"
property="currentDirectory" />
@@ -28,39 +29,43 @@
<!-- ===================================================================== -->
<!-- Steps to do to test the build results -->
<!-- ===================================================================== -->
- <target name="runTest">
-
+ <target
+ name="runTest">
<dirname
file="${ant.file}"
property="test.component.dir" />
- <ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
- <property file="${buildDirectory}/label.properties" />
- <property file="${wtp.builder.home}/build.properties" />
-
+ <ant
+ antfile="${wtp.builder.home}/scripts/build/label.xml" />
+ <property
+ file="${buildDirectory}/label.properties" />
+ <property
+ file="${wtp.builder.home}/build.properties" />
<fail
message="testRoot must be set for this task"
unless="testRoot" />
- <mkdir dir="${testRoot}" />
+ <mkdir
+ dir="${testRoot}" />
<!-- if results already exist, delete them -->
<delete
dir="${testRoot}/results"
failOnError="false" />
- <mkdir dir="${testRoot}/results" />
-
- <mkdir dir="${testRoot}/results/consolelogs" />
- <mkdir dir="${testRoot}/results/consolelogs/metadata-logs" />
- <mkdir dir="${testRoot}/results/consolelogs/configuration-logs" />
-
+ <mkdir
+ dir="${testRoot}/results" />
+ <mkdir
+ dir="${testRoot}/results/consolelogs" />
+ <mkdir
+ dir="${testRoot}/results/consolelogs/metadata-logs" />
+ <mkdir
+ dir="${testRoot}/results/consolelogs/configuration-logs" />
<copy
todir="${testRoot}"
overwrite="true">
- <fileset dir="${test.component.dir}/testScripts"></fileset>
+ <fileset
+ dir="${test.component.dir}/testScripts"></fileset>
</copy>
-
<echo
message="BASEOS: ${env.BASEOS} BASEWS: ${env.BASEWS} BASEARCH: ${env.BASEARCH} " />
-
<ant
antfile="${test.component.dir}/testdependency.xml"
target="get">
@@ -71,23 +76,23 @@
name="base.install.dir"
value="${testRoot}" />
</ant>
-
- <antcall target="unzipTests" />
-
- <antcall target="runTestEclipse">
+ <antcall
+ target="unzipTests" />
+ <antcall
+ target="runTestEclipse">
<param
name="testTarget"
value="all" />
</antcall>
- <antcall target="postRunTestEclipse">
+ <antcall
+ target="postRunTestEclipse">
<param
name="testTarget"
value="all" />
</antcall>
-
</target>
-
- <target name="unzipTests">
+ <target
+ name="unzipTests">
<!--unzip the builds and junit tests
we use 'unzip' here, so we can continue on error
@@ -97,9 +102,9 @@
dir="${buildDirectory}/${buildLabel}"
executable="unzip"
failonerror="false">
- <arg line="-o -qq wtp-sdk-${buildLabel}.zip -d ${testRoot}" />
+ <arg
+ line="-o -qq wtp-sdk-${buildLabel}.zip -d ${testRoot}" />
</exec>
-
<exec
dir="${buildDirectory}/${buildLabel}"
executable="unzip"
@@ -114,8 +119,6 @@
<arg
line="-o -qq wtp-jst-Automated-Tests-${buildLabel}.zip -d ${testRoot}" />
</exec>
-
-
<exec
dir="${buildDirectory}/${buildLabel}"
executable="unzip"
@@ -130,7 +133,6 @@
<arg
line="-o -qq wtp-jpt-Automated-Tests-${buildLabel}.zip -d ${testRoot}" />
</exec>
-
</target>
<!-- time out may need to be set/adjust for api or performance tests?
@@ -143,19 +145,15 @@
1800000: 30 minutes
600000: 10 minutes
-->
-
<property
name="testTimeLimit"
value="7200000" />
<property
name="testFailOnError"
value="false" />
-
<target
name="runTestEclipse"
description="Run our JUnit's within an instance of antRunner">
-
-
<property
name="test-vm"
value="${env.JAVA_5_HOME}/bin/java" />
@@ -171,8 +169,8 @@
<property
name="eclipse.home"
value="${testRoot}" />
-
- <echo message="Running junits" />
+ <echo
+ message="Running junits" />
<!-- If there is not exactly one launcher in the stack,
we'd best fail fast, since we are not expecting that,
@@ -204,38 +202,62 @@
jvm="${env.JAVA_5_HOME}/bin/java"
classname="org.eclipse.equinox.launcher.Main">
<classpath>
- <fileset dir="${testRoot}/eclipse/plugins">
- <include name="org.eclipse.equinox.launcher_*.jar" />
+ <fileset
+ dir="${testRoot}/eclipse/plugins">
+ <include
+ name="org.eclipse.equinox.launcher_*.jar" />
</fileset>
</classpath>
-
- <jvmarg value="-Xms256m" />
- <jvmarg value="-Xmx512m" />
-
- <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
- <jvmarg value="-Dosgi.os=${env.BASEOS}" />
- <jvmarg value="-Dosgi.arch=${env.BASEARCH}" />
- <jvmarg value="-Dws=${env.BASEWS}" />
- <jvmarg value="-Dos=${env.BASEOS}" />
- <jvmarg value="-Darch=${env.BASEARCH}" />
-
- <jvmarg value="-Dosgi.clean=true" />
- <jvmarg value="-Dnoclean=true" />
- <jvmarg value="-DbuildBranch=${buildBranch}" />
- <jvmarg value="-DbuildType=${buildType}" />
- <jvmarg value="-DbuildId=${buildId}" />
-
- <arg value="-nosplash" />
- <arg value="-consolelog" />
-
- <arg value="-data" />
- <arg value="${testRoot}/overallTestWorkspace" />
- <arg value="-application" />
- <arg value="org.eclipse.ant.core.antRunner" />
- <arg value="-file" />
- <arg value="${testRoot}/test.xml" />
- <arg value="-logger" />
- <arg value="org.apache.tools.ant.DefaultLogger" />
+ <jvmarg
+ value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol" />
+ <jvmarg
+ value="-DurlLogLocation=${buildDirectory}/fromtestsoutgoinghttp.log" />
+ <jvmarg
+ value="-Xms512m" />
+ <jvmarg
+ value="-Xmx1024m" />
+ <jvmarg
+ value="-Dosgi.ws=${env.BASEWS}" />
+ <jvmarg
+ value="-Dosgi.os=${env.BASEOS}" />
+ <jvmarg
+ value="-Dosgi.arch=${env.BASEARCH}" />
+ <jvmarg
+ value="-Dws=${env.BASEWS}" />
+ <jvmarg
+ value="-Dos=${env.BASEOS}" />
+ <jvmarg
+ value="-Darch=${env.BASEARCH}" />
+ <jvmarg
+ value="-Dosgi.clean=true" />
+ <jvmarg
+ value="-Dnoclean=true" />
+ <jvmarg
+ value="-DbuildBranch=${buildBranch}" />
+ <jvmarg
+ value="-DbuildType=${buildType}" />
+ <jvmarg
+ value="-DbuildId=${buildId}" />
+ <arg
+ value="-nosplash" />
+ <arg
+ value="-consolelog" />
+ <arg
+ value="-data" />
+ <arg
+ value="${testRoot}/overallTestWorkspace" />
+ <arg
+ value="-application" />
+ <arg
+ value="org.eclipse.ant.core.antRunner" />
+ <arg
+ value="-file" />
+ <arg
+ value="${testRoot}/test.xml" />
+ <arg
+ value="-logger" />
+ <arg
+ value="org.apache.tools.ant.DefaultLogger" />
<env
key="DISPLAY"
value="${env.DISPLAY}" />
@@ -270,26 +292,29 @@
key="buildLabel"
value="${buildLabel}" />
</java>
-
- <echo message="wtpmasterjunitresult ${wtpmasterjunitresult}" />
+ <echo
+ message="wtpmasterjunitresult ${wtpmasterjunitresult}" />
</target>
-
-
- <target name="postRunTestEclipse">
+ <target
+ name="postRunTestEclipse">
<copy
todir="${buildDirectory}/${buildLabel}/testResults/consolelogs/testLogs"
overwrite="true"
failonerror="false">
- <fileset dir="${testRoot}/results">
- <include name="*output.txt" />
+ <fileset
+ dir="${testRoot}/results">
+ <include
+ name="*output.txt" />
</fileset>
</copy>
<copy
todir="${buildDirectory}/${buildLabel}/testResults/consolelogs/testSysErrorLogs"
overwrite="true"
failonerror="false">
- <fileset dir="${testRoot}/results">
- <include name="*error.txt" />
+ <fileset
+ dir="${testRoot}/results">
+ <include
+ name="*error.txt" />
</fileset>
</copy>
<copy
@@ -304,24 +329,25 @@
overwrite="true"
failonerror="false">
</copy>
-
<copy
todir="${buildDirectory}/${buildLabel}/testResults/xml"
overwrite="true"
failonerror="false">
- <fileset dir="${testRoot}/results/xml">
- <include name="*.xml" />
+ <fileset
+ dir="${testRoot}/results/xml">
+ <include
+ name="*.xml" />
</fileset>
</copy>
<copy
todir="${buildDirectory}/${buildLabel}/testResults/html"
overwrite="true"
failonerror="false">
- <fileset dir="${testRoot}/results/html">
- <include name="*.html" />
+ <fileset
+ dir="${testRoot}/results/html">
+ <include
+ name="*.html" />
</fileset>
</copy>
</target>
-
-
-</project>
+</project>
\ No newline at end of file