You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
4.8 KiB
138 lines
4.8 KiB
<?xml version="1.0" encoding="UTF-8"?> |
|
<!-- |
|
Copyright 2010 SpringSource |
|
|
|
Licensed under the Apache License, Version 2.0 (the "License"); |
|
you may not use this file except in compliance with the License. |
|
You may obtain a copy of the License at |
|
|
|
http://www.apache.org/licenses/LICENSE-2.0 |
|
|
|
Unless required by applicable law or agreed to in writing, software |
|
distributed under the License is distributed on an "AS IS" BASIS, |
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
See the License for the specific language governing permissions and |
|
limitations under the License. |
|
--> |
|
<project name="quality-multi-bundle" xmlns:ivy="antlib:org.apache.ivy.ant"> |
|
|
|
<import file="common.xml"/> |
|
|
|
<!-- Main targets --> |
|
<target name="test" depends="jar, test.pre, test.do, test.post" |
|
description="Executes all tests resulting from a compilation of the test tree returning test success metrics."/> |
|
|
|
<target name="clover" depends="clover.pre, clover.do, clover.post" |
|
description="Executes all tests resulting from a compilation of the test tree returning test coverage metrics."/> |
|
|
|
<target name="findbugs" depends="findbugs.pre, findbugs.do" |
|
description="Checks all code from the source tree for bugs."/> |
|
|
|
<target name="osgi-validate" |
|
description="Checks all code from the source tree for bugs."> |
|
<all-bundles target="osgi-validate"/> |
|
</target> |
|
|
|
<!-- Other targets --> |
|
<target name="test.pre"> |
|
<delete quiet="true" dir="${test-results.output.dir}"/> |
|
<mkdir dir="${test-results.output.dir}/xml"/> |
|
</target> |
|
|
|
<target name="test.do"> |
|
<all-bundles target="test.do"> |
|
<property name="test-results.output.dir" value="${test-results.output.dir}"/> |
|
</all-bundles> |
|
</target> |
|
|
|
<target name="test.post"> |
|
<mkdir dir="${test-results.output.dir}/html"/> |
|
<junitreport> |
|
<fileset dir="${test-results.output.dir}/xml" erroronmissingdir="false"/> |
|
<report format="frames" todir="${test-results.output.dir}/html"/> |
|
</junitreport> |
|
<delete file="TESTS-TestSuites.xml"/> |
|
</target> |
|
|
|
<target name="clover.init" depends="ivy.init"> |
|
<ivy:cachepath resolveId="clover.classpath" pathid="clover.classpath" organisation="com.atlassian.clover" |
|
module="com.springsource.com.cenqua.clover" revision="${com.springsource.com.cenqua.clover.version}" |
|
conf="runtime" type="jar" inline="true" log="download-only"/> |
|
<taskdef resource="cloverlib.xml" classpathref="clover.classpath"/> |
|
</target> |
|
|
|
<target name="clover.pre" depends="clover.init"> |
|
<delete dir="${clover.output.dir}" quiet="true"/> |
|
<mkdir dir="${clover.db.dir}"/> |
|
</target> |
|
|
|
<target name="clover.do"> |
|
<condition property="has.unit.test.bundles"> |
|
<isreference refid="unit.test.bundles" /> |
|
</condition> |
|
<antcall target="clover.do.unit"/> |
|
<antcall target="clover.do.all" /> |
|
</target> |
|
|
|
<target name="clover.do.unit" if="has.unit.test.bundles"> |
|
<all-bundles target="clover" buildpathRef="unit.test.bundles"/> |
|
</target> |
|
|
|
<target name="clover.do.all" unless="has.unit.test.bundles"> |
|
<all-bundles target="clover" buildpathRef="bundles"/> |
|
</target> |
|
|
|
<target name="clover.post" depends="clover.init"> |
|
<clover-merge initString="${clover.db.file}"> |
|
<cloverDbSet dir="${basedir}/.." span="30m"> |
|
<include name="**/target/clover/db/clover.db"/> |
|
</cloverDbSet> |
|
</clover-merge> |
|
<clover-report initstring="${clover.db.file}"> |
|
<current outfile="${clover.output.dir}/clover.xml" span="30m"> |
|
<format type="xml"/> |
|
<testsources dir=".."> |
|
<include name="**/src/test/java/**/*.java"/> |
|
<include name="**/src/test/java/*.java"/> |
|
</testsources> |
|
</current> |
|
</clover-report> |
|
<clover-report initstring="${clover.db.file}"> |
|
<current outfile="${clover.output.dir}/html" span="30m"> |
|
<format type="html"/> |
|
<testsources dir=".."> |
|
<include name="**/src/test/java/**/*.java"/> |
|
<include name="**/src/test/java/*.java"/> |
|
</testsources> |
|
</current> |
|
</clover-report> |
|
<clover-report initstring="${clover.db.file}"> |
|
<current outfile="${clover.output.dir}/clover.pdf" summary="true" span="30m"> |
|
<format type="pdf"/> |
|
<testsources dir=".."> |
|
<include name="**/src/test/java/**/*.java"/> |
|
<include name="**/src/test/java/*.java"/> |
|
</testsources> |
|
</current> |
|
</clover-report> |
|
<clover-check initstring="${clover.db.file}" target="${clover.coverage}" haltOnFailure="${clover.enforce}" |
|
span="30m"> |
|
<testsources dir=".."> |
|
<include name="**/src/test/java/**/*.java"/> |
|
<include name="**/src/test/java/*.java"/> |
|
</testsources> |
|
</clover-check> |
|
</target> |
|
|
|
<target name="findbugs.pre"> |
|
<delete dir="${findbugs.output.dir}" quiet="true"/> |
|
<mkdir dir="${findbugs.output.dir}"/> |
|
</target> |
|
|
|
<target name="findbugs.do"> |
|
<all-bundles target="findbugs.do"> |
|
<property name="findbugs.output.dir" value="${findbugs.output.dir}"/> |
|
</all-bundles> |
|
</target> |
|
|
|
</project> |