db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fuzzylo...@apache.org
Subject svn commit: r395453 - in /db/derby/code/trunk: ./ java/testing/org/apache/derbyTesting/functionTests/master/ java/testing/org/apache/derbyTesting/functionTests/suites/ java/testing/org/apache/derbyTesting/functionTests/tests/tools/
Date Thu, 20 Apr 2006 00:42:45 GMT
Author: fuzzylogic
Date: Wed Apr 19 17:42:44 2006
New Revision: 395453

URL: http://svn.apache.org/viewcvs?rev=395453&view=rev
Log:
DERBY-1063: Modify derbyrunjartest to call org.apache.derby.iapi.run directly
if it is not in a jar file. Hook the test into the tools suite.

Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/derbyrunjartest.java

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/build.xml?rev=395453&r1=395452&r2=395453&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Wed Apr 19 17:42:44 2006
@@ -1132,6 +1132,9 @@
     	<section name="org/apache/derby/impl/tools/sysinfo/">
     	  <attribute name="Sealed" value="false"/>
     	</section>
+      	<section name="org/apache/derby/tools/">
+    	  <attribute name="Sealed" value="false"/>
+    	</section>
     </manifest> 
 
     <delete file="${derby.jar.dir}/derbynet.jar"/>
@@ -1181,6 +1184,9 @@
     <manifest file="${derby.jar.dir}/lists/smfclient.mf">
       	<attribute name="Sealed" value="true"/>
     	<section name="org/apache/derby/jdbc/">
+    	  <attribute name="Sealed" value="false"/>
+    	</section>
+      	<section name="org/apache/derby/tools">
     	  <attribute name="Sealed" value="false"/>
     	</section>
     </manifest> 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out?rev=395453&r1=395452&r2=395453&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out
Wed Apr 19 17:42:44 2006
@@ -1,8 +1,8 @@
-java -jar C:/derby-trunk/jars/sane/derbyrun.jar ij --help:
+ij --help:
 Usage: java org.apache.derby.tools.ij [-p propertyfile] [-ca connectionAttributePropertyFile]
[inputfile]
-java -jar C:/derby-trunk/jars/sane/derbyrun.jar sysinfo -cp help:
+sysinfo -cp help:
 USAGE: java org.apache.derby.tools.sysinfo -cp [ [ embedded ][ server ][ client] [ tools
] [  anyClass.class ] ]
-java -jar C:/derby-trunk/jars/sane/derbyrun.jar dblook:
+dblook:
  USAGE:
  java org.apache.derby.tools.dblook -d <sourceDBUrl> [OPTIONS]
  	where the source URL is the full URL, including the connection protocol
@@ -25,7 +25,7 @@
  	-o <filename> to specify the file name to which the generated DDL
  	 will be written.
  		If not specified, default is the console. 
-java -jar C:/derby-trunk/jars/sane/derbyrun.jar server:
+server:
 No arguments given.
 Usage: NetworkServerControl <commands> 
 Commands:

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall?rev=395453&r1=395452&r2=395453&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall
Wed Apr 19 17:42:44 2006
@@ -1,4 +1,5 @@
 tools/dblook_test.java
+tools/derbyrunjartest.java
 tools/importExport.java
 tools/importExportThruIJ.sql
 tools/ieptests.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/derbyrunjartest.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/derbyrunjartest.java?rev=395453&r1=395452&r2=395453&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/derbyrunjartest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/derbyrunjartest.java
Wed Apr 19 17:42:44 2006
@@ -20,6 +20,8 @@
 
 package org.apache.derbyTesting.functionTests.tests.tools;
 
+import java.io.File;
+import java.io.IOException;
 import java.lang.Process;
 import java.lang.Runtime;
 import java.lang.SecurityException;
@@ -30,7 +32,7 @@
 
 public class derbyrunjartest {
 
-    public static void main(String[] args)
+    public static void main(String[] args) throws IOException
     {
         // get location of run class.
         CodeSource cs = null;
@@ -41,9 +43,8 @@
         }
  
         URL result = cs.getLocation();
-     
-        if (!result.toString().startsWith("file:")) { exitNow(); } else
-        {
+
+        if (result.toString().endsWith(".jar")) {
             String derbyrunloc = result.toString().substring(5);
             if (System.getProperty("os.name").startsWith("Windows"))
               derbyrunloc = derbyrunloc.substring(1);
@@ -51,6 +52,22 @@
             runtool(derbyrunloc, "sysinfo -cp help");
             runtool(derbyrunloc, "dblook");
             runtool(derbyrunloc, "server");
+        } else {
+            String[] ij = {"ij", "--help"};
+            System.out.println("ij --help:");
+            org.apache.derby.iapi.tools.run.main(ij);
+
+            String[] sysinfo = {"sysinfo", "-cp", "help"}; 
+            System.out.println("sysinfo -cp help:");
+            org.apache.derby.iapi.tools.run.main(sysinfo);
+
+            String[] dblook = {"dblook"};
+            System.out.println("dblook:");
+            org.apache.derby.iapi.tools.run.main(dblook);
+
+            String[] server = {"server"};
+            System.out.println("server:");
+            org.apache.derby.iapi.tools.run.main(server);
         }
     }
 
@@ -59,7 +76,7 @@
         String command = "java -jar " + loc + ' ' + tool;
         Process pr = null;
 
-        System.out.println(command + ':');
+        System.out.println(tool + ':');
         try
         {
             pr = Runtime.getRuntime().exec(command);
@@ -75,10 +92,5 @@
                 pr = null;
             }
         }
-    }
-
-    public static void exitNow()
-    {
-        System.out.println("This test must be run from jar files. Exiting.");
     }
 }



Mime
View raw message