Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
ScalFMM
Commits
0d2dee44
Commit
0d2dee44
authored
11 years ago
by
Olivier COULAUD
Browse files
Options
Downloads
Patches
Plain Diff
Add coverage
parent
d2bca29a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Src/Utils/FPoint.hpp
+8
-0
8 additions, 0 deletions
Src/Utils/FPoint.hpp
UTests/CMakeLists.txt
+41
-1
41 additions, 1 deletion
UTests/CMakeLists.txt
with
49 additions
and
1 deletion
Src/Utils/FPoint.hpp
+
8
−
0
View file @
0d2dee44
...
...
@@ -179,6 +179,14 @@ public:
FReal
*
getDataValue
(){
return
this
->
data
;
}
/**
* Get a pointer on the coordinate of FPoint
* @return the data value array
*/
const
FReal
*
getDataValue
()
const
{
return
this
->
data
;
}
/**
*Compute the distance to the origin
* @return the norm of the Fpoint
...
...
This diff is collapsed.
Click to expand it.
UTests/CMakeLists.txt
+
41
−
1
View file @
0d2dee44
...
...
@@ -6,8 +6,47 @@ endif(insource)
project
(
UTests_scalfmm CXX
)
FIND_PROGRAM
(
TESTS_GCOV_PATH gcov
)
FIND_PROGRAM
(
TESTS_LCOV_PATH lcov
)
FIND_PROGRAM
(
TESTS_GENHTML_PATH genhtml
)
FIND_PROGRAM
(
TESTS_GCOVR_PATH gcovr PATHS
${
CMAKE_SOURCE_DIR
}
/Modules
)
MESSAGE
(
STATUS
"GG
${
TESTS_GCOV_PATH
}
${
TESTS_LCOV_PATH
}
${
TESTS_GENHTML_PATH
}
${
TESTS_GCOVR_PATH
}
"
)
IF
(
TESTS_GCOV_PATH AND TESTS_LCOV_PATH AND TESTS_GCOVR_PATH
)
#Script for launching lcov and generating an html report
ADD_CUSTOM_TARGET
(
coverage
)
ADD_CUSTOM_COMMAND
(
TARGET coverage
COMMAND mkdir -p CoverageReport
COMMAND
${
TESTS_LCOV_PATH
}
--directory . --zerocounters
COMMAND make test
# Capturing lcov counters and generating report
COMMAND
${
TESTS_LCOV_PATH
}
--directory . --capture --output-file
${
_outputname
}
.info
COMMAND
${
TESTS_LCOV_PATH
}
--remove
${
_outputname
}
.info 'tests/*' '/usr/*' --output-file
${
_outputname
}
.info.cleaned
COMMAND
${
TESTS_GENHTML_PATH
}
-o
${
_outputname
}
${
_outputname
}
.info.cleaned
COMMAND
${
CMAKE_COMMAND
}
-E remove
${
_outputname
}
.info
${
_outputname
}
.info.cleaned
COMMAND echo
"Open
${
CMAKE_BINARY_DIR
}
/CoverageReport/index.html to view the report on the coverage of the code."
WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
MESSAGE
(
STATUS
" GCOV
${
COVERAGE_COMMAND
}
"
)
MESSAGE
(
STATUS
"CMAKE_CXX_COMPILER_ID
${
CMAKE_CXX_COMPILER_ID
}
"
)
IF
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
SET
(
TESTS_GCOV_CXX_FLAGS
"-g -fprofile-arcs -ftest-coverage"
)
SET
(
TESTS_GCOV_LINKER_FLAGS
"-g -fprofile-arcs -ftest-coverage -lgcov"
)
ENDIF
()
#
ELSE
()
SET
(
GCOV_CXX_FLAGS
""
)
SET
(
GCOV_LINKER_FLAGS
""
)
MESSAGE
(
WARNING
"Could not find gcov - No Coverage option for Tests"
)
ENDIF
()
set
(
EXECUTABLE_OUTPUT_PATH
${
CMAKE_BUILD_TYPE
}
)
ADD_DEFINITIONS
(
${
ScaLFMM_CXX_FLAGS
}
)
ADD_DEFINITIONS
(
${
ScaLFMM_CXX_FLAGS
}
${
TESTS_GCOV_CXX_FLAGS
}
)
# Find all code files
file
(
...
...
@@ -62,6 +101,7 @@ foreach(exec ${source_tests_files})
${
scalfmm_lib
}
${
BLAS_LIBRARIES
}
${
LAPACK_LIBRARIES
}
${
TESTS_GCOV_LINKER_FLAGS
}
)
add_test
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment