Back to index

salome-kernel  6.5.0
Source code structuration and Unit Tests


You will find here general information on code directories structure, unit tests associated to the different kind of classes, and how to run the unit tests.

SALOME KERNEL source code structuration

General structure of KERNEL_SRC

Directory src: C++ and Python source code

  1. Basic services non related to CORBA

    • Basics
      A set of general purpose C++ services, not related to CORBA. Some general purpose services that are in Utils directory (CORBA related), are progressivley moved here, as they are not related to CORBA.
    • SALOMELocalTrace
      A multithread trace system that allows message tracing on standard error or a file.
    • CASCatch
      Exceptions and signal handler.
    • HDFPersist
      A C++ interface to HDF.

  2. Basic CORBA services

    • Logger :
      A CORBA server that collects the trace messages from differents CORBA process.
    • SALOMETraceCollector :
      A multithread trace system derived from SALOMELocalTrace, that sends messages to Logger server via CORBA.
    • Utils :
      A set of general purpose services related to CORBA, such as basic CORBA exception system. See also Basics directory above.
    • NamingService :
      C++ and Python interfaces to name, store and retrieve CORBA objects
    • GenericObj :
      A generic CORBA interface for CORBA objects, to count distributed references, and to allow destruction by client.

  3. Miscellaneous CORBA servers

    • Registry :
      Implements SALOME_registry.idl. Provides a CORBA server library and a separate server program.
    • ModuleCatalog :
      Implements SALOME_moduleCatalog.idl. Provide a CORBA server library and separate server and client programs.
    • ModuleGenerator :
      Tool to generate a module catalog from CORBA idl
    • ResourcesManager :
      library included in container server
    • Notification :
      library included in differents servers (container)

  4. CORBA Containers for SALOME Modules

    • Container
    • TestContainer
    • LifeCycleCORBA_SWIG

  5. STUDY server and related interfaces and tools

    • SALOMEDSClient
    • SALOMEDSImpl

  6. Python interface to SALOME

  7. Efficient CORBA transfer services

    • Communication
    • Communication_SWIG

  8. A Parallel container with MPI

    • MPIContainer
    • TestMPIContainer

  9. Unit tests

Tools and principles used for Unit testing


Unit Testing rely on cppunit package for C++ testing, and on unittest module for Python. See these products for general principles of unit testing.

The cppunit package is optional. When the prerequisite is detected, the unit tests are compiled.

Unit Tests sources are in directories Test under the src/directories containing the classes to test.

Test are ordered following the order of directories given above.

Tests can be run as a whole, or for a particular directory. In this case, only a partial test is run (the classes to test, and the classes used, i.e. the preceding test directories).

Today, only some tests are written as an example. There are not yet python scripts in KERNEL_SRC, but it's a matter of days, there are working scripts to test LifeCycleCORBA_SWIG interface.