db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fuzzylo...@apache.org
Subject svn commit: r405670 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: harness/RunTest.java tests/store/Beetle6038.java tests/tools/dblook_test.java
Date Wed, 10 May 2006 07:57:21 GMT
Author: fuzzylogic
Date: Wed May 10 00:57:19 2006
New Revision: 405670

URL: http://svn.apache.org/viewcvs?rev=405670&view=rev
Log:
DERBY-577: Test harness should not alter user.dir property

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Beetle6038.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java?rev=405670&r1=405669&r2=405670&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
Wed May 10 00:57:19 2006
@@ -2047,7 +2047,6 @@
 		// Why is this being done here
 		//if (jvm != null)
 		    //testJvmProps.addElement("jvm="+jvm.getName());
-		testJvmProps.addElement("user.dir="+userDirName);
 	}
 	
 	private static String[] buildTestCommand(String propString,
@@ -2308,7 +2307,6 @@
         throws Exception
     {
         // For platforms where executing a process is failing
-        String olduserdir = (String)sysProp.get("user.dir");
         Properties ptmp = System.getProperties();
         ptmp.put("derby.system.home", systemHome);
         ptmp.put("derby.infolog.append", "true");
@@ -2383,7 +2381,6 @@
         }
         else if (testType.equals("java"))
         {
-            sysProp.put("user.dir", outDir.getCanonicalPath());
 	    if (javaPath == null)
 	            javaPath = "org.apache.derbyTesting.functionTests.tests." + testDirName;
 	    
@@ -2426,7 +2423,6 @@
 			{
 				// ignore the errors, they are expected.
 			}
-    		sysProp.put("user.dir", olduserdir);
         }
         else if (testType.equals("multi"))
         {
@@ -2437,7 +2433,6 @@
             // And using a Thread.join() to start the tests doesn't resolve
             // this. So this support is here simply to allow running
             // something like stressmulti just by itself for debugging
-            //sysProp.put("user.dir", outDir.getCanonicalPath());
             //javaPath = "org.apache.derbyTesting.functionTests.harness.MultiTest";
             String[] args = new String[5];
             args[0] = scriptFileName;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Beetle6038.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Beetle6038.java?rev=405670&r1=405669&r2=405670&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Beetle6038.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Beetle6038.java
Wed May 10 00:57:19 2006
@@ -46,8 +46,9 @@
 
 		// read in the properties in the service.properties file of the db
 		Properties serviceProperties = new Properties();
-		File f = new File("Beetle6038/Beetle6038Db/service.properties");
-		serviceProperties.load(new FileInputStream(f.getAbsolutePath()));
+		String systemhome =  System.getProperty("derby.system.home");
+		File f = new File(systemhome + File.separatorChar + "Beetle6038Db" + File.separatorChar
+ "service.properties");
+		serviceProperties.load(new FileInputStream(f.getCanonicalPath()));
 
 		// check if the properties are set
 		checkProperty("data_encrypt_algorithm_version",serviceProperties);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test.java?rev=405670&r1=405669&r2=405670&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test.java
Wed May 10 00:57:19 2006
@@ -61,7 +61,7 @@
 	protected static final String dbCreationScript_2 = "dblook_makeDB_2.sql";
 	private static final char TEST_DELIMITER='#';
 
-	protected static String testDirectory = "dblook_test/";
+	protected static String testDirectory = "dblook_test";
 	protected static final String testDBName = "wombat";
 	protected static String separator;
 
@@ -150,7 +150,8 @@
 		createDBFromDDL(testDBName, scriptName);
 
 		// Figure out where our database directory is (abs path).
-		dbPath = (new File(testDirectory)).getAbsolutePath();
+		String systemhome = System.getProperty("derby.system.home");
+		dbPath = systemhome + File.separatorChar;
 		return;
 
 	}



Mime
View raw message