blob: 4dda5e056f0e8a37abfcb90e80466c8bdc5958f1 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
<!--
Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!ENTITY commonSetup SYSTEM "./../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "./../../config/common.xml">
<!ENTITY commonRun SYSTEM "./../../config/run.xml">
]>
<project name="connector" default="usage" basedir=".">
&commonSetup;
&commonBuild;
&commonRun;
<property name="connector-target" value="all"/>
<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
<target name="pe-all">
<antcall target="backup-config-pe"/>
<echo message="NOTE: The file ${env.APS_HOME}/config.properties is being replaced with ${basedir}/config/pe-config.properties. The file will be reverted to its original state after the completion of these tests."/>
<copy file="${basedir}/config/pe-config.properties" tofile="${env.APS_HOME}/config.properties" overwrite="true"/>
<antcall target="create-pe-passwordfile"/>
<antcall target="all"/>
<antcall target="restore-config-pe"/>
</target>
<target name="das-all">
<antcall target="backup-config-pe"/>
<echo message="NOTE: The file ${env.APS_HOME}/config.properties is being replaced with ${basedir}/config/das-config.properties. The file will be reverted to its original state after the completion of these tests."/>
<copy file="${basedir}/config/das-config.properties" tofile="${env.APS_HOME}/config.properties" overwrite="true"/>
<antcall target="create-ee-passwordfile"/>
<antcall target="all"/>
<antcall target="restore-config-pe"/>
</target>
<target name="ee-all">
<antcall target="backup-config-pe"/>
<antcall target="backup-config-ee"/>
<echo message="NOTE: The file ${env.APS_HOME}/config.properties is being replaced with ${basedir}/config/das-config.properties. The file will be reverted to its original state after the completion of these tests."/>
<copy file="${basedir}/config/ee-config.properties" tofile="${env.APS_HOME}/config.properties" overwrite="true"/>
<copy file="${basedir}/config/ee-config.properties" tofile="${env.APS_HOME}/eeconfig/ee-config.properties" overwrite="true"/>
<antcall target="create-ee-passwordfile"/>
<antcall target="ee"/>
<antcall target="all"/>
<antcall target="restore-config-pe"/>
<antcall target="restore-config-ee"/>
</target>
<target name="backup-config-pe" depends="replace-password-with-passwordfile">
<copy file="${env.APS_HOME}/config.properties" tofile="${env.APS_HOME}/config.properties.bak" overwrite="true"/>
</target>
<target name="restore-config-pe" depends="undo-replace-password-with-passwordfile">
<copy file="${env.APS_HOME}/config.properties.bak" tofile="${env.APS_HOME}/config.properties" overwrite="true"/>
</target>
<target name="backup-config-ee">
<copy file="${env.APS_HOME}/eeconfig/ee-config.properties" tofile="${env.APS_HOME}/eeconfig/ee-config.properties.bak" overwrite="true"/>
</target>
<target name="restore-config-ee">
<copy file="${env.APS_HOME}/eeconfig/ee-config.properties.bak" tofile="${env.APS_HOME}/eeconfig/ee-config.properties" overwrite="true"/>
</target>
<target name="create-pe-passwordfile">
<property file="${env.APS_HOME}/config.properties"/>
<echo message="AS_ADMIN_PASSWORD=${admin.password}${line.separator}" file="${env.APS_HOME}/devtests/connector/config/password.txt"/>
</target>
<target name="create-ee-passwordfile">
<property file="${env.APS_HOME}/config.properties"/>
<echo message="AS_ADMIN_PASSWORD=${admin.password}${line.separator}" file="${env.APS_HOME}/devtests/connector/config/password.txt"/>
<echo message="AS_ADMIN_MASTERPASSWORD=${master.password}${line.separator}" file="${env.APS_HOME}/devtests/connector/config/password.txt" append="true"/>
</target>
<target name="replace-password-with-passwordfile">
<replace dir="${env.APS_HOME}/config/">
<include name="**/*.xml"/>
<replacetoken>--password ${admin.password}</replacetoken>
<replacevalue>--passwordfile ${env.APS_HOME}/devtests/connector/config/password.txt</replacevalue>
</replace>
</target>
<target name="undo-replace-password-with-passwordfile">
<replace dir="${env.APS_HOME}/config/">
<include name="**/*.xml"/>
<replacetoken>--passwordfile ${env.APS_HOME}/devtests/connector/config/password.txt</replacetoken>
<replacevalue>--password ${admin.password}</replacevalue>
</replace>
</target>
<target name="run-test">
<antcall target="connector">
<param name="connector-target" value="run-test"/>
</antcall>
</target>
<target name="all">
<antcall target="connector">
<param name="connector-target" value="all"/>
</antcall>
</target>
<target name="clean">
<delete file="${env.APS_HOME}/../v2-tests/appserv-tests/test_results.xml"/>
<delete file="${env.APS_HOME}/../v2-tests/appserv-tests/test_resultsValid.xml"/>
<delete file="${env.APS_HOME}/../v2-tests/appserv-tests/test_results.html"/>
<antcall target="connector">
<param name="connector-target" value="clean"/>
</antcall>
</target>
<target name="build">
<antcall target="connector">
<param name="connector-target" value="build"/>
</antcall>
</target>
<target name="setup">
<antcall target="connector">
<param name="connector-target" value="setup"/>
</antcall>
</target>
<target name="deploy">
<antcall target="connector">
<param name="connector-target" value="deploy"/>
</antcall>
</target>
<target name="undeploy">
<antcall target="connector">
<param name="connector-target" value="undeploy"/>
</antcall>
</target>
<target name="unsetup">
<antcall target="connector">
<param name="connector-target" value="unsetup"/>
</antcall>
</target>
<target name="run">
<antcall target="connector">
<param name="connector-target" value="run"/>
</antcall>
</target>
<target name="connector">
<record name="connector.output" action="start" />
<echo message="@@## connector1.5 ##@@"/>
<ant dir="connector1.5" target="${connector-target}"/>
<echo message="@@## embeddedConnector1.5 ##@@"/>
<ant dir="embeddedConnector1.5" target="${connector-target}"/>
<echo message="@@## embeddedweb ##@@"/>
<ant dir="embeddedweb" target="${connector-target}"/>
<echo message="@@## mq ##@@"/>
<ant dir="mq" target="${connector-target}"/>
<echo message="@@## nonacc ##@@"/>
<ant dir="nonacc" target="${connector-target}"/>
<!-- Commented out the defaultConnectorResource test because we cannot
add a non-XA Resource [a database connection in this case] to a global JTS transaction containing
a XA resource, [a JMS resource in this case]. This test was passing due to a
JTS bug, that allowed a non-XA resource enlistment after a XA-Resource enlistment in
a global transaction!
<ant dir="defaultConnectorResource" target="${connector-target}"/>
-->
<!-- running web2connector twice -->
<echo message="@@## web2connector ##@@"/>
<ant dir="web2connector" target="${connector-target}" />
<echo message="@@## web2connector (second time) ##@@"/>
<ant dir="web2connector" target="${connector-target}" />
<!-- this test is disabled because of dependency on point base database jar which is not available -->
<!--echo message="@@## redeployRar ##@@"/>
<ant dir="redeployRar" target="${connector-target}" /-->
<echo message="@@## nonstringmcfproperties ##@@"/>
<ant dir="nonstringmcfproperties" target="${connector-target}" />
<echo message="@@## nonstringraproperties ##@@"/>
<ant dir="nonstringraproperties" target="${connector-target}" />
<echo message="@@## txlevelswitch ##@@"/>
<ant dir="txlevelswitch" target="${connector-target}" />
<echo message="@@## threadpool ##@@"/>
<ant dir="threadpool" target="${connector-target}" />
<record name="connector.output" action="stop" />
</target>
<target name="usage">
<echo> Usage:
ant connector1.5 (Executes the connector1.5 tests)
ant embdeddedWeb (Executes embeddedWeb tests)
ant mq (Executes the mq tests)
ant nonacc (Executes the nonacc test)
ant all (Executes all the connector tests)
ant clean (cleans all the connector tests)
ant build (builds all the connector tests)
ant setup (sets up all resources for connector tests)
ant deploy (deploys all the connector apps)
ant run (Executes all the connector tests)
ant undeploy (undeploys all the connector apps)
ant unsetup (unsets all resources for connector tests)
</echo>
</target>
<target name="oracle">
<property name="oracle" value="true"/>
</target>
<target name="report">
<exec executable="sh">
<arg value="./resultCount.sh"/>
</exec>
<antcall target="transfer"/>
</target>
<target name="transfer">
<xslt style="${stylesheet}"
in="${xmlfile}" out="${htmlfile}"
basedir="." destdir="." />
</target>
</project>