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

Revision 23594, 1.2 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  </target>
7
8  <target name="test" description="Run unit tests with PHPUnit">
9    <delete>
10      <fileset dir="data/cache">
11        <include name="*"/>
12      </fileset>
13    </delete>
14    <delete dir="reports" includeemptydirs="true" />
15    <mkdir dir="reports/coverage" />
16    <exec dir="." executable="phpunit" />
17  </target>
18  <target name="checkstyle" description="Find coding standard violations using PHP_CodeSniffer creating a log file for the continuous integration server">
19      <exec executable="phpcs" output="/dev/null">
20          <arg value="-v" />
21          <arg value="--report=checkstyle" />
22          <arg value="--standard=tests/ruleset.xml" />
23          <arg value="--extensions=php" />
24          <arg value="--ignore=data/Smarty,data/smarty_extends,data/cache,data/module,data/mtb_constants_init.php" />
25          <arg value="--report-file=reports/checkstyle.xml" />
26          <arg path="data/class/" />
27      </exec>
28  </target>
29</project>
Note: See TracBrowser for help on using the repository browser.