How to compile the CORAL Server and run the tests
Assumptions:
- The
/afs/cern.ch
is mounted
- You can access the CORAL dependencies from the AFS
We use
bash shell commands. There are
tcsh shell scripts as well (whenever we source a script), with the same name than the
bash ones have, but with
.csh extension.
The settings below were tried on
lxplus.
CMT setup
The compilation requires the
CMT tools
. The settings I have been using:
export AFS=/afs
export SITEROOT=$AFS/cern.ch
export CMTROOT=$SITEROOT/sw/contrib/CMT/v1r20p20070720
export CMTCONFIG=slc4_amd64_gcc34
source $CMTROOT/mgr/setup.sh
unset SCRAM_HOME
unset ORACLE_HOME
unset PYTHONPATH
unset ROOTSYS
unset CMTPATH
export CMTPROJECTPATH=$SITEROOT/sw/lcg/app/releases
The
CMTCONFIG
variable refers to the platform. The supported platforms for CORAL server are:
slc4_ia32_gcc34, slc4_ia32_gcc34_dbg, slc4_amd64_gcc34, slc4_amd64_gcc34_dbg, osx104_ia32_gcc401, osx104_ia32_gcc401_dbg
CVS settings
General instructions are
here
.
export CVSROOT=:kserver:molnarzs@coral.cvs.cern.ch:/cvs/coral
(replace
molnarzs with your username)
cvs co coral
Compilation
CORAL compilation:
cd _ProjectRoot_/coral/config/cmt
cmt config
source setup.sh
cmt br cmt config
cmt br cmt make all_groups
The standard CORAL compilation above does not compile the
OLDCoralServer sources. You need to do it explicitly, after having compiled CORAL.:
cd _ProjectRoot_/coral/CoralServer/cmt
cmt config
source setup.sh
cmt make all_groups
Now all the CORAL tests and server binaries should be in your path, and you can start the unit tests. For the moment, the server does not go into daemon mode, so you need a separate terminal to run the server. The unit tests use the same databases that the CORAL tests use.
- Check if you can access the databases: run the
test_Integration_Basic
CORAL test. If it passes, then you have right access to the test databases.
- Run
OLDCoralServer
from a terminal. It will listen to port 8080, so ensure that the port is available. You cannot configure it from the command line yet.
- Run
test_unit_CoralServer_TestSuite
. The textual output explains clearly if a test passed or failed, in the latter case it informs you where and why it failed.
The unit tests above use hardcoded CORAL messages. The server does not know if the received messages arrived from the proxy, the CORAL client or from the unit tests, it is completely transparent. So, if the tests pass in unit test -
OLDCoralServer configuration, they should also pass when you insert a proxy between the test suite and the server.
Configuration
Server/client ports:
OLDCoralServer/src/MockEnvironment.cpp
(the port value is used by both the tests and the server)
CORAL authentication path: set the
CORAL_AUTH_PATH
environment variable, before running the server. Its default value:
/afs/cern.ch/sw/lcg/app/pool/db
CORAL database lookup path: set the
CORAL_DBLOOKUP_PATH
environment variable, before running the server. Its default value:
/afs/cern.ch/sw/lcg/app/pool/db
--
ZsoltMolnar - 09-Apr-2008