Skip to content

libremesh/shared-state-async

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Socket server epool coroutines (c++20)

  • Sources, headers and mains separated in distinct folders
  • Use of modern CMake for much easier compiling
  • Setup for tests using doctest
  • Code coverage reports (TODO:review this) including automatic upload to Coveralls.io and/or Codecov.io
  • Code documentation with Doxygen

Requirements

doxygen lcov build-essential gdb cmake

sudo apt install doxygen lcov build-essential gdb cmake

Structure

You can find main executable in app/main.cc under the Build section in CMakeLists.txt.

Building, Testing and Running

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 90.4%
  • CMake 4.8%
  • Shell 2.7%
  • Python 1.8%
  • Lua 0.3%