aboutsummaryrefslogtreecommitdiffstats
path: root/code_sniffer
diff options
context:
space:
mode:
authorManuel Pichler <mapi@phpundercontrol.org>2008-03-14 20:21:03 +0000
committerManuel Pichler <mapi@phpundercontrol.org>2008-03-14 20:21:03 +0000
commit9b96e126789c6191ac3d99a70f53cbf0677f5a9b (patch)
tree2dcf1c32b81c2391453d9d0bdba79b6006bd88a2 /code_sniffer
parentd1f48526d741a8d9f634213f1e48f539809203a6 (diff)
downloadforums-9b96e126789c6191ac3d99a70f53cbf0677f5a9b.tar
forums-9b96e126789c6191ac3d99a70f53cbf0677f5a9b.tar.gz
forums-9b96e126789c6191ac3d99a70f53cbf0677f5a9b.tar.bz2
forums-9b96e126789c6191ac3d99a70f53cbf0677f5a9b.tar.xz
forums-9b96e126789c6191ac3d99a70f53cbf0677f5a9b.zip
- Initial commit of an ant build file that helps to execute the test suite
for this code sniffer standard implementation. git-svn-id: file:///svn/phpbb/trunk@8434 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'code_sniffer')
-rw-r--r--code_sniffer/build.xml46
1 files changed, 46 insertions, 0 deletions
diff --git a/code_sniffer/build.xml b/code_sniffer/build.xml
new file mode 100644
index 0000000000..df200bd821
--- /dev/null
+++ b/code_sniffer/build.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="code_sniffer" basedir="." default="phpunit">
+
+ <property name="cvs.module" value="pear/PHP_CodeSniffer" />
+ <property name="working.dir" value="/tmp/phpcs-test" />
+ <property name="test.coverage" value="/tmp/phpcs-cov" />
+
+ <target name="phpunit" depends="update,prepare">
+ <exec executable="phpunit">
+ <arg line="--coverage-html ${test.coverage}
+ PHP_CodeSniffer_AllTests
+ ${working.dir}/${cvs.module}/tests/AllTests.php" />
+ </exec>
+ </target>
+
+ <target name="prepare">
+ <delete dir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpBB" />
+ <copy todir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpBB">
+ <fileset dir="${basedir}/Sniffs" />
+ </copy>
+
+ <delete dir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpBB/Tests" />
+ <copy todir="${working.dir}/${cvs.module}/CodeSniffer/Standards/phpBB/Tests">
+ <fileset dir="${basedir}/Tests" />
+ </copy>
+ </target>
+
+ <target name="cleanup">
+ <delete dir="${working.dir}" />
+ </target>
+
+ <target name="update">
+ <exec executable="cvs" dir="${working.dir}/${cvs.module}">
+ <arg line="up" />
+ </exec>
+ </target>
+
+ <target name="checkout" depends="cleanup">
+ <cvspass cvsroot=":pserver:cvsread@cvs.php.net:/repository" password="phpfi" />
+ <cvs cvsRoot=":pserver:cvsread@cvs.php.net:/repository"
+ package="${cvs.module}"
+ dest="${working.dir}" />
+ </target>
+
+
+</project>