doxygen lcov build-essential gdb cmake
sudo apt install doxygen lcov build-essential gdb cmake
You can find main
executable in app/main.cc under the Build
section in CMakeLists.txt.
Build by making a build directory (i.e. build/
), run cmake
in that dir, and then use make
to build the desired target.
Example:
> mkdir build && cd build
> cmake .. -DCMAKE_BUILD_TYPE=[Debug | Coverage | Release]
> make
For testing, first start the main executable and then run the python test script in another console
> ./main # Runs the main executable
> python3 ../tests/python-testclient/pythonTcpClient.py #runs a sample python client
For unit testing folow this instructions
> make test # Makes and runs the tests.
> make coverage # Makes and runs the tests, then Generates a coverage report. (requires "cmake .. -DCMAKE_BUILD_TYPE=Coverage")
> make doc # Generate html documentation.
> ./unit_tests -s #runs unittests with details
>
Testing
There are some simple tests implemented in C++ the most important test is a set of scripts
start the main app in a console and in another console type one of the following
/tests/python-testclient$ python pythonTcpClient.py -ip 127.0.0.1
/tests/python-testclient$ python pythonTcpClient.py -ip 127.0.0.1 -f ../samplestate.txt
/tests/python-testclient$ ./runclientlocal.sh