forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-test.xml
174 lines (131 loc) · 6.91 KB
/
build-test.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?xml version="1.0"?>
<project name="portal-test" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build.xml" />
<target name="deploy-plugins">
<taskdef classname="com.liferay.portal.util.PropsUtilTask" classpathref="project.classpath" name="propsutil" />
<propsutil key="resource.repositories.root" result="propsutil.resource.repositories.root" />
<delete dir="${propsutil.resource.repositories.root}" />
<taskdef classname="com.liferay.portal.util.PropsUtilTask" classpathref="project.classpath" name="propsutil" />
<propsutil key="resource.repositories.root" result="propsutil.resource.repositories.root" />
<echo file="${lp.plugins.dir}/build.${user.name}.properties">app.server.dir=${app.server.dir}
app.server.portal.dir=${app.server.portal.dir}
auto.deploy.dir=${propsutil.resource.repositories.root}/deploy
plugins.includes=${plugins.includes}</echo>
<ant dir="${lp.plugins.dir}/${plugin.types}" inheritAll="false">
<target name="clean" />
<target name="deploy" />
</ant>
</target>
<target name="test">
<antcall target="all" />
<ant dir="sql" target="rebuild-mysql" inheritAll="false" />
<ant dir="portal-impl" target="test-class" inheritAll="false">
<property name="class" value="ServiceTestSuite" />
</ant>
<ant dir="portal-impl" target="test-class" inheritAll="false">
<property name="class" value="PersistenceTestSuite" />
</ant>
<ant dir="portal-impl" target="test-class" inheritAll="false">
<property name="class" value="MiscTestSuite" />
</ant>
<ant dir="portal-kernel" target="test" inheritAll="false" />
<ant dir="util-java" target="test" inheritAll="false" />
<antcall target="test-${app.server.type}" />
</target>
<target name="test-themes">
<exec dir="${lp.plugins.dir}" executable="cmd.exe" os="${os.windows}">
<arg line="/c svn update" />
</exec>
<java jar="lib/development/selenium-server.jar" fork="true" spawn="true" />
<antcall target="test-tomcat-runtime">
<param name="test.class" value="ThemesTestSuite" />
<param name="theme.plugins.includes" value="08-gulona-theme,liferay-jedi-theme" />
</antcall>
<antelope:post to="http://localhost:4444/selenium-server/driver/?cmd=shutDown" wantresponse="false" />
</target>
<target name="test-tomcat">
<replace
file="${app.server.tomcat.portal.dir}/WEB-INF/web.xml"
token="session-timeout>30<"
value="session-timeout>2<"
/>
<exec dir="${lp.plugins.dir}" executable="cmd.exe" os="${os.windows}">
<arg line="/c svn update" />
</exec>
<java jar="lib/development/selenium-server.jar" fork="true" spawn="true" />
<antcall target="test-tomcat-runtime">
<param name="test.class" value="PortalWebTestSuite" />
</antcall>
<antcall target="test-tomcat-runtime">
<param name="test.class" value="ControlPanelTestSuite" />
</antcall>
<antcall target="test-tomcat-runtime">
<param name="test.class" value="PermissionsTestSuite" />
</antcall>
<antcall target="test-tomcat-runtime">
<param name="test.class" value="Plugins1TestSuite" />
<param name="portlet.plugins.includes" value="alfresco-content-portlet,analog-clock-portlet,chat-portlet,flash-portlet,google-adsense-portlet,google-gadget-portlet,google-maps-portlet,google-search-portlet,ip-geocoder-portlet,mail-portlet,release-tools-portlet,ruby-console-portlet,sample-dao-portlet,sample-groovy-portlet,sample-hibernate-portlet,sample-icefaces-jsf-1.1-myfaces-jsp-portlet,sample-icefaces-jsf-1.1-sun-facelets-portlet,sample-icefaces-jsf-1.1-sun-jsp-portlet,sample-icefaces-jsf-1.2-sun-facelets-portlet,sample-javascript-portlet,sample-jsf-1.1-myfaces-facelets-portlet,sample-jsf-1.1-myfaces-jsp-portlet,sample-jsf-1.1-sun-facelets-portlet,sample-jsf-1.1-sun-jsp-portlet,sample-jsf-1.2-sun-facelets-portlet,sample-jsf-1.2-sun-jsp-portlet,sample-json-portlet,sample-jsp-portlet,sample-lar-portlet,sample-laszlo-portlet" />
</antcall>
<antcall target="test-tomcat-runtime">
<param name="test.class" value="Plugins2TestSuite" />
<param name="portlet.plugins.includes" value="sample-localized-portlet,sample-orbeon-forms-portlet,sample-permissions-portlet,sample-php-portlet,sample-portal-client-portlet,sample-portal-service-portlet,sample-python-portlet,sample-ruby-portlet,sample-service-builder-portlet,sample-sign-in-portlet,sample-spring-portlet,sample-struts-liferay-portlet,sample-struts-portlet,sample-tapestry-portlet,sample-test-portlet,sample-ui-taglibs-portlet,sample-wap-portlet,sshterm-portlet,sshvnc-portlet,sun-bookmark-portlet,sun-elluminate-portlet,sun-flickr-portlet,sun-iframe-portlet,sun-mashup-portlet,sun-notepad-portlet,sun-photoshow-ajax-portlet,sun-privacy-guard-portlet,sun-rss-portlet,sun-showtime-portlet,sun-tour-ipc-portlet,sun-video-portlet,sun-weather-portlet,twitter-portlet,weather-portlet,webcam-portlet,westminster-catechism-portlet" />
</antcall>
<antelope:post to="http://localhost:4444/selenium-server/driver/?cmd=shutDown" wantresponse="false" />
</target>
<target name="test-tomcat-runtime">
<ant dir="sql" target="rebuild-mysql" inheritAll="false" />
<delete includeemptydirs="true" failonerror="false">
<fileset
dir="${app.server.deploy.dir}"
includes="*-portlet/**"
/>
</delete>
<if>
<not>
<equals arg1="${portlet.plugins.includes}" arg2="$${portlet.plugins.includes}" />
</not>
<then>
<antcall target="deploy-plugins">
<param name="plugin.types" value="portlets" />
<param name="plugins.includes" value="${portlet.plugins.includes}" />
</antcall>
</then>
</if>
<if>
<not>
<equals arg1="${theme.plugins.includes}" arg2="$${theme.plugins.includes}" />
</not>
<then>
<antcall target="deploy-plugins">
<param name="plugin.types" value="themes" />
<param name="plugins.includes" value="${theme.plugins.includes}" />
</antcall>
</then>
</if>
<parallel>
<exec dir="${app.server.tomcat.bin.dir}" executable="startup${file.suffix.bat}" resolveexecutable="true" spawn="true" />
<sequential>
<waitfor>
<http url="http://localhost:8080" />
</waitfor>
<sleep seconds="60" />
<if>
<equals arg1="${test.class}" arg2="PortalWebTestSuite" />
<then>
<ant dir="portal-impl" target="test-class" inheritAll="false">
<property name="class" value="ServiceHttpTestSuite" />
</ant>
<ant dir="portal-impl" target="test-class" inheritAll="false">
<property name="class" value="ServiceSoapTestSuite" />
</ant>
</then>
</if>
<ant dir="portal-web" target="test-class" inheritAll="false">
<property name="class" value="${test.class}" />
</ant>
<exec dir="${app.server.tomcat.bin.dir}" executable="shutdown${file.suffix.bat}" resolveexecutable="true" spawn="true" />
<sleep seconds="10" />
</sequential>
</parallel>
</target>
</project>