• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Makefile.amH A D08-Nov-20202.5 KiB11093

Makefile.inH A D03-May-2022109.5 KiB1,8841,692

MySQL_create_tables.sqlH A D18-Mar-20192.2 KiB4744

PostgreSQL_create_tables.sqlH A D18-Mar-20191.7 KiB4338

READMEH A D18-Mar-20194.1 KiB7152

SQLite_create_tables.sqlH A D18-Mar-20191.6 KiB4036

TYPES_SCHEMA_Mdb.xmlH A D18-Mar-20193.4 KiB102101

TYPES_SCHEMA_MySQL.xmlH A D08-Nov-20208.8 KiB263262

TYPES_SCHEMA_PostgreSQL.xmlH A D08-Nov-20209.1 KiB262261

TYPES_SCHEMA_SQLite.xmlH A D18-Mar-20192.7 KiB7675

check_bdb.cH A D08-Nov-20201.6 KiB5730

check_firebird.cH A D18-Mar-20191.5 KiB5427

check_mdb.cH A D08-Nov-20201.7 KiB5830

check_mysql.cH A D08-Nov-20201.6 KiB5831

check_oracle.cH A D18-Mar-20191.6 KiB5730

check_postgres.cH A D08-Nov-20205.1 KiB165121

check_sqlite.cH A D08-Nov-20202.2 KiB6841

prov-test-common.cH A D08-Nov-202029.4 KiB1,030839

prov-test-common.hH A D08-Nov-20201.5 KiB3917

prov-test-util.cH A D08-Nov-202015.5 KiB507408

prov-test-util.hH A D08-Nov-20201.1 KiB309

README

1USAGE
2-----
3
4Run "make check" in this directory to test database providers.
5
6To be tested, each provider needs to be compiled in these sources, and some environment
7variables need to be set for each provider. If no variable is set, then the corresponding
8provider will not be actually tested and the test will report a success.
9
10For each provider, the environment variables to set are:
11- If the <provider_name>_DBCREATE_PARAMS (such as for example SQLITE_DBCREATE_PARAMS or
12  POSTGRESQL_DBCREATE_PARAMS) is set, then the test will attempt to create a database
13  named "gda_check_db" before actually running the test (and will fail if it can't be created).
14  That variable must be a string composed of key=value pairs separated by a semi-colon (";")
15  The keys and their meanings are specific to each provider and are listed in the
16  providers/<provider_name>/<provider_name>_specs_create_db.xml.in file in the section "SERVER_CNX_P"
17
18- If the <provider_name>_DONT_REMOVE_DB (such as for example SQLITE_DONT_REMOVE_DB) environment
19  variable is set, and if a test database was created for the test, then that database is not
20  destroyed when the tests for the specified provider ends
21
22- If the <provider_name>_CNC_PARAMS (such as for example SQLITE_CNC_PARAMS or
23  POSTGRESQL_CNC_PARAMS) is set, then those parameters will be used to open the connection to
24  an existing database. __BEWARE__: in this case some data in the database _will_ be modified/destroyed
25  so don't use it on a database with "real" data. The contents of this variable has a similar layout
26  as the <provider_name>_DBCREATE_PARAMS variable, the keys are listed in the
27  providers/<provider_name>/<provider_name>_specs_dsn.xml.in file. Notice that parameters which are
28  already named in the <provider_name>_DBCREATE_PARAMS variable (if set) will be overriden by the
29  values in that variable, so it's useless to repeat them there.
30
31- The <provider_name>_USER and <provider_name>_PASS variables (which are optional) respectively
32  enable a username and a password to be specified. The username and password can also be set as part
33  of the <provider_name>_CNC_PARAMS string as "USERNAME=<username>;PASSWORD=<pass>"
34
35If the database was created during the test, then it will also be destroyed at the end of the
36test.
37
38The list of parameter which can be specified to create a database, which depends on the database provider,
39can be obtained using the 'gda-list-server-op' tool, for example for PostgreSQL (removed extra info for
40clarity):
41$ gda-list-server-op -t -o CREATE_DB -p PostgreSQL | grep SERVER_CNX_P/
42|-- [id=/SERVER_CNX_P/USE_SSL] [name=Require SSL] [descr=Whether to require SSL or not when connecting]
43|-- [id=/SERVER_CNX_P/ADM_PASSWORD] [name=Administrator password]
44|-- [id=/SERVER_CNX_P/ADM_LOGIN] [name=Administrator login] [descr=Login name (which has the rights to create databases)]
45|-- [id=/SERVER_CNX_P/OPTIONS] [name=Options] [descr=Extra connection options]
46|-- [id=/SERVER_CNX_P/PORT] [name=Port] [descr=Database server port (for servers running on unix domain sockets, enter the socket's file name extension (usually 5432), or leave this field empty)]
47|-- [id=/SERVER_CNX_P/HOST] [name=Database server] [descr=Host on which the database server is running (for servers running on unix domain sockets, enter the socket's path (usually /tmp), or leave this field empty)]
48
49
50
51EXAMPLES
52--------
53
54Here are some examples of the environment variables for the various providers:
55
56export MYSQL_DBCREATE_PARAMS="HOST=localhost"
57export MYSQL_DBCREATE_PARAMS="HOST=gdatester;ADM_LOGIN=gdauser;ADM_PASSWORD=GdaUser"
58export MYSQL_CNC_PARAMS="HOST=gdatester;USERNAME=gdauser;PASSWORD=GdaUser"
59
60export POSTGRESQL_DBCREATE_PARAMS="HOST=gdatester;PORT=5432;ADM_LOGIN=gdauser;ADM_PASSWORD=GdaUser"
61export POSTGRESQL_CNC_PARAMS="HOST=gdatester;PORT=5432;USERNAME=gdauser;PASSWORD=GdaUser"
62
63export SQLITE_DBCREATE_PARAMS="DB_DIR=."
64
65export BERKELEY_DB_CNC_PARAMS="DB_NAME=gda_check_bdb.db"
66
67The MDB provider does not allow database creation, so use the gda_check_db.mdb file in this directory
68export MSACCESS_CNC_PARAMS="DB_DIR=/home/me/libgda/tests/providers;DB_NAME=gda_check_db"
69
70export ORACLE_CNC_PARAMS="TNSNAME=//127.0.0.1"
71