Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CamiTK
CamiTK Community Edition
Commits
34398a13
Commit
34398a13
authored
Dec 01, 2017
by
Emmanuel Promayon
Browse files
UPDATE test components and coverage visibility in generated cep code
parent
9d4bd064
Changes
3
Hide whitespace changes
Inline
Side-by-side
sdk/cmake/modules/macros/camitk/test/CamiTKTestCoverage.cmake
View file @
34398a13
...
...
@@ -25,12 +25,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# that, when run, will launch all the test known by ctest in parallel
# and generate a report in ${PROJECT_BINARY_DIR}/camitk-test-coverage
#
# Note: to run test in parallel mode add "--parallel 9" to the EXECUTABLE parameter
# Note: you can run a quick test by bypassing some tests.
# e.g., to run only one test every 50 tests "-I 1,,50" (ctest documenation: -I Start,End,Stride,test#,test#
# Note: add "-V" or "-VV" for verbose
# Note: add "-V" or "-VV" for verbose
, add "-R pattern" to run only specific test
setup_target_for_coverage
(
NAME camitk-test-coverage
EXECUTABLE ctest --parallel
9
)
EXECUTABLE ctest --parallel
5
)
endif
()
endif
()
sdk/libraries/cepgenerator/resources/cep.CMakeLists.txt.in
View file @
34398a13
...
...
@@ -15,6 +15,12 @@ include(${CAMITK_USE_FILE})
#include(CTest)
#enable_testing()
# For gcc compiler, uncomment next two lines if you want to get a test coverage html report
# Build the project, then the specific target camitk-test-coverage
# Open the build directory camitk-test-coverage/index.html in your browser to view the coverage report
#option(CAMITK_TEST_COVERAGE "Code coverage" OFF)
#include(macros/camitk/test/CamiTKTestCoverage)
# define the CEP
camitk_extension_project(NAME "@PROJECT_NAME@"
CONTACT "@CONTACT@"
...
...
sdk/testapplications/testcomponents/main.cpp
View file @
34398a13
...
...
@@ -152,7 +152,7 @@ int main(int argc, char* argv[]) {
//-- avoid all redirection to console
MainWindow
*
defaultMainWindow
=
dynamic_cast
<
MainWindow
*>
(
a
.
getMainWindow
());
defaultMainWindow
->
redirectToConsole
(
false
);
testPassed
();
testInit
(
"Loading extension: "
+
inputComponentExtension
.
absoluteFilePath
().
toStdString
()
+
"..."
);
...
...
@@ -163,6 +163,13 @@ int main(int argc, char* argv[]) {
return
EXIT_FAILURE
;
}
// testing name and description
ComponentExtension
*
componentExtension
=
ExtensionManager
::
getComponentExtensions
().
last
();
std
::
cout
<<
" Loaded extension: "
<<
componentExtension
->
getName
().
toStdString
()
<<
" ("
<<
componentExtension
->
getDescription
().
toStdString
()
<<
"). "
<<
"Managed extension:"
<<
componentExtension
->
getFileExtensions
().
join
(
", "
).
toStdString
()
<<
std
::
endl
;
testPassed
();
testInit
(
"Opening component: "
+
inputComponent
.
fileName
().
toStdString
()
+
"..."
);
...
...
@@ -198,6 +205,7 @@ int main(int argc, char* argv[]) {
default:
// should never comes to this!
usage
(
"Argument error: level
\"
"
+
std
::
to_string
(
level
)
+
"
\"
is not implemented yet."
);
testFailed
();
return
EXIT_FAILURE
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment