Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .devcontainer/toolshed-amd64/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"streetsidesoftware.code-spell-checker",
"xaver.clang-format",
"vadimcn.vscode-lldb",
"matepek.vscode-catch2-test-adapter",
"ms-python.python",
"ms-python.mypy-type-checker",
"ms-python.black-formatter",
Expand Down
1 change: 0 additions & 1 deletion .devcontainer/toolshed-arm64/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"streetsidesoftware.code-spell-checker",
"xaver.clang-format",
"vadimcn.vscode-lldb",
"matepek.vscode-catch2-test-adapter",
"ms-python.python",
"ms-python.mypy-type-checker",
"ms-python.black-formatter",
Expand Down
32 changes: 0 additions & 32 deletions .devcontainer/toolshed-cov-amd64/devcontainer.json

This file was deleted.

32 changes: 0 additions & 32 deletions .devcontainer/toolshed-cov-arm64/devcontainer.json

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,14 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: verification-c-coverage-reports
path: verification/build/DebugCov/coverage/*
path: |
verification/build/DebugCov/coverage/html/
verification/build/DebugCov/coverage/lcov/

language-verification-cpp-clang-native-extra:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toolshed:ts22.4.10
container: ghcr.io/opencyphal/toolshed:ts24.4.3
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -191,7 +193,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: verification-cpp-coverage-reports
path: verification/build/DebugCov/coverage/*
path: |
verification/build/DebugCov/coverage/html/
verification/build/DebugCov/coverage/lcov/

language-verification-python:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
"streetsidesoftware.code-spell-checker",
"xaver.clang-format",
"vadimcn.vscode-lldb",
"matepek.vscode-catch2-test-adapter"
]
}
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,9 @@
"addWords": true
}
},
"cmake.sourceDirectory": "${workspaceFolder}/verification"
"cmake.sourceDirectory": "${workspaceFolder}/verification",
"sonarlint.connectedMode.project": {
"connectionId": "opencyphal",
"projectKey": "OpenCyphal_nunavut"
}
}
23 changes: 21 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,35 @@ After configuring you can also use Ninja directly::
ninja -t targets

To obtain coverage information for the verification suite (not the Python code),
build the `cov_all` target and inspect the output under the `coverage` directory::
build the ``cov_all`` target and inspect the output under the ``coverage`` directory.
Coverage is generated using LLVM source-based code coverage and includes HTML, text,
and lcov format reports. Only generated Nunavut code is included in coverage; vendor
code (submodules, googletest, Unity), build artifacts, system headers, and test source
files are excluded::

cmake --build --preset build-DebugCov-clang-native-c-11 --target cov_all

This will:
1. Build all test executables with coverage instrumentation
2. Run all tests (generating .profraw files)
3. Merge coverage data into tests.profdata
4. Generate coverage reports in:
- ``build/DebugCov/coverage/html/index.html`` - Interactive HTML report
- ``build/DebugCov/coverage/text/summary.txt`` - Text summary
- ``build/DebugCov/coverage/lcov/coverage.lcov`` - lcov format for SonarCloud

cmake --build --preset build-clang-native-c-11-debug --target cov_all
.. note::

The ``DebugCov`` configuration is specifically for coverage builds. Use a preset
that includes ``DebugCov`` in its name (e.g., ``build-DebugCov-clang-native-c-11``)

.. warning::

When switching between gcc and clang you must do a full clean of your repo if you previously ran the coverage
build. For example ``git clean -xdf`` or clone a new repo in a different folder. Each compiler suite leaves
different byproducts that may interfere with the coverage tools in the other suite.


While we strongly encourage you to use the cmake presets, the CMakeLists.txt for the verification suite is driven by
three variables you can set in your environment or pass into cmake if using cmake directly:

Expand Down
Loading
Loading