[Mono-dev] Running System.Data.OracleClient test suite

Leszek Ciesielski skolima at gmail.com
Mon Nov 12 06:51:01 EST 2007


Hi,

running the tests should be something trivial to do and instead
yesterday I spent 2 hours trying to figure out how I got them to run
before... So here's a short instruction.

Obtaining needed OCI binaries: The machine that will run the tests
needs 'oracle-instantclient-basic" and 'oracle-instantclient-sqlplus'
packages installed - they should be available though your
distributions package manager. Please note that you'll need to create
an Oracle account for downloading anything from oracle.com.

Obtain and compile mono svn tree
(http://www.mono-project.com/Compiling_Mono#Building_Mono_from_the_Subversion_Repository).
Navigate to mcs/class/System.Data.OracleClient and run 'make run-test'
(for net_1_1 profile) or 'make run-test PROFILE=net_2_0' . Most tests
will be ignored, as there's no database connection configured.

Setting up Oracle server: Fastest way to get Oracle up & running is to
use free Oracle Express Edition
(http://www.oracle.com/technology/software/products/database/xe/htdocs/102xewinsoft.html),
Universal version. I prefer to use a virtual Windows machine for this,
installation on Linux is quite cumbersome. Remember to turn off the
firewall or at least open port 1521 for incoming connections.

Create a 'tnsnames.ora' file. It should be located in
'/usr/lib/oracle/10.2.0.3/client/network/admin/tnsnames.ora' - the
'10.2.0.3' part is the instantclient version you have installed.
You'll have to move this file if you ever change the instantclient
version. An example file is attached to this mail, it should be enough
to edit the IP address after "HOST =" .

Creating user and databases: Use the web frontend on the server
machine to create user 'GHTDB' with password 'GHTDB' and roles
CONNECT, RESOURCE and DBA (yes, this means full access). On the test
machine, navigate to
mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm
and issue the following commands to populate the database:
'sqlplus "GHTDB/GHTDB at VMWARE" @GHTDB.ORACLE.sql' and 'sqlplus
"GHTDB/GHTDB at VMWARE" @GHTDB.Data.ORACLE.sql' (where VMWARE is the
identifier of the database in the tnsnames.ora file).

Configuring connection string for the tests: In
mcs/class/System.Data.OracleClient directory , copy
'System.Data.OracleClient_test_default.dll.config.example' to
'System.Data.OracleClient_test_default.dll.config' and
System.Data.OracleClient_test_net_2_0.dll.config', then edit the
connection string values to read "Data Source=VMWARE;User
ID=GHTDB;Password=GHTDB;".

Finally, run the test suite.

Currently there are about 35 tests that fail AND there are also tests
marked as NotWorking on targets other than JVM. Ideally they should
all pass (the NotWorking attribute was used for tests that hang
instead of simply failing).

Questions? Comments?

-- 
MS-DOS user since 5.0
Windows user since 3.11
Linux user since kernel 2.4
Novell Netware user since 2.2
WARCRAFT user since 1.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tnsnames.ora
Type: application/octet-stream
Size: 196 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071112/812c223e/attachment.obj 


More information about the Mono-devel-list mailing list