You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2010/12/22 14:51:28 UTC
svn commit: r1051902 - in /lucene/dev/branches/branch_3x: ./ lucene/
lucene/src/test/org/apache/lucene/util/LuceneJUnitResultFormatter.java solr/
Author: rmuir
Date: Wed Dec 22 13:51:28 2010
New Revision: 1051902
URL: http://svn.apache.org/viewvc?rev=1051902&view=rev
Log:
add a hack (sorry) to print out if entire test classes are @Ignored
Modified:
lucene/dev/branches/branch_3x/ (props changed)
lucene/dev/branches/branch_3x/lucene/ (props changed)
lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/util/LuceneJUnitResultFormatter.java
lucene/dev/branches/branch_3x/solr/ (props changed)
Modified: lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/util/LuceneJUnitResultFormatter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/util/LuceneJUnitResultFormatter.java?rev=1051902&r1=1051901&r2=1051902&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/util/LuceneJUnitResultFormatter.java (original)
+++ lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/util/LuceneJUnitResultFormatter.java Wed Dec 22 13:51:28 2010
@@ -35,6 +35,7 @@ import org.apache.tools.ant.taskdefs.opt
import org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner;
import org.apache.tools.ant.util.FileUtils;
import org.apache.tools.ant.util.StringUtils;
+import org.junit.Ignore;
/**
* Just like BriefJUnitResultFormatter "brief" bundled with ant,
@@ -151,6 +152,18 @@ public class LuceneJUnitResultFormatter
.append(StringUtils.LINE_SEP);
}
+ // HACK: junit gives us no way to do this in LuceneTestCase
+ try {
+ Class<?> clazz = Class.forName(suite.getName());
+ Ignore ignore = clazz.getAnnotation(Ignore.class);
+ if (ignore != null) {
+ if (systemError == null) systemError = "";
+ systemError += "NOTE: Ignoring test class '" + clazz.getSimpleName() + "': "
+ + ignore.value() + StringUtils.LINE_SEP;
+ }
+ } catch (ClassNotFoundException e) { /* no problem */ }
+ // END HACK
+
if (systemError != null && systemError.length() > 0) {
append("------------- Standard Error -----------------")
.append(StringUtils.LINE_SEP)