commit | b8cd8b6087862ff04c9e39a0235ebf870c28ce39 | [log] [tgz] |
---|---|---|
author | Rolf Badorek <rolf.badorek@nokia.com> | Fri Sep 20 14:20:05 2019 +0300 |
committer | Rolf Badorek <rolf.badorek@nokia.com> | Fri Sep 20 14:20:05 2019 +0300 |
tree | 693e3f2f6eae2ddf4edf14704f9badd77e5e2e58 | |
parent | 8324d029ce006509ddbc605446d05987c17e0368 [diff] |
Use boolean expects in unit tests Certain gcc versions will give (per my understanding false positive) warning when 'EXPECT_EQ' macro is used so that other argument is 'true' or 'false'. For example, Ubuntu 16.04 has by default such a gcc version. See some related discussion below: https://github.com/google/googletest/issues/322 We have defined all compiler warning to be treated as errors, thus above issue will lead to compilation error. Simple fix is to use 'EXPECT_TRUE' or 'EXPECT_FALSE' instead. Those are more readable, and thus better choice anyway. Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com> Change-Id: Ib0f3841c1b6fe2cf95eac3e4dc0cbcba9c3c8268
Documentation is generated with doxygen
tool.
By default make doxygen-doc
creates HTML, PDF and PS documents (if the needed tools are available). The documents are created to:
Creation of different document formats can be controlled with various --enable-doxygen-*
and --disable-doxygen-*
configuration options. For example if only HTML document is needed, then run:
./configure --disable-doxygen-pdf --disable-doxygen-ps make doxygen-doc
These instructions assume that the project has been cloned into directory named shareddatalayer
.
Currently, the following libraries are required while building:
boost-devel hiredis-devel
cd shareddatalayer ./autogen.sh ./configure make all test
cd shareddatalayer ./autogen.sh cd .. mkdir workdir cd workdir ../shareddatalayer/configure make all test
By default the shared library is installed to /usr/local/lib
and headers into to /usr/local/include
. If this is not desired, then provide different path when running configure
, for example:
./configure --prefix=$HOME
Note that configure
command allows plethora of additional options. For more info:
./configure --help
After configuration has been done, run:
make install
When Redis is used, SDL requires that the following Redis extension commands have been installed to runtime environment:
Redis v4.0 or greater is required. Older versions do not support extension modules.
Implementation for these commands is produced by RIC DBaaS: https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/dbaas
In official RIC deployments these commands are installed by dbaas
service to Redis container(s).
In development environment you may want install commands manually to pod/container which is running Redis.
Installation to default system directory:
cd redismodule ./autogen.sh ./configure make install
Following line should be added to redis.conf
file:
loadmodule <path>/libredismodule.so
<path>
should be replaced to match library installation directory path. redis-server
must be restarted after configuration file update.
Notice that redis-server
takes path to configuration file as an argument. If not given it will start with default parameter values and above made loadmodule
option is not effective. Refer to redis-server --help
.
SDL API will check in connection setup phase that all required commands are available, if not then execution is aborted and error log is written to identify that which commands are missing.
Unit tests are compiled and executed by simply running:
make test
By default all unit tests are executed. If valgrind
is installed, then by default unit test execution is analyzed with valgrind
. Running specific test cases can be achieved by using GTEST_FILTER
environment variable. For example:
make test GTEST_FILTER=ConnectionTest*
If valgrind
is not desired (even if installed), then it can be disabled with USE_VALGRIND
environment variable:
make test USE_VALGRIND=false
Additional valgrind
arguments can be specified with VALGRIND_EXTRA_ARGS
environment variable. For example:
make test VALGRIND_EXTRA_ARGS='--track-fds=yes --log-file=mylog.txt'
It is also possible to use the testrunner
binary directly (after it has been compiled). The testrunner
binary supports all the command line options gtest supports, for example:
make testrunner ./testrunner --help
SDL is not yet available in O-RAN-SC PackageCloud.io repository.
Plan is to add it, but in the meantime SDL API needs to be complied and installed in SDL client Dockerfiles (refer instructions above). You may need to execute RUN ldconfig
command to Dockerfile after SDL API installation.
RIC DBaaS service must be running before starting application pod which is using SDL API. DBaaS defines environment variables which are used to contact DBaaS service (offering backend for SDL). Those environment variables are exposed inside application container only if DBaaS service is running when application container is started.
You may test SDL connectivity to its backend with sdltool test-connectivity
command inside your application container.