Changeset 1254

Show
Ignore:
Timestamp:
01/17/08 17:49:04 (7 months ago)
Author:
mikey
Message:

added transformation of reports from xml to html
run report generation only if xdebug is available and transformation explicitly requested (to slow to generate reports on every test run)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/stubbles/build.xml

    r1239 r1254  
    11<?xml version="1.0"?> 
    22<project name="stubbles" default="main"> 
     3  <property name="test.log" value="false"/> 
    34  <property name="build.base.dir" value="${stubbles.base.dir}/build/stubbles/build" override="true"/> 
    45  <property name="build.report.dir" value="${stubbles.base.dir}/build/stubbles/reports" override="true"/> 
     
    221222    <delete> 
    222223      <fileset dir="${build.report.dir}"> 
    223         <include name="**"/> 
     224        <include name="**/*"/> 
     225        <exclude name="**/api/*"/> 
     226        <exclude name="**/report.css"/> 
     227        <exclude name="**/report.js"/> 
    224228      </fileset> 
    225229    </delete> 
    226230    <phingcall target="test-preparation" /> 
    227     <exec passthru="true" command="phpunit --log-metrics ${build.report.dir}/metrics.xml --log-pmd ${build.report.dir}/pmd.xml --coverage-html ${build.report.dir}/coverage src_test_AllTests"/> 
     231    <php expression="extension_loaded('xdebug');" returnProperty="xdebug"/> 
     232    <if> 
     233      <and> 
     234        <istrue value="${xdebug}"/> 
     235        <istrue value="${test.log}"/> 
     236      </and> 
     237      <then> 
     238        <echo message="${build.report.dir}"/> 
     239        <exec passthru="true" command="phpunit --log-metrics ${build.report.dir}/metrics.xml --log-pmd ${build.report.dir}/pmd.xml --coverage-html ${build.report.dir}/coverage src_test_AllTests"/> 
     240        <xslt file="${build.report.dir}/pmd.xml" tofile="${build.report.dir}/pmd.html" style="${stubbles.base.dir}/build/stubbles/xsl/pmd.xsl"/> 
     241        <xslt file="${build.report.dir}/metrics.xml" tofile="${build.report.dir}/metrics.html" style="${stubbles.base.dir}/build/stubbles/xsl/metrics.xsl"/> 
     242      </then> 
     243      <else> 
     244        <exec passthru="true" command="phpunit src_test_AllTests"/> 
     245      </else> 
     246    </if> 
    228247  </target> 
    229248 
  • trunk/build/stubbles/reports

    • Property svn:ignore changed from
      pmd.xml
      pmd-cpd.xml
      metrics.xml
      to
      pmd.xml
      pmd-cpd.xml
      metrics.xml
      pmd.html
      metrics.html