Build and Test Instructions
The following commands show the process for building and testing server code as per Lauri's instructions:
1) INSTALL the tools you need to use, and a "seed" version of the things you will be building, as 'current':
packages used:
python, cvs, sam_util
ups, upd
HTMLgen
omniORB v4_0_1 -q "suitable qualifier here"
db_server_gen, db_server_base
ximagetools, gnuplot
sam_config
"seed" packages:
sam_idl_pylib
sam_common_pylib
sam_db_srv
sam_dimension_server_prototype
(The "seed" packages must be installed to avoid "chicken&egg" problems when sourcing the setup scripts during
the build process). This only needs to be done once.
2) CREATE a "build" qualifier for sam_config on the node where you will be doing development:
ups tailor sam_config
## add qualifier "build"
The environment should contain
ORACLE_SID - either cdfofdev or d0ofdev,
wherever your mini-sam db will be located
SAM_NAMING_SERVICE_IOR - the IOR for the nameservice
where you want to register
It should NOT contain anything else -- especially no __SETUP_REQUIRED__xyz
options.
This only needs to be done once.
3) CREATE a mini-sam db for your personal use/tests. (NB: it looks like the latest release here is broken;
cvs co sam_db_seed_data
cvs co sam_db_test_loader
cd sam_db_test_loader
setup oracle_client -v9_2_0_1
(ensure this includes imp, impus.msg and impus.msc)
. sam_setup.sh
gmake
$SAM_DB_TEST_LOADER_DIR/bin/samCreateTestDb
This only needs to be done when the schema is changed.
4) THEN -- to build any of the sam tools in the build suite, and everything it depends on (NB: may need
to change to oracle_client 8_1_7 (setup oracle_client -v8_1_7) to gmake sam_common_pylib, sam_db_srv
and sam_dimension_server_prototype AND change the ups directory of sam_dimension_server_prototype to
include SetupRequired for oracle_client)
cd
. sam_setup.sh # csh: source sam_setup.csh
gmake
To build and test (or just to test, if you've already built it):
cd
. sam_setup.sh
gmake test
The test target in these make files will now:
a) make sure everything is built (all dependencies)
b) start the required type of server against which the tests are
to be run (sam_db_srv or sam_dimension_server_prototype)
c) run the test suite against that server, using your mini-sam
db
d) stop the server
Test results can be seen in the /test directory.
No more two window requirements, you can automatically build and run the
suite in one window with one command:
cd && . sam_setup.sh && gmake test