2011-07-08 02:41:23 -04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You 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="solr-test-framework" default="default">
|
|
|
|
<description>Solr Test Framework</description>
|
|
|
|
|
|
|
|
<import file="../common-build.xml"/>
|
|
|
|
|
2012-08-15 14:30:04 -04:00
|
|
|
<path id="solr.test.framework.lucene.libs">
|
|
|
|
<pathelement location="${test-framework.jar}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="classpath">
|
|
|
|
<fileset dir="lib" excludes="${common.classpath.excludes}"/>
|
|
|
|
<path refid="solr.test.framework.lucene.libs" />
|
|
|
|
<path refid="solr.base.classpath"/>
|
2011-07-08 02:41:23 -04:00
|
|
|
</path>
|
|
|
|
|
|
|
|
<!-- Redefine Lucene test-framework compilation here to avoid circular dependency on compile-core -->
|
|
|
|
<target name="compile-test-framework">
|
|
|
|
<ant dir="${common.dir}" target="compile-test-framework" inheritall="false">
|
|
|
|
<propertyset refid="uptodate.and.compiled.properties"/>
|
|
|
|
</ant>
|
|
|
|
</target>
|
|
|
|
|
2012-09-20 18:13:55 -04:00
|
|
|
<target name="compile-core" depends="resolve, compile-solr-core, compile-test-framework">
|
2011-07-08 02:41:23 -04:00
|
|
|
<compile srcdir="${src.dir}" destdir="${build.dir}/classes/java">
|
|
|
|
<classpath refid="test.base.classpath"/>
|
|
|
|
</compile>
|
|
|
|
</target>
|
2011-09-16 00:47:04 -04:00
|
|
|
|
2012-09-28 06:12:49 -04:00
|
|
|
<!-- redefine the clover setup, because we dont want to run clover for the test-framework -->
|
|
|
|
<target name="-clover.setup" if="run.clover"/>
|
|
|
|
|
2014-12-24 00:48:58 -05:00
|
|
|
<!-- redefine the test compilation, so it's just a no-op -->
|
2013-11-10 17:50:51 -05:00
|
|
|
<target name="compile-test"/>
|
|
|
|
|
|
|
|
<!-- redefine the forbidden apis for tests, as we check ourselves -->
|
|
|
|
<target name="-check-forbidden-tests" depends="-init-forbidden-apis,compile-core">
|
2015-04-20 12:26:26 -04:00
|
|
|
<forbidden-apis suppressAnnotation="**.SuppressForbidden" signaturesFile="${common.dir}/tools/forbiddenApis/tests.txt" classpathref="forbidden-apis.allclasses.classpath">
|
2013-11-10 17:50:51 -05:00
|
|
|
<fileset dir="${build.dir}/classes/java"/>
|
|
|
|
</forbidden-apis>
|
|
|
|
</target>
|
|
|
|
|
2012-08-15 14:30:04 -04:00
|
|
|
<!-- Override common-solr.javadocs to include JUnit links -->
|
2011-12-03 16:52:04 -05:00
|
|
|
<!-- and to copy the built javadocs to ${dest}/docs/api/test-framework -->
|
|
|
|
<target name="javadocs"
|
2014-07-28 11:36:27 -04:00
|
|
|
depends="compile-core,jar-test-framework,lucene-javadocs,javadocs-test-framework,define-lucene-javadoc-url,check-javadocs-uptodate" unless="javadocs-uptodate-${name}">
|
2011-12-03 16:52:04 -05:00
|
|
|
<sequential>
|
2012-09-20 11:37:42 -04:00
|
|
|
<mkdir dir="${javadoc.dir}/${name}"/>
|
2012-08-15 14:30:04 -04:00
|
|
|
<!-- NOTE: explicitly not using solr-invoke-javadoc, or attempting to
|
2015-08-11 19:00:39 -04:00
|
|
|
link to lucene-test-framework because if we did javadoc would
|
|
|
|
attempt to link class refs in in org.apache.lucene, causing
|
|
|
|
broken links. (either broken links to things like "Directory" if
|
|
|
|
lucene-test-framework was first, or broken links to things like
|
|
|
|
LuceneTestCase if lucene-core was first)
|
2012-08-15 14:30:04 -04:00
|
|
|
-->
|
2012-09-20 11:37:42 -04:00
|
|
|
<invoke-javadoc destdir="${javadoc.dir}/${name}"
|
2015-08-11 19:00:39 -04:00
|
|
|
title="${Name} ${version} Test Framework API">
|
|
|
|
<sources>
|
|
|
|
<link offline="true" href="${javadoc.link.junit}"
|
|
|
|
packagelistLoc="${javadoc.packagelist.dir}/junit"/>
|
|
|
|
<packageset dir="${src.dir}"/>
|
|
|
|
</sources>
|
2012-04-23 09:44:03 -04:00
|
|
|
</invoke-javadoc>
|
2012-09-20 11:37:42 -04:00
|
|
|
<solr-jarify basedir="${javadoc.dir}/${name}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
|
2011-12-03 16:52:04 -05:00
|
|
|
</sequential>
|
2011-09-16 00:47:04 -04:00
|
|
|
</target>
|
2013-10-13 17:04:31 -04:00
|
|
|
<target name="module-jars-to-solr"
|
|
|
|
depends="-module-jars-to-solr-not-for-package,-module-jars-to-solr-package"/>
|
|
|
|
<target name="-module-jars-to-solr-not-for-package" unless="called.from.create-package">
|
|
|
|
<antcall target="jar-test-framework" inheritall="true"/>
|
|
|
|
<property name="test-framework.uptodate" value="true"/>
|
|
|
|
<mkdir dir="${build.dir}/lucene-libs"/>
|
|
|
|
<copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
|
|
|
|
<path refid="solr.test.framework.lucene.libs" />
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
<target name="-module-jars-to-solr-package" if="called.from.create-package">
|
|
|
|
<antcall target="-unpack-lucene-tgz" inheritall="true"/>
|
2013-10-11 12:58:36 -04:00
|
|
|
<pathconvert property="relative.solr.test.framework.lucene.libs" pathsep=",">
|
|
|
|
<path refid="solr.test.framework.lucene.libs"/>
|
|
|
|
<globmapper from="${common.build.dir}/*" to="*" handledirsep="true"/>
|
|
|
|
</pathconvert>
|
2012-08-15 14:30:04 -04:00
|
|
|
<mkdir dir="${build.dir}/lucene-libs"/>
|
|
|
|
<copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
|
2013-10-11 12:58:36 -04:00
|
|
|
<fileset dir="${lucene.tgz.unpack.dir}/lucene-${version}" includes="${relative.solr.test.framework.lucene.libs}"/>
|
2012-08-15 14:30:04 -04:00
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="dist" depends="module-jars-to-solr, common-solr.dist">
|
|
|
|
<!-- we're not a contrib, our lucene-libs and go in a special place -->
|
|
|
|
<mkdir dir="${dist}/test-framework" />
|
|
|
|
<copy todir="${dist}/test-framework">
|
|
|
|
<fileset dir="${build.dir}">
|
2015-08-11 19:00:39 -04:00
|
|
|
<include name="lucene-libs/*.jar" />
|
2012-08-15 14:30:04 -04:00
|
|
|
</fileset>
|
|
|
|
<fileset dir=".">
|
2015-08-11 19:00:39 -04:00
|
|
|
<include name="lib/*" />
|
|
|
|
<include name="README.txt" />
|
2012-08-15 14:30:04 -04:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
2011-07-08 02:41:23 -04:00
|
|
|
</project>
|
|
|
|
|