-
Notifications
You must be signed in to change notification settings - Fork 34
Setting up CLION with testing support
In this section we will guide you through setting up development environment as this is essential for major contributions. We use CLion to develop cppTango therefore all the screenshots present it and obviously configuration steps may vary in case of other IDE.
This one is quite simple: clone this repository; open CLion and point it CMakeLists.txt
in the root folder of the project:
CLion will automatically run CMake: see 1
CMake build files will be stored under cmake-build-debug folder (2)
Once CLion finishes with CMake a bunch of runnable targets will appear, see 3. TIP start typing to filter the targets.
cppTango shipped with start-tango
target. It starts Tango docker containers and runs conf_devtest
which is a program that populates Tango DB.
Typical output looks like this:
NOTE for the first time CLion will compile everything and the actual output will be much longer
conf_devtest
requires the following arguments:
DevTest/test
test/debian8/10
test/debian8/11
test/debian8/12
debian8_alias
debian8_attr_alias
test/fwd_debian8/10
test2/debian8/20
Success output from conf_devtest
:
Now you have fully functional Tango environment running in the docker containers (TANGO_HOST=172.17.0.3:10000
). To explore, for instance Tango DB, use Jive
To run single test it must be first set up properly. Run -> Edit Configurations... ->
For cxx tests the program arguments must be
--device1=test/debian8/10 --device2=test/debian8/11 --device3=test/debian8/12 --device20=test2/debian8/20 --fwd_device=test/fwd_debian8/10 --loop=1 --fulldsname=DevTest/test --serverhost=<YOUR_HOST> --clienthost=<YOUR_HOST> --serverversion=5 --docurl=http://www.tango-controls.org --devtype=TestDevice --dbserver=sys/database/2 --outpath=/tmp/ --refpath=<YOUR_PATH_TO_CPP_TANGO>/cppTango/test/cpp_test_suite/new_tests/out --loglevel=0 --dsloglevel=5 --suiteloop=1 --devicealias=debian8_alias --attributealias=debian8_attr_alias --verbose=true
Replace --serverhost=<YOUR_HOST>
, --clienthost=<YOUR_HOST>
and --refpath=<YOUR_PATH_TO_CPP_TANGO>
the rest is the same.
To run old_test (cppTango/test/cpp_test_suite/old_tests
) most of the time you just need to provide one argument (test device) and TANGO_HOST:
NOTE environment variables can be copy-n-pasted using corresponding buttons
TIP you can define default configuration, for instance TANGO_HOST:
To stop Tango docker containers run stop-tango
. Typical output:
NOTE red popup box indicates that there was no executable selected for this target. This is perfectly fine in this case.