Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 92 lines (82 sloc) 2.931 kb
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="dolibarr" default="hudson" basedir=".">

<!-- Exclude/ignore paths -->
 <property name="ignorepaths" value="${basedir}/htdocs/conf,${basedir}/htdocs/core/filemanagerdol,${basedir}/htdocs/includes" />
 <property name="ignoreregexp" value="**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*" />
 
 <target name="clean">
  <!-- Clean up -->
  <delete dir="${basedir}/hudson"/>
  <delete dir="${basedir}/generatedJUnitFiles"/>

  <!-- Create build directories -->
  <mkdir dir="${basedir}/hudson/logs"/>
  <mkdir dir="${basedir}/hudson/coverage"/>
 </target>

 <!-- Run phpmd, phpcpd, phpcs, doxygen and phploc in parallel -->
 <target name="parallelTasks">
  <parallel>
   <!-- <antcall target="phpmd"/> -->
   <antcall target="phpcpd"/>
   <antcall target="phpcs"/>
   <antcall target="phploc"/>
  </parallel>
 </target>

 <!-- Generate pmd.xml -->
<!--
<target name="phpmd">
<exec executable="phpmd">
<arg line="htdocs xml codesize,unusedcode
-\-reportfile '${basedir}/hudson/logs/pmd.xml'
-\-ignore=${ignorepaths}
" />
</exec>
</target>
-->

 <!-- Generate pmd-cpd.xml -->
 <target name="phpcpd">
  <exec executable="phpcpd">
   <arg line=" --log-pmd '${basedir}/hudson/logs/pmd-cpd.xml'
--exclude '${basedir}/htdocs/conf'
--exclude '${basedir}/htdocs/core/filemanagerdol'
--exclude '${basedir}/htdocs/includes'
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
--min-tokens 70
--min-lines 20
htdocs
" />
  </exec>
 </target>
 
 <!-- Generate phploc.csv -->
 <target name="phploc">
  <exec executable="phploc">
   <arg line=" --log-csv '${basedir}/hudson/logs/phploc.csv'
--exclude '${basedir}/htdocs/conf'
--exclude '${basedir}/htdocs/core/filemanagerdol'
--exclude '${basedir}/htdocs/includes'
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
htdocs
" />
  </exec>
 </target>
   
 <!-- Generate checkstyle.xml -->
 <target name="phpcs">
  <exec executable="phpcs" dir="${basedir}" output="${basedir}/hudson/logs/checkstyle.xml">
    <arg line=" --standard=${basedir}/dev/codesniffer/jenkins_ruleset.xml
--report=checkstyle
--ignore=${ignorepaths},${ignoreregexp}
htdocs
"/>
  </exec>
 </target>
 
 <!-- Run unit tests and generate junit.xml and clover.xml -->
 <target name="phpunit">
  <exec executable="phpunit" dir="${basedir}" failonerror="true">
   <arg line=" --configuration ${basedir}/test/phpunit/jenkins_phpunittest.xml
--log-junit ${basedir}/hudson/logs/junit.xml
--coverage-clover ${basedir}/hudson/coverage/clover.xml
--coverage-html ${basedir}/hudson/coverage/
test/phpunit/AllTests.php
"/>
  </exec>
 </target>

 <target name="hudson" depends="clean,phpunit,parallelTasks"/>
</project>
Something went wrong with that request. Please try again.