Commit 34398a13 authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

UPDATE test components and coverage visibility in generated cep code

parent 9d4bd064
......@@ -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()
......@@ -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@"
......
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment