forked from ec-europa/platform-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.test.xml
98 lines (91 loc) · 4.1 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
<?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>
</drush>
</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}"
report="${phpcs.report}"
showProgress="${phpcs.progress}"
showSniffCodes="${phpcs.sniffcodes}"
standard="${phpcs.standard}"
/>
</target>
<!-- Set up Behat. -->
<target name="setup-behat">
<copy todir="${behat.dir}">
<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="platform.build.dir" value="${platform.build.dir}" />
<token key="behat.subcontexts.path" value="${behat.subcontexts.path}" />
<token key="drush.bin" value="${drush.bin}" />
<token key="behat.formatter.name" value="${behat.formatter.name}" />
</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>
<!-- 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>
</project>