take 2: only report environment info once, even if multiple methods fail

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1058288 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-01-12 19:42:03 +00:00
parent 6076f10d42
commit e3a854a1a3
1 changed files with 10 additions and 10 deletions

View File

@ -390,6 +390,16 @@ public abstract class LuceneTestCase extends Assert {
if (testsFailed) {
System.err.println("NOTE: all tests run in this JVM:");
System.err.println(Arrays.toString(testClassesRun.toArray()));
System.err.println("NOTE: " + System.getProperty("os.name") + " "
+ System.getProperty("os.version") + " "
+ System.getProperty("os.arch") + "/"
+ System.getProperty("java.vendor") + " "
+ System.getProperty("java.version") + " "
+ (Constants.JRE_IS_64BIT ? "(64-bit)" : "(32-bit)") + "/"
+ "cpus=" + Runtime.getRuntime().availableProcessors() + ","
+ "threads=" + Thread.activeCount() + ","
+ "free=" + Runtime.getRuntime().freeMemory() + ","
+ "total=" + Runtime.getRuntime().totalMemory());
}
}
@ -1014,16 +1024,6 @@ public abstract class LuceneTestCase extends Assert {
System.err.println("NOTE: reproduce with: ant test -Dtestcase=" + getClass().getSimpleName()
+ " -Dtestmethod=" + getName() + " -Dtests.seed=" + new TwoLongs(staticSeed, seed)
+ reproduceWithExtraParams());
System.err.println("NOTE: " + System.getProperty("os.name") + " "
+ System.getProperty("os.version") + " "
+ System.getProperty("os.arch") + "/"
+ System.getProperty("java.vendor") + " "
+ System.getProperty("java.version") + " "
+ (Constants.JRE_IS_64BIT ? "(64-bit)" : "(32-bit)") + "/"
+ "cpus=" + Runtime.getRuntime().availableProcessors() + ","
+ "threads=" + Thread.activeCount() + ","
+ "free=" + Runtime.getRuntime().freeMemory() + ","
+ "total=" + Runtime.getRuntime().totalMemory());
}
// extra params that were overridden needed to reproduce the command