Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c63c75b
doc: Remove obsolete doc
Magolves Dec 26, 2025
76dc015
doc: Code review
Magolves Dec 26, 2025
6a96e57
fix: Make m_isOpen atomic (issue #HP-1)
Magolves Dec 29, 2025
0599241
fix: Forward Declarations for Include Hygiene (issue #HP-2)
Magolves Dec 29, 2025
848bec3
fix: Remove unjustified noexcept
Magolves Dec 29, 2025
a196fac
doc: Fix grammar and typos
Magolves Dec 30, 2025
9ba7955
Merge branch 'main' into dev
Magolves Dec 31, 2025
6bdecce
doc: Add section on 0x27 and 0x84
Magolves Dec 31, 2025
2d1c408
doc: Add levels, fix linter warnings
Magolves Dec 31, 2025
ef6bbe2
test: Add test for UdsMockProvider (todo)
Magolves Jan 2, 2026
fabb7c0
Update .gitignore
Magolves Jan 2, 2026
e2b4c59
fix: Remove unused include
Magolves Jan 2, 2026
b5b61a9
test: Add tests for DoIPMessage
Magolves Jan 2, 2026
0d27f5d
chore: Move some tests to proper subdirs
Magolves Jan 2, 2026
5dd5ed1
chore: Update .gitignore for zed
Magolves Jan 2, 2026
1fb37ad
refactor: Move utility headers like Logger, Socket to util dir, fix s…
Magolves Jan 2, 2026
70d9016
chore: Add token for codecov
Magolves Jan 2, 2026
eb2b72b
doc: Update code review
Magolves Jan 3, 2026
9705a81
feat: Add impl for DTC handling
Magolves Jan 3, 2026
5e994fe
chore: Move util, uds and doctest-aux to own libs
Magolves Jan 3, 2026
49f233d
refactor: Split identifiers (Vin -> UDS, Eid/Gid -> DoIp)
Magolves Jan 3, 2026
56aaaf4
fix: Remove dup guard
Magolves Jan 3, 2026
4595d13
Merge branch 'feature/move-util-and-uds-to-own-libs' into dev
Magolves Jan 3, 2026
0910bd3
doc: Add codecov links (main branch)
Magolves Jan 3, 2026
b273143
fix: Use Socket class for transport
Magolves Jan 3, 2026
2af5d3f
Feature/renovate client (#8)
Magolves Jan 8, 2026
b7c2cb0
fix: Fix occasianl deadlock in timer test, move timer test to util lib
Magolves Jan 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ cd build && ctest --output-on-failure --parallel 4

**Protocol Implementation**:
- `inc/DoIPMessage.h` - Message parsing/generation (4000+ lines)
- `inc/DoIPIdentifiers.h` - Protocol constants and types
- `inc/Vin.h` - Protocol constants and types
- `inc/DoIP*.h` - Individual message type implementations

**Testing Infrastructure**:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-DWITH_UNIT_TEST=ON \
-DWITH_INTEGRATION_TEST=OFF \
-DWARNINGS_AS_ERRORS=ON

- name: Configure CMake (Windows)
Expand All @@ -97,7 +98,7 @@ jobs:
cmake -B build -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DWITH_UNIT_TEST=ON -DWARNINGS_AS_ERRORS=OFF

- name: Build
run: cmake --build build --config ${{ matrix.config.build_type }} --parallel 4
run: cmake --build build --config ${{ matrix.config.build_type }} --parallel 6

- name: Run tests
working-directory: build
Expand Down Expand Up @@ -172,6 +173,7 @@ jobs:
-DCMAKE_CXX_COMPILER=g++-11 \
-DCMAKE_BUILD_TYPE=Debug \
-DWITH_UNIT_TEST=ON \
-DWITH_INTEGRATION_TEST=OFF \
-DENABLE_SANITIZERS=ON \
-DWARNINGS_AS_ERRORS=ON

Expand Down Expand Up @@ -260,6 +262,7 @@ jobs:
-DCMAKE_CXX_COMPILER=g++-11 \
-DCMAKE_BUILD_TYPE=Debug \
-DWITH_UNIT_TEST=ON \
-DWITH_INTEGRATION_TEST=ON \
-DCMAKE_CXX_FLAGS="--coverage" \
-DCMAKE_C_FLAGS="--coverage" \
-DWARNINGS_AS_ERRORS=OFF
Expand All @@ -285,4 +288,5 @@ jobs:
file: ./coverage.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ docs/
inc/gen/DoIPConfig.h
*.log
test/reports/*
.cache/*
CMakeCache.txt
CMakeFiles/cmake.check_cache
60 changes: 43 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Build options
option(WITH_UNIT_TEST "Build unit tests" ON)
option(WITH_INTEGRATION_TEST "Enable integration tests" ON)
option(WITH_UNIT_TEST "Enable unit tests" ON)
option(WITH_INTEGRATION_TEST "Enable integration tests" ON)
# Enable test coverage reporting
option(WITH_TEST_COV "Enable test coverage reporting " OFF)
option(WITH_EXAMPLES "Build examples" ON)
Expand Down Expand Up @@ -43,6 +43,11 @@ endif()

include(cmake/projectSettings.cmake)

# Include python virtual environment setup for integration tests
# if (WITH_INTEGRATION_TEST)
# include(cmake/python-venv.cmake)
# endif()

# Find required packages
find_package(Threads REQUIRED)

Expand Down Expand Up @@ -99,6 +104,36 @@ foreach(VAR DOIP_ALIVE_CHECK_RETRIES DOIP_MAXIMUM_MTU)
endif()
endforeach()

if (WITH_UNIT_TEST)
# Enable testing
enable_testing()

# Find or download doctest
find_package(doctest QUIET)
if(NOT doctest_FOUND)
include(FetchContent)
FetchContent_Declare(
doctest
GIT_REPOSITORY https://github.com/doctest/doctest.git
GIT_TAG v2.4.11
)
FetchContent_MakeAvailable(doctest)
endif()

# Include doctest CMake module for test discovery
include(cmake/doctest.cmake)
endif()

# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)


# Include libs subdirectory
add_subdirectory(libs)


# Configure configuration header
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/inc/gen/DoIPConfig.h.in
Expand All @@ -108,25 +143,18 @@ configure_file(

set(DOIP_SERVER_LIB_NAME doip-server CACHE STRING "DoIP library name")


set(SOURCES
src/cli/ServerConfigCLI.cpp
src/DoIPClient.cpp
src/DoIPConnection.cpp
src/DoIPDefaultConnection.cpp
src/DoIPServer.cpp
src/Logger.cpp
src/MacAddress.cpp
src/tp/TcpServerTransport.cpp
src/tp/TcpConnectionTransport.cpp
src/tp/MockServerTransport.cpp
src/cli/ServerConfigCLI.cpp
src/tp/MockConnectionTransport.cpp
src/uds/UdsMock.cpp
src/uds/services/UdsSecurityAccess.cpp
src/util/Daemonize.cpp
src/tp/MockServerTransport.cpp
src/tp/TcpConnectionTransport.cpp
src/tp/TcpServerTransport.cpp
)


# Create the library
add_library(${DOIP_SERVER_LIB_NAME}
${SOURCES}
Expand All @@ -152,6 +180,8 @@ target_include_directories(${DOIP_SERVER_LIB_NAME}
# Link dependencies
target_link_libraries(${DOIP_SERVER_LIB_NAME}
PUBLIC
doip::util
doip::uds
spdlog::spdlog_header_only
CLI11::CLI11
PRIVATE
Expand Down Expand Up @@ -198,10 +228,6 @@ if (WITH_UNIT_TEST)
add_subdirectory(test)
endif()

# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

# Install libraries
install(TARGETS ${DOIP_SERVER_LIB_NAME}
Expand Down
Loading