Skip to content

Introduce basic unit testing framework, cleanup

Robert Schmidt requested to merge ctest into develop

To build only tests (currently only nr_rlc tests) and execute:

cd openairinterface5g
mkdir build && cd build # you can also do that in cmake_targets/ran_build/build
cmake .. -GNinja -DENABLE_TESTS=ON && ninja tests
ctest

More documentation is here

Further modifications: EDIT: all done or not necessary so taken out

  • remove ocp-enb and 7.3 split done !1948 (merged)
  • remove the practically unused backtrace function (and file) taken out somewhere already, not sure anymore where
  • Provide a single exit_function implementation instead of many different in all executables (this implementation merely unblocks ITTI, allowing a proper exit) contentious, at least Bruno prefers to keep it, I think, so not present
  • Repair build when T tracer is disabled (-DT_TRACER=OFF in cmake) done in !2209 (merged) and reviewed by you
  • small cleanups in cmake
  • upgrade to cmake 3.12: the only impacted distribution should be Ubuntu 18. Kitware provides a repository to download newer version if required) done in !1960 (merged)
  • due to this, build container images in Ubuntu 20 done in !1949 (merged)

Follow-up work in later MRs:

  • add another test for NAS, as well as improving the build for NAS messages
  • add test for E2AP
  • add test for Nettle/security
  • add CI pipeline that runs these tests on each MR (default per-test timeout: 3s)
Edited by Robert Schmidt

Merge request reports