SOLR-5022: Make it possible to disable HDFS tests on ANT command line (so ASF Jenkins can use it). Windows is disabled by default, too.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1501278 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2013-07-09 14:08:48 +00:00
parent e52e98e2f7
commit 2734af0c56
3 changed files with 9 additions and 4 deletions

View File

@ -968,6 +968,7 @@
<propertyref prefix="tests.badapples" />
<propertyref prefix="tests.timeoutSuite" />
<propertyref prefix="tests.jettyConnector" />
<propertyref prefix="tests.disableHdfs" />
</syspropertyset>
<!-- Pass randomized settings to the forked JVM. -->

View File

@ -123,6 +123,12 @@
</sequential>
</macrodef>
<!-- we don't want to run HDFS tests on Windows, because they require Cygwin.
If you have Cygwin, you can override this property on command line: -->
<condition property="tests.disableHdfs" value="true">
<os family="windows"/>
</condition>
<target name="validate" depends="compile-tools">
</target>

View File

@ -7,7 +7,6 @@ import java.util.Locale;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.Constants;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.solr.SolrTestCaseJ4;
import org.junit.Assert;
@ -34,9 +33,8 @@ public class HdfsTestUtil {
private static Locale savedLocale;
public static MiniDFSCluster setupClass(String dataDir) throws Exception {
LuceneTestCase.assumeFalse("HDFS tests on Windows require Cygwin", Constants.WINDOWS);
LuceneTestCase.assumeFalse("HDFS do not work well with FreeBSD blackhole setup", Constants.FREE_BSD);
// LuceneTestCase.assumeFalse("HDFS tests on Windows require Cygwin", Constants.F);
LuceneTestCase.assumeFalse("HDFS tests were disabled by -Dtests.disableHdfs",
Boolean.parseBoolean(System.getProperty("tests.disableHdfs", "false")));
File dir = new File(dataDir);
new File(dataDir).mkdirs();