forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-test-db-upgrade.xml
158 lines (121 loc) · 4.83 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?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-db2-common">
<echo file="test.${user.name}.properties">db.type=db2</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-db2.sql" />
</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-mysql-common">
<echo file="test.${user.name}.properties">db.type=mysql</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-mysql.sql" />
</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-oracle-common">
<echo file="test.${user.name}.properties">db.type=oracle</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-oracle.sql" />
</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-postgresql-common">
<echo file="test.${user.name}.properties">db.type=postgresql</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-postgresql.sql" />
</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-sql-server-common">
<echo file="test.${user.name}.properties">db.type=sql-server</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-sql-server.sql" />
</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-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>
</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>
<antcall target="clean-up-bundles" />
</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="SmokeTestSuite" />
</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>