db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fuzzylo...@apache.org
Subject svn commit: r396705 - in /db/derby/code/trunk/java: testing/org/apache/derbyTesting/functionTests/harness/MultiTest.java tools/org/apache/derby/impl/tools/ij/mtTester.java
Date Mon, 24 Apr 2006 22:39:46 GMT
Author: fuzzylogic
Date: Mon Apr 24 15:39:39 2006
New Revision: 396705

URL: http://svn.apache.org/viewcvs?rev=396705&view=rev
Log:
DERBY-1230: Remove Tester*.out log files from stress.multi test run if there
are no errors.

Committed for Ole Solberg <Ole Solberg@sun.com>

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/MultiTest.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/mtTester.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/MultiTest.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/MultiTest.java?rev=396705&r1=396704&r2=396705&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/MultiTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/MultiTest.java
Mon Apr 24 15:39:39 2006
@@ -21,6 +21,7 @@
 package org.apache.derbyTesting.functionTests.harness;
 
 import java.io.IOException;
+import java.io.File;
 import java.io.FileOutputStream;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
@@ -157,6 +158,21 @@
 		log.println("test ran "+duration+" ms");
 		log.println("total memory is "+Runtime.getRuntime().totalMemory());
 		log.println("free memory  is "+Runtime.getRuntime().freeMemory());
+		// Delete the .out files for Testers that did not report errors.
+		for (i = 0; i < max; i++)
+		{
+			if ( testers[i].noFailure() )
+			{
+				log.println("Deleting " + "Tester" + (i+1) + ".out" + "(" + outputDir + ")");
+				File out = new File(outputDir, "Tester" + (i+1) + ".out");
+				out.delete();
+			}
+			else
+			{
+				log.println("Tester" + (i+1) + " failed.");
+			}
+		}
+        
 		System.exit(0);
 	}
 

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/mtTester.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/mtTester.java?rev=396705&r1=396704&r2=396705&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/mtTester.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/mtTester.java Mon Apr 24
15:39:39 2006
@@ -40,6 +40,7 @@
 	private LocalizedOutput	log;
 	private LocalizedOutput	out;
 	private boolean		stop = false;
+	private boolean   testOK = false;
 							
 	public mtTester(String name, mtTestSuite suite, LocalizedOutput out, LocalizedOutput log)
 	{ 
@@ -109,11 +110,16 @@
 		{
 			log.println(name + ": stopping on request after " + numIterations +
 						" iterations");
+			testOK = true;
 		}
 	}
 
 	public void stop()
 	{
 		stop = true;
+	}
+	public boolean noFailure()
+	{
+		return testOK;
 	}
 }



Mime
View raw message