Skip to content

Commit 6f15d83

Browse files
committedMay 8, 2022
Modernize build.xml
Summary: Switch tools declared in composer.json from system to Composer version. That fixes compatibility issues, and .phar packaging issues. Run correctly phpunit so build.xml can also be used in local, not only on Jenkins loading dynamically XDebug. Ref T1731. Test Plan: `ant` Reviewers: DorianWinty Reviewed By: DorianWinty Maniphest Tasks: T1731 Differential Revision: https://devcentral.nasqueron.org/D2683
1 parent 5365c19 commit 6f15d83

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed
 

‎build.xml

+6-10
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@
22
<project name="notifications" default="full-build">
33
<!-- By default, we assume all tools to be on the $PATH -->
44
<property name="composer" value="composer"/>
5-
<property name="pdepend" value="pdepend"/>
65
<property name="phpcpd" value="phpcpd"/>
7-
<property name="phpcs" value="phpcs"/>
86
<property name="phpdox" value="phpdox"/>
97
<property name="phploc" value="phploc"/>
10-
<property name="phpmd" value="phpmd"/>
11-
<property name="phpunit" value="phpunit"/>
128

13-
<!-- Use this when the tools are managed by Composer in ${basedir}/vendor/bin
9+
<!-- Some tools are managed by Composer. -->
1410
<property name="pdepend" value="${basedir}/vendor/bin/pdepend"/>
15-
<property name="phpcpd" value="${basedir}/vendor/bin/phpcpd"/>
1611
<property name="phpcs" value="${basedir}/vendor/bin/phpcs"/>
17-
<property name="phpdox" value="${basedir}/vendor/bin/phpdox"/>
18-
<property name="phploc" value="${basedir}/vendor/bin/phploc"/>
1912
<property name="phpmd" value="${basedir}/vendor/bin/phpmd"/>
20-
<property name="phpunit" value="${basedir}/vendor/bin/phpunit"/> -->
13+
<property name="phpunit" value="${basedir}/vendor/bin/phpunit"/>
2114

2215
<target name="full-build"
2316
depends="prepare,static-analysis,phpunit,phpdox,-check-failure"
@@ -233,7 +226,10 @@
233226
unless="phpunit.done"
234227
depends="prepare"
235228
description="Run unit tests with PHPUnit">
236-
<exec executable="${phpunit}" resultproperty="result.phpunit" taskname="phpunit">
229+
<exec executable="php" resultproperty="result.phpunit" taskname="phpunit">
230+
<arg value="-dzend_extension=xdebug.so" />
231+
<arg value="-dxdebug.mode=coverage" />
232+
<arg value="${phpunit}" />
237233
<arg value="--configuration"/>
238234
<arg path="${basedir}/phpunit.xml"/>
239235
</exec>

0 commit comments

Comments
 (0)
Please sign in to comment.