forked from ec-europa/platform-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.test.xml
169 lines (159 loc) · 7.23 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
<?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>
<!-- Rebuild node access after site installation -->
<phingcall target="rebuild-node-access" />
</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="platform.build.dir" value="${platform.build.dir}" />
<token key="behat.subcontexts.path" value="${behat.subcontexts.path}" />
<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}"
/>
</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>
</project>