-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathbuild.test.xml
244 lines (232 loc) · 10.7 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<?xml version="1.0" encoding="UTF-8" ?>
<project name="NextEuropa" default="help">
<!-- Install the platform. -->
<target name="install-platform" description="Install the platform.">
<drush
command="site-install"
assume="yes"
root="${platform.build.dir}"
bin="${drush.bin}"
verbose="${drush.verbose}">
<option name="db-url" value="${drupal.db.url}"/>
<option name="site-name" value="${platform.site.name}"/>
<option name="account-name" value="${drupal.admin.username}"/>
<option name="account-pass" value="${drupal.admin.password}"/>
<option name="account-mail" value="${drupal.admin.email}"/>
<param>${platform.profile.name}</param>
<!-- Prevent e-mails from being sent during the installation. -->
<param>install_configure_form.update_status_module='array(FALSE,FALSE)'</param>
<!-- Setup default theme. -->
<param>cce_basic_config_profile_theme_default_form.theme_default=${platform.site.theme_default}</param>
</drush>
<!-- Enable the "Database logging" module needed to develop and to run the platform behat tests (NEPT-308). -->
<phingcall target="enable-dblog-module" />
<!-- Modify the settings.php file. -->
<phingcall target="update-settings" />
<!-- Rebuild node access after site installation -->
<phingcall target="rebuild-node-access" />
</target>
<!-- Update settings. -->
<target name="update-settings">
<if>
<istrue value="${drupal.settings.append.text}" />
<then>
<chmod file="${platform.build.settings.dir}/settings.php" mode="0644" />
<append destfile="${platform.build.settings.dir}/settings.php" text="${drupal.settings.append.text}" />
</then>
</if>
<if>
<and>
<istrue value="${drupal.settings.append.poetry}" />
<istrue value="${poetry_service.address}" />
<istrue value="${poetry_service.method}" />
<istrue value="${poetry_service.callback_address}" />
</and>
<then>
<chmod file="${platform.build.settings.dir}/settings.php" mode="0644" />
<append destfile="${platform.build.settings.dir}/settings.php" text="${drupal.settings.append.poetry}" />
</then>
</if>
</target>
<!-- Set up PHP CodeSniffer. -->
<target name="setup-php-codesniffer" description="Generate the configuration file for PHP CodeSniffer.">
<if>
<available file="${phpcs.config}" type="file" property="phpcs.config.available" />
<then>
<echo message="Deleting existing PHP Codesniffer default configuration file." />
<delete file="${phpcs.config}" failonerror="false" />
</then>
</if>
<if>
<available file="${phpcs.global.config}" type="file" property="phpcs.global.config.available" />
<then>
<echo message="Deleting existing PHP Codesniffer global configuration file." />
<delete file="${phpcs.global.config}" failonerror="false" />
</then>
</if>
<phpcodesnifferconfiguration
configFile="${phpcs.config}"
extensions="${phpcs.extensions}"
files="${phpcs.files}"
globalConfig="${phpcs.global.config}"
ignorePatterns="${phpcs.ignore}"
installedPaths="${phpcs.installed.paths}"
ignoreWarnings = "${phpcs.ignore.warnings}"
report="${phpcs.report}"
showProgress="${phpcs.progress}"
showSniffCodes="${phpcs.sniffcodes}"
standards="${phpcs.standards}"
/>
</target>
<!-- Set up Behat. -->
<target name="setup-behat">
<if>
<isset property="env.FLICKR_KEY" />
<then>
<property name="flickr.key" value="${env.FLICKR_KEY}" override="true" />
</then>
</if>
<if>
<isset property="env.FLICKR_SECRET" />
<then>
<property name="flickr.secret" value="${env.FLICKR_SECRET}" override="true" />
</then>
</if>
<copy todir="${behat.dir}" overwrite="true">
<fileset dir="${behat.dir}" casesensitive="yes">
<include name="*.yml.dist"/>
</fileset>
<filterchain>
<replacetokens begintoken="{{ " endtoken=" }}">
<token key="behat.base_url" value="${behat.base_url}" />
<token key="behat.wd_host.url" value="${behat.wd_host.url}" />
<token key="behat.browser.name" value="${behat.browser.name}" />
<token key="behat.poetry.host" value="${behat.poetry.host}" />
<token key="behat.poetry.port" value="${behat.poetry.port}" />
<token key="behat.poetry.endpoint" value="${behat.poetry.endpoint}" />
<token key="behat.poetry.wsdl" value="${behat.poetry.wsdl}" />
<token key="behat.poetry.username" value="${behat.poetry.username}" />
<token key="behat.poetry.password" value="${behat.poetry.password}" />
<token key="platform.build.dir" value="${platform.build.dir}" />
<token key="behat.screenshots.path" value="${behat.screenshots.path}" />
<token key="behat.subcontexts.path" value="${behat.subcontexts.path}" />
<token key="behat.solr.host" value="${behat.solr.host}" />
<token key="behat.solr.port" value="${behat.solr.port}" />
<token key="flickr.key" value="${flickr.key}" />
<token key="flickr.secret" value="${flickr.secret}" />
<token key="drush.bin" value="${drush.bin}" />
<token key="drush.db.dump" value="${drush.db.dump}" />
<token key="behat.formatter.name" value="${behat.formatter.name}" />
<token key="integration.server.port" value="${integration.server.port}" />
<token key="varnish.server.port" value="${varnish.server.port}" />
</replacetokens>
</filterchain>
<mapper type="glob" from="*.yml.dist" to="*.yml" />
</copy>
<symlink link="${phing.project.build.dir}" overwrite="true">
<fileset dir="${behat.dir}" casesensitive="yes">
<include name="*.yml"/>
</fileset>
</symlink>
<symlink link="${phing.project.build.dir}/features" target="../tests/features" />
<symlink link="${phing.project.build.dir}/tests" target="../tests" />
<symlink link="bin/behat" target="../${phing.project.build.dir}/vendor/bin/behat" overwrite="true"/>
</target>
<!-- Set up Behat balancer. -->
<target name="setup-behat-balancer">
<behat:balancer
containers="${behat.load_balancer.containers}"
root="${behat.load_balancer.root}"
destination="${behat.load_balancer.destination}"
import="${behat.load_balancer.import}"
>
<filters profile="default">
<tags><![CDATA[ ~@wip&&~@communities&&~@ec_resp_theme&&~@theme_wip ]]></tags>
</filters>
<filters profile="standard_ec_resp">
<tags><![CDATA[ ~@wip&&~@ec_europa_theme&&~@communities ]]></tags>
</filters>
</behat:balancer>
<behat:balancer
containers="1"
root="${behat.load_balancer.root}"
destination="${behat.load_balancer.destination}"
import="${behat.load_balancer.import}"
>
<filters profile="communities">
<tags><![CDATA[ ~@wip&&~@ec_resp_theme&&~@theme_wip&&@communities ]]></tags>
</filters>
</behat:balancer>
<behat:balancer
containers="1"
root="${behat.load_balancer.root}"
destination="${behat.load_balancer.destination}"
import="${behat.load_balancer.import}"
>
<filters profile="communities_ec_resp">
<tags><![CDATA[ ~@wip&&~@ec_europa_theme&&@communities ]]></tags>
</filters>
</behat:balancer>
</target>
<!-- Run Behat tests. -->
<target name="behat" description="Run Behat tests.">
<foreach param="filename" absparam="config" target="behat-suite">
<fileset dir="${behat.dir}">
<include name="*.yml"/>
</fileset>
</foreach>
</target>
<target name="behat-suite" description="Run Behat tests suite.">
<behat
executable="${behat.bin}"
config="${config}"
strict="${behat.options.strict}"
verbose="${behat.options.verbosity}"
/>
</target>
<!-- Set up PHPUnit. -->
<target name="setup-phpunit">
<copy todir="${phpunit.dir}" overwrite="true">
<fileset dir="${phpunit.dir}" casesensitive="yes">
<include name="*.xml.dist"/>
</fileset>
<filterchain>
<replacetokens begintoken="{{ " endtoken=" }}">
<token key="phpunit.base_url" value="${phpunit.base_url}" />
<token key="platform.build.dir" value="${platform.build.dir}" />
<token key="phpunit.dir" value="${phpunit.dir}" />
</replacetokens>
</filterchain>
<mapper type="glob" from="*.xml.dist" to="*.xml" />
</copy>
<symlink link="${phing.project.build.dir}" overwrite="true">
<fileset dir="${phpunit.dir}" casesensitive="yes">
<include name="*.yml"/>
</fileset>
</symlink>
<symlink link="${phing.project.build.dir}/tests" target="../tests" />
<symlink link="bin/phpunit" target="../${phing.project.build.dir}/vendor/bin/phpunit" overwrite="true"/>
</target>
<!-- Rebuild node access. -->
<target name="rebuild-node-access">
<drush
command="php-eval"
assume="yes"
root="${platform.build.dir}"
bin="${drush.bin}"
verbose="${drush.verbose}">
<param>"node_access_rebuild()"</param>
</drush>
</target>
<!-- Enable the "Database logging" module. -->
<target name="enable-dblog-module">
<drush
command="pm-enable"
assume="yes"
root="${platform.build.dir}"
bin="${drush.bin}"
verbose="${drush.verbose}">
<param>"dblog"</param>
</drush>
</target>
</project>