forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-db-upgrade.xml
139 lines (110 loc) · 4.22 KB
/
build-test-db-upgrade.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0"?>
<project name="portal-test-db-upgrade" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="prepare-db-common">
<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\" />
<if>
<contains string="${db.type}" substring="db2" />
<then>
<property name="sql.file" value="create-db2.sql" />
</then>
<elseif>
<contains string="${db.type}" substring="mysql" />
<then>
<property name="sql.file" value="create-mysql.sql" />
</then>
</elseif>
<elseif>
<contains string="${db.type}" substring="oracle" />
<then>
<property name="sql.file" value="create-oracle.sql" />
</then>
</elseif>
<elseif>
<contains string="${db.type}" substring="postgresql" />
<then>
<property name="sql.file" value="create-postgresql.sql" />
</then>
</elseif>
<elseif>
<contains string="${db.type}" substring="sql-server" />
<then>
<property name="sql.file" value="create-sql-server.sql" />
</then>
</elseif>
<elseif>
<contains string="${db.type}" substring="sybase" />
<then>
<property name="sql.file" value="create-sybase.sql" />
</then>
</elseif>
</if>
</then>
</if>
<antcall target="rebuild-database" inheritAll="false">
<param name="sql.dir" value="${sql.dir}" />
<param name="sql.file" value="${sql.file}" />
</antcall>
</target>
<target name="prepare-db-db2-common">
<echo file="test.${user.name}.properties">db.type=db2</echo>
<antcall target="prepare-db-common" inheritAll="false" />
</target>
<target name="prepare-db-mysql-common">
<echo file="test.${user.name}.properties">db.type=mysql</echo>
<antcall target="prepare-db-common" inheritAll="false" />
</target>
<target name="prepare-db-oracle-10-common">
<echo file="test.${user.name}.properties">db.type=oracle-10</echo>
<antcall target="prepare-db-common" inheritAll="false" />
</target>
<target name="prepare-db-oracle-11-common">
<echo file="test.${user.name}.properties">db.type=oracle-11</echo>
<antcall target="prepare-db-common" inheritAll="false" />
</target>
<target name="prepare-db-postgresql-8.4-common">
<echo file="test.${user.name}.properties">db.type=postgresql-8.4</echo>
<antcall target="prepare-db-common" inheritAll="false" />
</target>
<target name="prepare-db-postgresql-9.0-common">
<echo file="test.${user.name}.properties">db.type=postgresql-9.0</echo>
<antcall target="prepare-db-common" inheritAll="false" />
</target>
<target name="prepare-db-sql-server-2005-common">
<echo file="test.${user.name}.properties">db.type=sql-server-2005</echo>
<antcall target="prepare-db-common" inheritAll="false" />
</target>
<target name="prepare-db-sql-server-2008-common">
<echo file="test.${user.name}.properties">db.type=sql-server-2008</echo>
<antcall target="prepare-db-common" inheritAll="false" />
</target>
<target name="prepare-db-sybase-common">
<echo file="test.${user.name}.properties">db.type=sybase</echo>
<antcall target="prepare-db-common" inheritAll="false" />
</target>
<target name="run-latest-upgrade-test">
<echo file="app.server.${user.name}.properties">app.server.type=tomcat</echo>
<ant antfile="build-test-tomcat.xml" target="run-selenium-tomcat" inheritAll="false">
<property name="skip.rebuild-database" value="true" />
</ant>
</target>
<target name="run-smoke-test">
<ant antfile="build-test-tomcat.xml" target="run-selenium-tomcat" inheritAll="false">
<property name="skip.rebuild-database" value="true" />
<property name="test.name" value="DBUpgradeSmokeTestSuite" />
</ant>
</target>
<target name="run-versioned-upgrade-test">
<ant antfile="build-test-tomcat.xml" target="run-selenium-versioned-tomcat" inheritAll="false">
<property name="skip.rebuild-database" value="true" />
</ant>
<antcall target="clean-up-bundles">
<param name="skip.delete-liferay-home" value="true" />
</antcall>
</target>
</project>