On 15/09/10 16:15, Artyom wrote:
> Hello,
> 
> Are there any instructions on how to run tests it is obvious that you
> need database names users etc.

Generally, the tests are composed of a bunch of test programs
e.g. test_mysql, test_sqlite3, etc.
These programs accept only one argument, it is connection string.
So, it is possible to run each test program manually:

test_postgresql "dbname=test user=a password=b"
test_sqlite3 /tmp/test.db

The official instructions are tightly coupled to build system.
The build system based on CMake has not been released, thus no official
instructions are published.

The CMake configuration provides:
- 'test' target
- options to specify test connection strings

So, generally, the commands flow as follows, for example:

$ cmake \
    -DWITH_POSTGRESQL=ON \
    -DSOCI_POSTGRESQL_TEST_CONNSTR="dbname=soci_test user=mloskot" \
    -DWITH_MYSQL=ON \
    -DSOCI_MYSQL_TEST_CONNSTR="..." \
    -DWITH_ORACLE=OFF \
    -DWITH_SQLITE3=ON \
    -DSOCI_SQLITE3_TEST_CONNSTR="/tmp/test.db" \
    /home/mloskot/dev/soci/_git/master/src

$ make

$ make test


Here is example output I get running empty and postgresql tests only:
===
Running tests...
/usr/local/bin/ctest --force-new-ctest-process
Test project /home/mloskot/dev/soci/_git/build
    Start 1: test_empty
1/4 Test #1: test_empty .......................   Passed    0.09 sec
    Start 2: test_empty_static
2/4 Test #2: test_empty_static ................   Passed    0.00 sec
    Start 3: test_postgresql
3/4 Test #3: test_postgresql ..................   Passed    5.33 sec
    Start 4: test_postgresql_static
4/4 Test #4: test_postgresql_static ...........   Passed    3.75 sec

100% tests passed, 0 tests failed out of 4

Total Test time (real) =   9.18 sec
===

I hope it helps.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to