Skip to content

Commit

Permalink
Test Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhashimoto authored and brianchandotcom committed Feb 3, 2012
1 parent 47fc8eb commit ee7de9c
Show file tree
Hide file tree
Showing 15 changed files with 1,054 additions and 1,431 deletions.
160 changes: 76 additions & 84 deletions build-test-db-upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
<project name="portal-test-db-upgrade" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />

<target name="prepare-db-db2-common">
<echo file="test.${user.name}.properties">db.type=db2</echo>

<target name="prepare-db-common">
<antcall target="prepare-portal-ext-properties" inheritAll="false" />

<ant dir="portal-impl" target="deploy-properties" inheritAll="false" />
Expand All @@ -14,7 +12,52 @@
<isset property="sql.version" />
<then>
<property name="sql.dir" value="sql\legacy\${sql.version}\create\" />
<property name="sql.file" value="create-db2.sql" />

<if>
<equals arg1="${db.type}" arg2="db2" />
<then>
<property name="sql.file" value="create-db2.sql" />
</then>
<elseif>
<equals arg1="${db.type}" arg2="mysql" />
<then>
<property name="sql.file" value="create-mysql.sql" />
</then>
</elseif>
<elseif>
<or>
<equals arg1="${db.type}" arg2="oracle-10" />
<equals arg1="${db.type}" arg2="oracle-11" />
</or>
<then>
<property name="sql.file" value="create-oracle.sql" />
</then>
</elseif>
<elseif>
<or>
<equals arg1="${db.type}" arg2="postgresql-8.4" />
<equals arg1="${db.type}" arg2="postgresql-9.0" />
</or>
<then>
<property name="sql.file" value="create-postgresql.sql" />
</then>
</elseif>
<elseif>
<or>
<equals arg1="${db.type}" arg2="sql-server-2005" />
<equals arg1="${db.type}" arg2="sql-server-2008" />
</or>
<then>
<property name="sql.file" value="create-sql-server.sql" />
</then>
</elseif>
<elseif>
<equals arg1="${db.type}" arg2="sybase" />
<then>
<property name="sql.file" value="create-sybase.sql" />
</then>
</elseif>
</if>
</then>
</if>

Expand All @@ -24,109 +67,58 @@
</antcall>
</target>

<target name="prepare-db-mysql-common">
<echo file="test.${user.name}.properties">db.type=mysql</echo>

<antcall target="prepare-portal-ext-properties" inheritAll="false" />
<target name="prepare-db-db2-common">
<echo file="test.${user.name}.properties">db.type=db2</echo>

<ant dir="portal-impl" target="deploy-properties" inheritAll="false" />
<antcall target="prepare-db-common" />
</target>

<if>
<isset property="sql.version" />
<then>
<property name="sql.dir" value="sql\legacy\${sql.version}\create\" />
<property name="sql.file" value="create-mysql.sql" />
</then>
</if>
<target name="prepare-db-mysql-common">
<echo file="test.${user.name}.properties">db.type=mysql</echo>

<antcall target="rebuild-database" inheritAll="false">
<param name="sql.dir" value="${sql.dir}" />
<param name="sql.file" value="${sql.file}" />
</antcall>
<antcall target="prepare-db-common" />
</target>

<target name="prepare-db-oracle-common">
<echo file="test.${user.name}.properties">db.type=oracle</echo>

<antcall target="prepare-portal-ext-properties" inheritAll="false" />
<target name="prepare-db-oracle-10-common">
<echo file="test.${user.name}.properties">db.type=oracle-10</echo>

<ant dir="portal-impl" target="deploy-properties" inheritAll="false" />
<antcall target="prepare-db-common" />
</target>

<if>
<isset property="sql.version" />
<then>
<property name="sql.dir" value="sql\legacy\${sql.version}\create\" />
<property name="sql.file" value="create-oracle.sql" />
</then>
</if>
<target name="prepare-db-oracle-11-common">
<echo file="test.${user.name}.properties">db.type=oracle-11</echo>

<antcall target="rebuild-database" inheritAll="false">
<param name="sql.dir" value="${sql.dir}" />
<param name="sql.file" value="${sql.file}" />
</antcall>
<antcall target="prepare-db-common" />
</target>

<target name="prepare-db-postgresql-common">
<echo file="test.${user.name}.properties">db.type=postgresql</echo>
<target name="prepare-db-postgresql-8.4-common">
<echo file="test.${user.name}.properties">db.type=postgresql-8.4</echo>

<antcall target="prepare-portal-ext-properties" inheritAll="false" />

<ant dir="portal-impl" target="deploy-properties" inheritAll="false" />
<antcall target="prepare-db-common" />
</target>

<if>
<isset property="sql.version" />
<then>
<property name="sql.dir" value="sql\legacy\${sql.version}\create\" />
<property name="sql.file" value="create-postgresql.sql" />
</then>
</if>
<target name="prepare-db-postgresql-9.0-common">
<echo file="test.${user.name}.properties">db.type=postgresql-9.0</echo>

<antcall target="rebuild-database" inheritAll="false">
<param name="sql.dir" value="${sql.dir}" />
<param name="sql.file" value="${sql.file}" />
</antcall>
<antcall target="prepare-db-common" />
</target>

<target name="prepare-db-sql-server-common">
<echo file="test.${user.name}.properties">db.type=sql-server</echo>

<antcall target="prepare-portal-ext-properties" inheritAll="false" />
<target name="prepare-db-sql-server-2005-common">
<echo file="test.${user.name}.properties">db.type=sql-server-2005</echo>

<ant dir="portal-impl" target="deploy-properties" inheritAll="false" />
<antcall target="prepare-db-common" />
</target>

<if>
<isset property="sql.version" />
<then>
<property name="sql.dir" value="sql\legacy\${sql.version}\create\" />
<property name="sql.file" value="create-sql-server.sql" />
</then>
</if>
<target name="prepare-db-sql-server-2008-common">
<echo file="test.${user.name}.properties">db.type=sql-server-2008</echo>

<antcall target="rebuild-database" inheritAll="false">
<param name="sql.dir" value="${sql.dir}" />
<param name="sql.file" value="${sql.file}" />
</antcall>
<antcall target="prepare-db-common" />
</target>

<target name="prepare-db-sybase-common">
<echo file="test.${user.name}.properties">db.type=sybase</echo>

<antcall target="prepare-portal-ext-properties" inheritAll="false" />

<ant dir="portal-impl" target="deploy-properties" inheritAll="false" />

<if>
<isset property="sql.version" />
<then>
<property name="sql.dir" value="sql\legacy\${sql.version}\create\" />
<property name="sql.file" value="create-sybase.sql" />
</then>
</if>

<antcall target="rebuild-database" inheritAll="false">
<param name="sql.dir" value="${sql.dir}" />
<param name="sql.file" value="${sql.file}" />
</antcall>
<antcall target="prepare-db-common" />
</target>

<target name="run-latest-upgrade-test">
Expand Down
10 changes: 0 additions & 10 deletions build-test-tomcat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@
/>
</target>

<target name="copy-optional-jars">
<copy
todir="${app.server.lib.global.dir}">
<fileset
dir="${jdbc.drivers.optional.dir}"
includes="*.jar"
/>
</copy>
</target>

<target name="prepare-cluster-tomcat-node">
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} dist/liferay-portal-tomcat-${lp.version}.zip ${vm.username}@${cluster-node.host}:/" />
Expand Down
Loading

0 comments on commit ee7de9c

Please sign in to comment.