Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
559197b
feat(core): add native filter, with arguments
mzdun Jul 25, 2023
0f4d871
test: take `report --out` into consideration
mzdun Jul 27, 2023
042211b
feat(core): add `cov collect`
mzdun Jul 27, 2023
0fbebb8
fix: compile on windows + w/out warnings
mzdun Jul 28, 2023
daf7acf
build: reduce code duplication
mzdun Jul 28, 2023
14b78bd
fix: alleviate some crash reasons (human-based)
mzdun Jul 28, 2023
39dbb51
chore: reorganize new code additions
mzdun Jul 28, 2023
8a362c9
ci: run language tests on Ubuntu
mzdun Jul 28, 2023
062741e
fixup! chore: reorganize new code additions
mzdun Jul 28, 2023
abc2676
build: add signing tools for Windows
mzdun Jul 29, 2023
d4a94c4
feat(win32): add icons for native plugins
mzdun Jul 29, 2023
d0dfcd3
build: attach sign.py to flow
mzdun Jul 29, 2023
ec78e39
ci: plug signing and collection into the workflow
mzdun Jul 29, 2023
42e4979
ci: clean up reportable dirs/modules
mzdun Jul 29, 2023
6fb4c50
feat(win32): read output from OpenCppCoverage
mzdun Jul 29, 2023
9a96e33
build: use `cov collect` with OCC
mzdun Jul 29, 2023
93742d5
fix(core): remove short help from error messages
mzdun Jul 29, 2023
05a5f0e
fix: don't report on non-existent files
mzdun Jul 29, 2023
e2fa691
style: apply linter comments
mzdun Jul 29, 2023
b7c6ede
ci: move github secret to gh
mzdun Jul 29, 2023
6522dc0
fix: cleanup code for clang 15
mzdun Jul 29, 2023
e6fd513
fix: apply linter suggestions
mzdun Jul 29, 2023
55a1e41
ci: move token from secrets to sign.py (#69)
mzdun Jul 30, 2023
8cc8bdd
ci: fix name on the self-signed certificate
mzdun Jul 30, 2023
7949d57
ci: use latest successfully uploaded Conan cache
mzdun Jul 30, 2023
bf47db6
chore: leave hex dump for posterity
mzdun Jul 30, 2023
81b6133
test: cover strip-excludes
mzdun Jul 30, 2023
57d514c
test: cover `cov collect` (part 1)
mzdun Jul 30, 2023
bb49fe6
fix: apply changes stemming from test runs
mzdun Jul 30, 2023
3935b89
test: exclude some unvisitable lines
mzdun Jul 30, 2023
0dd5dbc
tests: fix latest json tests on Windows
mzdun Jul 30, 2023
5ac1dad
test: fix collect / collect-msvc for GitHub docker
mzdun Jul 31, 2023
0fca9b8
test: prepare for switch to runner
mzdun Aug 14, 2023
1b3083c
ci: get runner from github
mzdun Aug 14, 2023
fdea071
test: mark $chema in test files
mzdun Aug 14, 2023
6c1ea59
test: update $schema
mzdun Sep 17, 2023
13929be
test: fix not working tests
mzdun Sep 17, 2023
b6954d5
build: use runner with git user config
mzdun Sep 17, 2023
bdd1eb1
build: up the runner version
mzdun Sep 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .covcollect
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[collect]
compiler = /home/marcin/code/coverage/git2-cxx/apps/tests/copy/mocks/g++
bin-dir = build/
src-dir = .
15 changes: 15 additions & 0 deletions .covcollect.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[collect]
compiler = @CMAKE_CXX_COMPILER@
output = collected.json
bin-dir = .
src-dir = ../..
include = @SRC_INCLUDE@
exclude = @SRC_EXCLUDE@

[clang]
exec = bin/cov
exec = bin/cov-*
exec = libexec/cov/cov-*
exec = share/cov-*/**/filters/*
raw = .profraw
profdata = llvm-profiler
6 changes: 6 additions & 0 deletions .covmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
[module "app/main"]
path = apps/cov/
path = apps/builtins/
[module "ext/filters"]
path = extensions/filters
[module "ext/libs"]
path = extensions/libs
[module "ext"]
path = extensions
[module "hilite/lighter"]
path = libs/hilite/hilite
path = libs/hilite/lighter
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
BUILD_TYPE: ${{ matrix.build_type }}
CONAN_REVISIONS_ENABLED: 1
FLOW_COMMAND: python ./flow.py run --github --cutdown-os -c os=${{ matrix.os }} build_type=${{ matrix.build_type }} compiler=${{ matrix.compiler }} sanitizer=${{ matrix.sanitizer }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

runs-on: ${{ matrix.github_os }}
name: ${{ matrix.build_type }} with ${{ matrix.compiler }} on ${{ matrix.os }}${{ matrix.sanitizer && ' (and sanitizer)' || '' }}
Expand Down Expand Up @@ -89,6 +90,7 @@ jobs:
sudo rm -rf `which gcc-11`
sudo rm -rf `which clang++-14`
sudo rm -rf `which clang-14`
sudo locale-gen pl_PL.UTF-8 en_US.UTF-8 en_GB.UTF-8

- name: Install Conan
id: conan
Expand Down Expand Up @@ -116,6 +118,9 @@ jobs:
uses: KungFuDonkey/Install-OpenCppCoverage@v1
if: ${{ matrix.windows && matrix.build_type == 'Debug' }}

- name: Get latest archive from GitHub
run: python ./tools/download-latest.py

# ######## ######## ####### ## ######## ###### ########
# ## ## ## ## ## ## ## ## ## ## ##
# ## ## ## ## ## ## ## ## ## ##
Expand All @@ -136,7 +141,9 @@ jobs:
- name: Pack
id: artifacts
if: ${{ fromJson(needs.M.outputs.RELEASE) }}
run: ${{ env.FLOW_COMMAND }} -s Pack,StorePackages
run: ${{ env.FLOW_COMMAND }} -s Sign,Pack,SignPackages,StorePackages
env:
SIGN_TOKEN: ${{ secrets.SIGN_TOKEN }}

# ## ## ######## ## ####### ### ########
# ## ## ## ## ## ## ## ## ## ## ##
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"cpack_generator": ["TGZ", "DEB"],
"ubuntu": true,
"home": "/home/runner",
"latest_conan_hash": "e903f3ceb636ec2e496810737eb6033a1a8c39c227b437a0693d31086d8aa9df"
"latest_conan_hash": "0dbd3bbacea7ac58e0064195451c86646e20419f302f8539956ab60fa4b0bcfd"
},
{
"os": "windows",
Expand All @@ -31,7 +31,7 @@
"cpack_generator": ["ZIP", "WIX"],
"windows": true,
"home": "C:/Users/runneradmin",
"latest_conan_hash": "1f8eec6aa067e5a60fc4f0ab2668dae66a983ae5902b1eda006f134b009f84eb"
"latest_conan_hash": "586b1c2983ee7a95473708c44799b6027035f6df0503ed7dbcbcf3d3d847dd0e"
},
{"os": "ubuntu", "report_os": "Linux"},
{"compiler": "gcc", "report_compiler": "GNU", "gcc": true},
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ build/
web.log
super-linter.log
*.profraw
signature.key
temp.pfx
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@
"args": [
"--gtest_filter=*"
]
},
{
"type": "cppdbg",
"request": "launch",
"name": "Launch cov collect (gdb)",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/build/debug/libexec/cov/cov-collect",
"args": []
},
{
"type": "cppvsdbg",
"request": "launch",
"name": "Launch cov collect (vs)",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/build/debug/libexec/cov/cov-collect",
"args": []
}
]
}
11 changes: 10 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,32 @@
"arglist",
"cfglng",
"cobertura",
"covcollect",
"covdata",
"covlng",
"covmodules",
"cpack",
"ctest",
"DCOV",
"demangled",
"devel",
"errlng",
"fmtlng",
"hilite",
"initlng",
"libexec",
"lngs",
"loglng",
"modcnt",
"modlng",
"oneline",
"pofile",
"polib",
"propset",
"refslng",
"replng",
"resetlng",
"stdclang",
"workdir"
],
"files.associations": {
Expand Down Expand Up @@ -127,6 +135,7 @@
"cfloat": "cpp",
"climits": "cpp",
"queue": "cpp",
"source_location": "cpp"
"source_location": "cpp",
"condition_variable": "cpp"
}
}
2 changes: 2 additions & 0 deletions CMakeGraphVizOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ set(GRAPHVIZ_IGNORE_TARGETS "CONAN_LIB::.*"
".*_DEPS_TARGET"
".*-test"
cov-echo
cov-pwd
"mock-.*"
)
83 changes: 33 additions & 50 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,55 @@ list(APPEND CMAKE_PREFIX_PATH "${PROJECT_BINARY_DIR}/conan")

set(CONAN_CMAKE_SILENT_OUTPUT ON)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
find_package(ctre REQUIRED)
find_package(libgit2 REQUIRED)
find_package(fmt REQUIRED)
find_package(mbits-args REQUIRED)
find_package(mbits-lngs REQUIRED)
find_package(expat REQUIRED)

if (COV_TESTING)
enable_testing()

find_package(GTest REQUIRED)
find_program(JsonRunner_EXECUTABLE json-runner REQUIRED HINTS
"${PROJECT_SOURCE_DIR}/build/downloads"
"${PROJECT_SOURCE_DIR}/../json-runner/build/release/bin"
"${PROJECT_SOURCE_DIR}/../runner/build/release/bin"
)
message(STATUS "JsonRunner_EXECUTABLE is: ${JsonRunner_EXECUTABLE}")

set(COVERALLS_PREFIX cov_)
set(cov_COVERALLS_DIRS
apps/builtins
apps/cov
)

set(INCLUDED_IN_COVERAGE apps extensions)
foreach(module
libs/cov-api
libs/cell
libs/hilite/hilite
libs/hilite/lighter
libs/app
libs/cov-rt
)
list(APPEND cov_COVERALLS_DIRS ${module}/include ${module}/src)
list(APPEND INCLUDED_IN_COVERAGE ${module}/include ${module}/src)
endforeach()

foreach(extra cxx py3 ts)
list(APPEND cov_COVERALLS_DIRS libs/hilite/hilite-${extra}/src)
list(APPEND INCLUDED_IN_COVERAGE libs/hilite/hilite-${extra}/src)
endforeach()

set(EXCLUDED_FROM_COVERAGE
apps/tests
extensions/tests
)
foreach(extension
collect-api
excludes
native
)
list(APPEND EXCLUDED_FROM_COVERAGE
extensions/${extension}/test)
endforeach()

set(cov_COVERALLS_DIRS ${INCLUDED_IN_COVERAGE})
include(${PROJECT_SOURCE_DIR}/tools/coveralls/Coveralls.cmake)

set(TEST_REPORT_DIR "${PROJECT_BINARY_DIR}/test-results")
Expand Down Expand Up @@ -176,53 +196,13 @@ set(CORE_ROOT_DIR "../..")

message(STATUS "Sanitizer: ${COV_SANITIZE}")

include(cov)

add_subdirectory(external)
add_subdirectory(libs)
add_subdirectory(extensions)
add_subdirectory(apps)


if (CMAKE_GENERATOR MATCHES "Visual Studio" AND TARGET cov_coveralls_test)
add_dependencies(cov_coveralls_test
git2-test git2-stress-test
cov-test cov-stress-test
lighter-test lighter-stress-test
cov
)
endif()

if (MSVC_VERSION GREATER_EQUAL 1936 AND MSVC_IDE)
foreach (TGT
cov
cov-rt
json
app_main
app
cov-api
date-tz
lighter
hilite-cxx
hilite-py
hilite-ts
hilite
testing-lib
cov-echo
git2-test
git2-stress-test
cov-test
cov-stress-test
cov-rt-test
cov-rt-stress-test
lighter-test
lighter-stress-test
date-tz
json
)
if(TARGET ${TGT})
set_target_properties(${TGT} PROPERTIES VS_USER_PROPS "${PROJECT_SOURCE_DIR}/cmake/VS17.NoModules.props")
endif()
endforeach()
endif()

execute_process(COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/packages/system.py props
OUTPUT_VARIABLE COV_PROPERTIES
OUTPUT_STRIP_TRAILING_WHITESPACE
Expand Down Expand Up @@ -252,3 +232,6 @@ else()
endif()

file(GENERATE OUTPUT "${PROJECT_BINARY_DIR}/report_answers.txt" CONTENT "${COV_PROPERTIES}\n")
string(REPLACE ";" "\n include = " SRC_INCLUDE "${INCLUDED_IN_COVERAGE}")
string(REPLACE ";" "\n exclude = " SRC_EXCLUDE "${EXCLUDED_FROM_COVERAGE}")
configure_file("${PROJECT_SOURCE_DIR}/.covcollect.in" "${PROJECT_BINARY_DIR}/.covcollect" @ONLY)
Loading