forked from gcovr/gcovr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup test case for coexisting object directories (gcovr#832)
Co-authored-by: Michael Förderer <[email protected]>
- Loading branch information
1 parent
064d409
commit 8e1a410
Showing
219 changed files
with
21,429 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
gcovr/tests/coexisting_object_directories-from_build_dir-without_object_dir/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
|
||
project(gcovr_parallel_calls LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_FLAGS_PROFILE --coverage) | ||
|
||
add_executable(parallel_call) | ||
|
||
target_sources (parallel_call | ||
PRIVATE | ||
source/fn_00.cpp | ||
source/fn_01.cpp | ||
source/fn_02.cpp | ||
source/fn_03.cpp | ||
source/fn_04.cpp | ||
source/fn_05.cpp | ||
source/fn_06.cpp | ||
source/fn_07.cpp | ||
source/fn_08.cpp | ||
source/fn_09.cpp | ||
source/main.cpp) | ||
|
||
if(ODD) | ||
target_compile_definitions (parallel_call PRIVATE ODD) | ||
endif() | ||
|
46 changes: 46 additions & 0 deletions
46
gcovr/tests/coexisting_object_directories-from_build_dir-without_object_dir/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
build.%: | ||
mkdir -p build/$* && cmake -G "Ninja" -DCMAKE_BUILD_TYPE=PROFILE -S . -B build/$* -D ODD=$(if $(filter b,$*),OFF,ON) | ||
cmake --build build/$* -- -v | ||
|
||
all: build.a build.b build.c | ||
|
||
run: txt cobertura html sonarqube coveralls | ||
|
||
.NOTPARALLEL: coverage.a.json coverage.b.json coverage.c.json | ||
|
||
coverage.%.json: | ||
$(eval base_dir := $(shell pwd)) | ||
$(eval build_dir := $(base_dir)/build/$*) | ||
cd $(build_dir) && ./parallel_call | ||
cd $(build_dir) && $(GCOVR) --json-pretty --json $(base_dir)/$@ --root $(base_dir) $(build_dir) | ||
|
||
coverage.%.txt: coverage.%.json | ||
$(GCOVR) -a $< -o $@ | ||
|
||
txt: coverage.a.txt coverage.b.txt coverage.c.txt | ||
|
||
cobertura.%.xml: coverage.%.json | ||
$(GCOVR) -a $< --cobertura-pretty --cobertura $@ | ||
|
||
cobertura: cobertura.a.xml cobertura.b.xml cobertura.c.xml | ||
|
||
coverage.%.html: coverage.%.json | ||
$(GCOVR) -a $< --html-details -o $@ | ||
|
||
html: coverage.a.html coverage.b.html coverage.c.html | ||
|
||
coveralls.%.json: coverage.%.json | ||
$(GCOVR) -a $< --coveralls-pretty --coveralls $@ | ||
|
||
coveralls: coveralls.a.json coveralls.b.json coveralls.c.json | ||
|
||
sonarqube.%.xml: coverage.%.json | ||
$(GCOVR) -a $< --sonarqube -o $@ | ||
|
||
sonarqube: sonarqube.a.xml sonarqube.b.xml sonarqube.c.xml | ||
|
||
clean: | ||
rm -rf build | ||
rm -f run.*.done | ||
rm -f coverage.*.* cobertura.*.* sonarqube.*.* coveralls.*.* |
106 changes: 106 additions & 0 deletions
106
...ing_object_directories-from_build_dir-without_object_dir/reference/gcc-12/cobertura.a.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<!DOCTYPE coverage SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'> | ||
<coverage line-rate="0.60526" branch-rate="1.0" lines-covered="23" lines-valid="38" branches-covered="0" branches-valid="0" complexity="0.0" timestamp="" version="gcovr 6.0+master"> | ||
<sources> | ||
<source>.</source> | ||
</sources> | ||
<packages> | ||
<package name="source" line-rate="0.60526" branch-rate="1.0" complexity="0.0"> | ||
<classes> | ||
<class name="fn_00_cpp" filename="source/fn_00.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_01_cpp" filename="source/fn_01.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_02_cpp" filename="source/fn_02.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_03_cpp" filename="source/fn_03.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_04_cpp" filename="source/fn_04.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_05_cpp" filename="source/fn_05.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_06_cpp" filename="source/fn_06.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_07_cpp" filename="source/fn_07.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_08_cpp" filename="source/fn_08.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_09_cpp" filename="source/fn_09.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="main_cpp" filename="source/main.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
<line number="6" hits="1" branch="false"/> | ||
<line number="8" hits="1" branch="false"/> | ||
<line number="10" hits="1" branch="false"/> | ||
<line number="12" hits="1" branch="false"/> | ||
<line number="14" hits="1" branch="false"/> | ||
<line number="28" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
</classes> | ||
</package> | ||
</packages> | ||
</coverage> |
106 changes: 106 additions & 0 deletions
106
...ing_object_directories-from_build_dir-without_object_dir/reference/gcc-12/cobertura.b.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<!DOCTYPE coverage SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'> | ||
<coverage line-rate="0.60526" branch-rate="1.0" lines-covered="23" lines-valid="38" branches-covered="0" branches-valid="0" complexity="0.0" timestamp="" version="gcovr 6.0+master"> | ||
<sources> | ||
<source>.</source> | ||
</sources> | ||
<packages> | ||
<package name="source" line-rate="0.60526" branch-rate="1.0" complexity="0.0"> | ||
<classes> | ||
<class name="fn_00_cpp" filename="source/fn_00.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_01_cpp" filename="source/fn_01.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_02_cpp" filename="source/fn_02.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_03_cpp" filename="source/fn_03.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_04_cpp" filename="source/fn_04.cpp" line-rate="0.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="0" branch="false"/> | ||
<line number="3" hits="0" branch="false"/> | ||
<line number="4" hits="0" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_05_cpp" filename="source/fn_05.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_06_cpp" filename="source/fn_06.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_07_cpp" filename="source/fn_07.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_08_cpp" filename="source/fn_08.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="fn_09_cpp" filename="source/fn_09.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="3" hits="1" branch="false"/> | ||
<line number="4" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
<class name="main_cpp" filename="source/main.cpp" line-rate="1.0" branch-rate="1.0" complexity="0.0"> | ||
<methods/> | ||
<lines> | ||
<line number="2" hits="1" branch="false"/> | ||
<line number="16" hits="1" branch="false"/> | ||
<line number="18" hits="1" branch="false"/> | ||
<line number="20" hits="1" branch="false"/> | ||
<line number="22" hits="1" branch="false"/> | ||
<line number="24" hits="1" branch="false"/> | ||
<line number="26" hits="1" branch="false"/> | ||
<line number="28" hits="1" branch="false"/> | ||
</lines> | ||
</class> | ||
</classes> | ||
</package> | ||
</packages> | ||
</coverage> |
Oops, something went wrong.