Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/61 #69

Merged
merged 3 commits into from
Oct 14, 2023
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
69 changes: 38 additions & 31 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,44 +40,49 @@
"sonar.cfamily.reportingCppStandardOverride": "c++14"
},
"cSpell.words": [
"arity",
"AUTOSAR",
"builddir",
"cetl",
"DCETL_",
"cetlvast",
"DCETLVAST_",
"DCYPHAL",
"cyphal",
"opencyphal",
"cetlpf",
"AUTOSAR",
"tparam",
"unsynchronized",
"cetlvast",
"COMPILETEST_PRECHECK",
"copydoc",
"trimleft",
"Pavel",
"Kirienko",
"gtest",
"gmock",
"DSDL",
"rend",
"rbegin",
"builddir",
"sonarqube",
"sonarcloud",
"doxygen",
"googletest",
"googlemock",
"DCMAKE_",
"ctest",
"cyphal",
"DCETL_",
"DCETLVAST_",
"DCMAKE_",
"DCTEST_",
"pushd",
"popd",
"gcovr",
"DCYPHAL",
"devcontainer",
"DFETCHCONTENT_FULLY_DISCONNECTED",
"COMPILETEST_PRECHECK",
"arity",
"doxygen",
"DSDL",
"endforeach",
"endfunction",
"gcovr",
"gmock",
"googlemock",
"googletest",
"gtest",
"insertable",
"Kirienko",
"mainpage",
"subpage"
"NOTFOUND",
"opencyphal",
"Pavel",
"popd",
"pushd",
"rbegin",
"rend",
"sonarcloud",
"sonarqube",
"STREQUAL",
"subpage",
"tparam",
"trimleft",
"unsynchronized"
],
"files.associations": {
"memory_resource": "cpp",
Expand Down Expand Up @@ -180,7 +185,9 @@
"typeindex": "cpp",
"charconv": "cpp",
"csignal": "cpp",
"format": "cpp"
"format": "cpp",
"execution": "cpp",
"filesystem": "cpp"
},
"git-blame.gitWebUrl": ""
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ cd CETL
docker run --rm -it -v ${PWD}:/repo ghcr.io/opencyphal/toolshed:ts22.4.x
```
3. run the verify script to configure cetlvast. By including `-vv` you can see
the exact cmake commands verify.py is executing and you and use `--dry-run`
the exact cmake commands verify.py is executing and you can use `--dry-run`
if you really hate my python script so much that you want to do all the typing
yourself (It's not like I spent a ton of time documenting all of these options
for you. No no. It's fine. Don't try to apologize now...):
Expand Down
13 changes: 7 additions & 6 deletions cetlvast/cmake/modules/Findgcovr.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Copyright Amazon.com Inc. or its affiliates.
# SPDX-License-Identifier: MIT
#
# cSpell: words fprofile fcoverage gcov tracefile objdir gcno gcda objlib tracefiles

find_program(GCOVR gcovr)

Expand All @@ -22,7 +23,7 @@ define_property(DIRECTORY
)

# function: enable_instrumentation
# Sets well-known compiler flags for gcc and/or clang to insert intrumentations
# Sets well-known compiler flags for gcc and/or clang to insert instrumentations
# into binaries that generate coverage data.
#
# param: TARGET target - The target to set compile and link options on.
Expand Down Expand Up @@ -199,12 +200,12 @@ endfunction(define_gcovr_tracefile_target)
#
# param: COVERAGE_REPORT_FORMATS - Supports html or sonarqube
# param: ROOT_DIRECTORY string - The root directory of the source to be covered.
# param: OUT_REPORT_INDICIES list[string] - The name of a variable to set to a list of index files of the reports.
# param: OUT_REPORT_INDICES list[string] - The name of a variable to set to a list of index files of the reports.
#
function (enable_coverage_report)
#+-[input]----------------------------------------------------------------+
set(options "")
set(singleValueArgs OUT_REPORT_INDICIES ROOT_DIRECTORY)
set(singleValueArgs OUT_REPORT_INDICES ROOT_DIRECTORY)
set(multiValueArgs COVERAGE_REPORT_FORMATS)
cmake_parse_arguments(PARSE_ARGV 0 ARG "${options}" "${singleValueArgs}" "${multiValueArgs}")

Expand Down Expand Up @@ -241,7 +242,7 @@ function (enable_coverage_report)
else()
message(FATAL_ERROR "${LOCAL_REPORT_FORMAT} is not a supported coverage report format.")
endif()
list(APPEND LOCAL_REPORT_INDICIES ${LOCAL_REPORT_INDEX})
list(APPEND LOCAL_REPORT_INDICES ${LOCAL_REPORT_INDEX})

add_custom_command(
OUTPUT ${LOCAL_REPORT_INDEX}
Expand All @@ -263,8 +264,8 @@ function (enable_coverage_report)

#+-[output]---------------------------------------------------------------+

if (NOT ARG_OUT_REPORT_INDICIES STREQUAL "")
set(${ARG_OUT_REPORT_INDICIES} "${LOCAL_REPORT_INDICIES}" PARENT_SCOPE)
if (NOT ARG_OUT_REPORT_INDICES STREQUAL "")
set(${ARG_OUT_REPORT_INDICES} "${LOCAL_REPORT_INDICES}" PARENT_SCOPE)
endif()

endfunction(enable_coverage_report)
2 changes: 1 addition & 1 deletion cetlvast/suites/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ set_directory_properties(PROPERTIES
if (CMAKE_BUILD_TYPE STREQUAL "Coverage")
enable_coverage_report(COVERAGE_REPORT_FORMATS html sonarqube
ROOT_DIRECTORY ${CETL_ROOT}
OUT_REPORT_INDICIES LOCAL_COVERAGE_REPORT_INDICIES
OUT_REPORT_INDICES LOCAL_COVERAGE_REPORT_INDICIES
)
endif()

Expand Down
Loading