-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
36 lines (31 loc) · 894 Bytes
/
build.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
<project name="testprj" default="build">
<target name="build" depends="test"/>
<target name="test">
<phpunit haltonfailure="true" printsummary="true">
<batchtest>
<fileset dir=".">
<include name="*Test.php"/>
</fileset>
</batchtest>
</phpunit>
</target>
<target name="ctest">
<adhoc-task name="watch"><![CDATA[
$fd = inotify_init();
$wd = inotify_add_watch($fd, '.', IN_MODIFY);
while($events = inotify_read($fd)){
$aInterestedEvents = array_filter(
$events,
function($item){
return preg_match("/\.php$/", $item['name']);
});
if(!empty($aInterestedEvents)){
inotify_rm_watch($fd, $wd);
passthru("phing test");
$wd = inotify_add_watch($fd, '.', IN_MODIFY);
}
}
]]>
</adhoc-task>
</target>
</project>