source: branches/version-2_13-dev/build.xml @ 23318

Revision 23318, 1.6 KB checked in by kimoto, 10 years ago (diff)

#150 (ユニットテスト環境の整備)

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="EC-CUBE" basedir="." default="test">
3  <!-- Jenkins上でのみ実行するタスク -->
4  <target name="prepare-jenkins">
5    <copy overwrite="true" file="data/config/config.php.jenkins" tofile="data/config/config.php"/>
6    <copy overwrite="true" file="tests/phpunit.xml.jenkins" tofile="tests/phpunit.xml"/>
7  </target>
8
9  <target name="test">
10    <delete>
11      <fileset dir="data/cache">
12        <include name="*"/>
13      </fileset>
14    </delete>
15    <delete dir="reports" includeemptydirs="true" />
16    <mkdir dir="reports/coverage" />
17    <exec dir="."
18      output="reports/stdout.log"
19      error="reports/stderr.log"
20      command="phpunit --log-tap reports/tap.log
21               --log-junit reports/unitreport.xml
22                       --coverage-html reports/coverage
23                       --coverage-clover reports/coverage/coverage.xml
24                       --configuration tests/phpunit.xml
25                       tests/" />
26  </target>
27  <target name="phpcs-ci" description="Find coding standard violations using PHP_CodeSniffer creating a log file for the continuous integration server">
28      <exec executable="phpcs" failonerror="off">
29          <arg line="-v
30              --report-checkstyle=${basedir}/reports/checkstyle.xml
31              --standard=${basedir}/tests/ruleset.xml
32              --extensions=php
33              --ignore=${basedir}/data/Smarty,${basedir}/data/smarty_extends,${basedir}/data/cache,${basedir}/data/module,${basedir}/data/mtb_constants_init.php
34              ./data/" />
35      </exec>
36  </target>
37</project>
Note: See TracBrowser for help on using the repository browser.