You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2007/10/07 01:56:07 UTC

svn commit: r582561 - /jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java

Author: sebb
Date: Sat Oct  6 16:56:06 2007
New Revision: 582561

URL: http://svn.apache.org/viewvc?rev=582561&view=rev
Log:
Set JMeterHome from user.dir

Modified:
    jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java

Modified: jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java?rev=582561&r1=582560&r2=582561&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java Sat Oct  6 16:56:06 2007
@@ -18,6 +18,7 @@
 
 package org.apache.jorphan.test;
 
+import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -130,9 +131,11 @@
 			System.out.println("You must specify a comma-delimited list of paths to search " + "for unit tests");
 			System.exit(0);
 		}
+		String home=new File(System.getProperty("user.dir")).getParent();
+		System.out.println("Setting JMeterHome: "+home);
+		JMeterUtils.setJMeterHome(home);
 		initializeLogging(args);
 		initializeManager(args);
-		// end : added - 11 July 2001
 
 		log.info("JMeterVersion="+JMeterUtils.getJMeterVersion());
 		logprop("java.version", true);
@@ -215,7 +218,7 @@
 		TestRunner.run(suite);
 		// ++
 		// Recheck settings:
-		System.out.println("+++++++++++");
+		//System.out.println("+++++++++++");
 		// System.out.println(e+"="+System.getProperty(e));
 		// System.out.println(g+"="+System.getProperty(g));
 		// System.out.println("Headless?
@@ -230,7 +233,7 @@
 		// } catch (java.lang.InternalError e1){
 		// System.out.println("Error with class "+n+" "+e1);
 		// }
-		System.out.println("------------");
+		//System.out.println("------------");
 		// --
 		System.exit(0);
 	}
@@ -270,7 +273,13 @@
 				UnitTestManager um = (UnitTestManager) Class.forName(args[2]).newInstance();
 				System.out.println("Setting up initial properties using: " + args[1]);
 				um.initializeProperties(args[1]);
-			} catch (Exception e) {
+			} catch (ClassNotFoundException e) {
+				System.out.println("Couldn't create: " + args[2]);
+				e.printStackTrace();
+			} catch (InstantiationException e) {
+				System.out.println("Couldn't create: " + args[2]);
+				e.printStackTrace();
+			} catch (IllegalAccessException e) {
 				System.out.println("Couldn't create: " + args[2]);
 				e.printStackTrace();
 			}



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org