diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-09-30 12:39:21 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-09-30 12:39:21 +0200 |
commit | 739d57852596990fd32e7a1dd2e19ced3da6e738 (patch) | |
tree | 1509d250a37c8fc983077c71f0d879cf4f4dc454 /connectivity | |
parent | dba34b: syntax (diff) | |
download | core-739d57852596990fd32e7a1dd2e19ced3da6e738.tar.gz core-739d57852596990fd32e7a1dd2e19ced3da6e738.zip |
dba34b: step 1 of including the complex tests herein in a default build, and making them runnable with a single command
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/prj/build.lst | 2 | ||||
-rw-r--r-- | connectivity/qa/complex/dbase/.nbattrs (renamed from connectivity/qa/drivers/dbase/.nbattrs) | 0 | ||||
-rw-r--r-- | connectivity/qa/complex/dbase/DBaseDateFunctions.java (renamed from connectivity/qa/drivers/dbase/DBaseDateFunctions.java) | 2 | ||||
-rw-r--r-- | connectivity/qa/complex/dbase/DBaseDriverTest.java (renamed from connectivity/qa/drivers/dbase/DBaseDriverTest.java) | 24 | ||||
-rw-r--r-- | connectivity/qa/complex/dbase/DBaseNumericFunctions.java (renamed from connectivity/qa/drivers/dbase/DBaseNumericFunctions.java) | 2 | ||||
-rwxr-xr-x | connectivity/qa/complex/dbase/DBaseSqlTests.java (renamed from connectivity/qa/drivers/dbase/DBaseSqlTests.java) | 2 | ||||
-rw-r--r-- | connectivity/qa/complex/dbase/DBaseStringFunctions.java (renamed from connectivity/qa/drivers/dbase/DBaseStringFunctions.java) | 2 | ||||
-rw-r--r-- | connectivity/qa/complex/hsqldb/DatabaseMetaData.java (renamed from connectivity/qa/drivers/hsqldb/DatabaseMetaData.java) | 2 | ||||
-rw-r--r-- | connectivity/qa/complex/hsqldb/DriverTest.java (renamed from connectivity/qa/drivers/hsqldb/DriverTest.java) | 15 | ||||
-rw-r--r-- | connectivity/qa/complex/hsqldb/TestCacheSize.java (renamed from connectivity/qa/drivers/hsqldb/TestCacheSize.java) | 10 | ||||
-rw-r--r-- | connectivity/qa/complex/jdbc/LongVarCharTest.java (renamed from connectivity/qa/drivers/jdbc/LongVarCharTest.java) | 3 | ||||
-rw-r--r-- | connectivity/qa/connectivity_all.sce | 3 | ||||
-rw-r--r-- | connectivity/qa/drivers/dbase/makefile.mk | 64 | ||||
-rw-r--r-- | connectivity/qa/drivers/dbase/test.properties | 5 | ||||
-rw-r--r-- | connectivity/qa/makefile.mk (renamed from connectivity/qa/drivers/jdbc/makefile.mk) | 31 |
15 files changed, 42 insertions, 125 deletions
diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst index 0b15c06acf15..e9b99383780f 100644 --- a/connectivity/prj/build.lst +++ b/connectivity/prj/build.lst @@ -28,5 +28,5 @@ cn connectivity\source\parse nmake - all cn_parse cn_ cn connectivity\source\simpledbt nmake - all cn_simpledbt cn_cmtools cn_inc NULL cn connectivity\source\dbtools nmake - all cn_dbtools cn_simpledbt cn_cmtools cn_parse cn_res cn_sdbcx cn_inc cn_res NULL cn connectivity\qa\connectivity\tools nmake - all cn_qa_tools cn_inc NULL +cn connectivity\qa nmake - all cn_qa cn_inc NULL cn connectivity\util nmake - all cn_util cn_ado cn_mozab cn_kab cn_evoab2 cn_calc cn_odbc cn_mysql cn_jdbc cn_adabas cn_flat cn_dbase cn_hsqldb cn_macab NULL - diff --git a/connectivity/qa/drivers/dbase/.nbattrs b/connectivity/qa/complex/dbase/.nbattrs index 1ea7ed0bd8e6..1ea7ed0bd8e6 100644 --- a/connectivity/qa/drivers/dbase/.nbattrs +++ b/connectivity/qa/complex/dbase/.nbattrs diff --git a/connectivity/qa/drivers/dbase/DBaseDateFunctions.java b/connectivity/qa/complex/dbase/DBaseDateFunctions.java index b48ae2158359..8f3c6b41c56e 100644 --- a/connectivity/qa/drivers/dbase/DBaseDateFunctions.java +++ b/connectivity/qa/complex/dbase/DBaseDateFunctions.java @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -package qa.drivers.dbase; +package complex.dbase; import com.sun.star.uno.UnoRuntime; import com.sun.star.sdbc.*; diff --git a/connectivity/qa/drivers/dbase/DBaseDriverTest.java b/connectivity/qa/complex/dbase/DBaseDriverTest.java index 2e2920b4145b..83123bc20e8d 100644 --- a/connectivity/qa/drivers/dbase/DBaseDriverTest.java +++ b/connectivity/qa/complex/dbase/DBaseDriverTest.java @@ -24,36 +24,15 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -package qa.drivers.dbase; +package complex.dbase; -import com.sun.star.sdbc.*; import com.sun.star.lang.XMultiServiceFactory; import complexlib.ComplexTestCase; -import java.util.*; -import java.io.*; import share.LogWriter; //import complex.connectivity.DBaseStringFunctions; public class DBaseDriverTest extends ComplexTestCase { - - private static Properties props = new Properties(); - private XDriver m_xDiver; - private String where = "FROM \"biblio\" \"biblio\" where \"Identifier\" = 'BOR00'"; - - static - { - try - { - String propsFile = "test.properties"; - props.load(new FileInputStream(propsFile)); - } - catch (Exception ex) - { - throw new RuntimeException(ex); - } - } - public String[] getTestMethodNames() { return new String[] @@ -62,6 +41,7 @@ public class DBaseDriverTest extends ComplexTestCase }; } + @Override public String getTestObjectName() { return "DBaseDriverTest"; diff --git a/connectivity/qa/drivers/dbase/DBaseNumericFunctions.java b/connectivity/qa/complex/dbase/DBaseNumericFunctions.java index b3c8ff014a2f..ab9986722967 100644 --- a/connectivity/qa/drivers/dbase/DBaseNumericFunctions.java +++ b/connectivity/qa/complex/dbase/DBaseNumericFunctions.java @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -package qa.drivers.dbase; +package complex.dbase; import com.sun.star.uno.UnoRuntime; import com.sun.star.sdbc.*; diff --git a/connectivity/qa/drivers/dbase/DBaseSqlTests.java b/connectivity/qa/complex/dbase/DBaseSqlTests.java index c393c5a48356..ac2b65cf1830 100755 --- a/connectivity/qa/drivers/dbase/DBaseSqlTests.java +++ b/connectivity/qa/complex/dbase/DBaseSqlTests.java @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -package qa.drivers.dbase; +package complex.dbase; import com.sun.star.uno.UnoRuntime; import com.sun.star.sdbc.*; diff --git a/connectivity/qa/drivers/dbase/DBaseStringFunctions.java b/connectivity/qa/complex/dbase/DBaseStringFunctions.java index 1d4ccf0a9b26..23b960b7073d 100644 --- a/connectivity/qa/drivers/dbase/DBaseStringFunctions.java +++ b/connectivity/qa/complex/dbase/DBaseStringFunctions.java @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -package qa.drivers.dbase; +package complex.dbase; import com.sun.star.uno.UnoRuntime; import com.sun.star.sdbc.*; diff --git a/connectivity/qa/drivers/hsqldb/DatabaseMetaData.java b/connectivity/qa/complex/hsqldb/DatabaseMetaData.java index 6d786812d469..c73676c1125e 100644 --- a/connectivity/qa/drivers/hsqldb/DatabaseMetaData.java +++ b/connectivity/qa/complex/hsqldb/DatabaseMetaData.java @@ -8,7 +8,7 @@ * * @author oj93728 */ -package qa.drivers.hsqldb; +package complex.hsqldb; import java.sql.*; import java.lang.reflect.Method; diff --git a/connectivity/qa/drivers/hsqldb/DriverTest.java b/connectivity/qa/complex/hsqldb/DriverTest.java index 6d8c52cd9414..44233df5da52 100644 --- a/connectivity/qa/drivers/hsqldb/DriverTest.java +++ b/connectivity/qa/complex/hsqldb/DriverTest.java @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -package qa.drivers.hsqldb; +package complex.hsqldb; import com.sun.star.frame.XModel; import com.sun.star.frame.XStorable; @@ -35,12 +35,13 @@ import complexlib.ComplexTestCase; import org.hsqldb.lib.StopWatch; -import com.sun.star.sdbc.*; -import com.sun.star.container.XNameAccess; import com.sun.star.uno.UnoRuntime; import com.sun.star.beans.PropertyState; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.embed.XStorage; +import com.sun.star.sdbc.XDataSource; +import com.sun.star.sdbc.XDriver; +import connectivity.tools.HsqlDatabase; public class DriverTest extends ComplexTestCase { @@ -62,10 +63,10 @@ public class DriverTest extends ComplexTestCase { XDataSource ds = null; System.gc(); try { - XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface(XNameAccess.class,((XMultiServiceFactory)param.getMSF()).createInstance("com.sun.star.sdb.DatabaseContext")); - ds = (XDataSource)UnoRuntime.queryInterface(XDataSource.class,xNameAccess.getByName("file:///g:/test.odb")); + HsqlDatabase database = new HsqlDatabase( (XMultiServiceFactory)param.getMSF() ); + ds = database.getDataSource().getXDataSource(); } catch(Exception ex) { - throw new RuntimeException("factory: unable to construct data source" ); + throw new RuntimeException("factory: unable to construct data source" ); } try{ @@ -133,7 +134,7 @@ public class DriverTest extends ComplexTestCase { try{ info = new com.sun.star.beans.PropertyValue[]{ new com.sun.star.beans.PropertyValue("JavaDriverClass",0,"org.hsqldb.jdbcDriver",PropertyState.DIRECT_VALUE) - ,new com.sun.star.beans.PropertyValue("ParameterNameSubstitution",0,new Boolean(false),PropertyState.DIRECT_VALUE) + ,new com.sun.star.beans.PropertyValue("ParameterNameSubstitution",0, false,PropertyState.DIRECT_VALUE) }; drv = (XDriver)UnoRuntime.queryInterface(XDriver.class,((XMultiServiceFactory)param.getMSF()).createInstance("com.sun.star.comp.sdbc.JDBCDriver")); TestCacheSize test = new TestCacheSize(((XMultiServiceFactory)param.getMSF()),info,drv); diff --git a/connectivity/qa/drivers/hsqldb/TestCacheSize.java b/connectivity/qa/complex/hsqldb/TestCacheSize.java index 4701905772b8..0f49aeccc8fc 100644 --- a/connectivity/qa/drivers/hsqldb/TestCacheSize.java +++ b/connectivity/qa/complex/hsqldb/TestCacheSize.java @@ -29,24 +29,16 @@ */ -package qa.drivers.hsqldb; +package complex.hsqldb; -import java.io.*; import org.hsqldb.lib.StopWatch; -import org.hsqldb.lib.FileAccess; import java.util.Random; import com.sun.star.lang.*; import com.sun.star.uno.UnoRuntime; -import com.sun.star.beans.PropertyValue; -import com.sun.star.beans.PropertyState; -import com.sun.star.container.XNameAccess; import com.sun.star.sdbc.*; -import com.sun.star.document.XDocumentSubStorageSupplier; -import com.sun.star.embed.XStorage; -import com.sun.star.frame.XStorable; /** * Test large cached tables by setting up a cached table of 100000 records diff --git a/connectivity/qa/drivers/jdbc/LongVarCharTest.java b/connectivity/qa/complex/jdbc/LongVarCharTest.java index a5797b223b61..b5fbfee5aa04 100644 --- a/connectivity/qa/drivers/jdbc/LongVarCharTest.java +++ b/connectivity/qa/complex/jdbc/LongVarCharTest.java @@ -24,7 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -package complex.connectivity; +package complex.jdbc; import com.sun.star.beans.PropertyState; import com.sun.star.beans.PropertyValue; @@ -51,6 +51,7 @@ public class LongVarCharTest extends ComplexTestCase }; } + @Override public String getTestObjectName() { return "LongVarCharTest"; diff --git a/connectivity/qa/connectivity_all.sce b/connectivity/qa/connectivity_all.sce new file mode 100644 index 000000000000..2459648379f7 --- /dev/null +++ b/connectivity/qa/connectivity_all.sce @@ -0,0 +1,3 @@ +-o complex.dbase.DBaseDriverTest +-o complex.hsqldb.DriverTest +#-o complex.jdbc.LongVarCharTest diff --git a/connectivity/qa/drivers/dbase/makefile.mk b/connectivity/qa/drivers/dbase/makefile.mk deleted file mode 100644 index d71670d67458..000000000000 --- a/connectivity/qa/drivers/dbase/makefile.mk +++ /dev/null @@ -1,64 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ..$/..$/.. -TARGET = DBaseDriverTest -PRJNAME = connectivity -PACKAGE = qa$/drivers$/dbase - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - - -#----- compile .java files ----------------------------------------- - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar -JAVAFILES =\ - DBaseDateFunctions.java\ - DBaseDriverTest.java\ - DBaseNumericFunctions.java\ - DBaseStringFunctions.java\ - DBaseSqlTests.java - -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -#----- make a jar from compiled files ------------------------------ - -MAXLINELENGTH = 100000 - -JARCLASSDIRS = $(PACKAGE) -JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - -run: $(CLASSDIR)$/$(JARTARGET) - java -cp "$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/OOoRunner.jar" org.openoffice.Runner -TestBase java_complex -o qa.drivers.dbase.$(TARGET) - diff --git a/connectivity/qa/drivers/dbase/test.properties b/connectivity/qa/drivers/dbase/test.properties deleted file mode 100644 index c26879f480f3..000000000000 --- a/connectivity/qa/drivers/dbase/test.properties +++ /dev/null @@ -1,5 +0,0 @@ -# x-no-translate -Driver=org.openoffice.comp.drivers.MySQL.Driver -user=testuser -password= -URL=sdbc:mysql:odbc:MYSQL fs-11110 TESTUSER diff --git a/connectivity/qa/drivers/jdbc/makefile.mk b/connectivity/qa/makefile.mk index e9f03ce1be3c..d43ea18df5f1 100644 --- a/connectivity/qa/drivers/jdbc/makefile.mk +++ b/connectivity/qa/makefile.mk @@ -25,42 +25,51 @@ # #************************************************************************* -PRJ = ..$/..$/.. -TARGET = LongVarCharTest +PRJ = .. +TARGET = ConnectivityComplexTests PRJNAME = connectivity -PACKAGE = complex$/connectivity # --- Settings ----------------------------------------------------- .INCLUDE: settings.mk - #----- compile .java files ----------------------------------------- -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar -JAVAFILES =\ - LongVarCharTest.java - -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) +JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar hsqldb.jar +JAVAFILES := $(shell @$(FIND) complex -name "*.java") +JAVACLASSFILES := $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(i:d)$/$(i:b).class) #----- make a jar from compiled files ------------------------------ MAXLINELENGTH = 100000 -JARCLASSDIRS = $(PACKAGE) +#JARCLASSDIRS = $(PACKAGE) JARTARGET = $(TARGET).jar JARCOMPRESS = TRUE +# --- Runner Settings ---------------------------------------------- + +# classpath and argument list +RUNNER_CLASSPATH = -cp "$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/OOoRunner.jar" +RUNNER_ARGS = org.openoffice.Runner -TestBase java_complex + # --- Targets ------------------------------------------------------ .IF "$(depend)" == "" ALL : ALLTAR + @echo ----------------------------------------------------- + @echo - do a 'dmake show_targets' to show available targets + @echo ----------------------------------------------------- .ELSE ALL: ALLDEP .ENDIF .INCLUDE : target.mk +show_targets: + +@$(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) complexlib.ShowTargets $(foreach,i,$(JAVAFILES) $(i:s/.\$///:s/.java//)) run: - java -cp $(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/OOoRunner.jar org.openoffice.Runner -TestBase java_complex -o complex.connectivity.$(TARGET) + +$(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -sce connectivity_all.sce +run_%: + +$(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -o complex.$(@:s/run_//:s/_/\./) |