From 2ce2ed92a4400ecaaa6aac813e206d08b0b1f029 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 19 Apr 2017 08:49:23 +0000 Subject: Rename tests and examples to be consistent with the naming rules xml test results is now generated out of source git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_test_windows@2364 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ae2dd1592b63f4e7da5e17655761697b6daf7dd0 --- src/Witness_complex/example/CMakeLists.txt | 30 ++++++++++++++++-------------- src/Witness_complex/test/CMakeLists.txt | 21 +++------------------ 2 files changed, 19 insertions(+), 32 deletions(-) (limited to 'src/Witness_complex') diff --git a/src/Witness_complex/example/CMakeLists.txt b/src/Witness_complex/example/CMakeLists.txt index 549a85be..670651ce 100644 --- a/src/Witness_complex/example/CMakeLists.txt +++ b/src/Witness_complex/example/CMakeLists.txt @@ -6,7 +6,8 @@ target_link_libraries(Witness_complex_example_nearest_landmark_table ${Boost_SYS if (TBB_FOUND) target_link_libraries(Witness_complex_example_nearest_landmark_table ${TBB_LIBRARIES}) endif() -add_test(Witness_complex_test_nearest_landmark_table Witness_complex_example_nearest_landmark_table) +add_test(NAME Witness_complex_example_nearest_landmark_table + COMMAND $) # CGAL and Eigen3 are required for Euclidean version of Witness if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) @@ -28,17 +29,18 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) target_link_libraries(Witness_complex_example_strong_witness_persistence ${TBB_LIBRARIES}) endif() - add_test(Witness_complex_off_test_torus - ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_example_off - ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off 20 1.0 3) - add_test(Witness_complex_strong_off_test_torus - ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_example_strong_off - ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off 20 1.0 3) - add_test(Witness_complex_test_sphere_10 Witness_complex_example_sphere 10) - add_test(Witness_complex_test_torus_persistence - ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_example_witness_persistence - ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off -l 20 -a 0.5) - add_test(Witness_complex_strong_test_torus_persistence - ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_example_strong_witness_persistence - ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off -l 20 -a 0.5) + add_test(NAME Witness_complex_example_off_test_torus + COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "20" "1.0" "3") + add_test(NAME Witness_complex_example_strong_off_test_torus + COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "20" "1.0" "3") + add_test(NAME Witness_complex_example_test_sphere_10 + COMMAND $ "10") + add_test(NAME Witness_complex_example_test_torus_persistence + COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-l" "20" "-a" "0.5") + add_test(NAME Witness_complex_example_strong_test_torus_persistence + COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-l" "20" "-a" "0.5") endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) diff --git a/src/Witness_complex/test/CMakeLists.txt b/src/Witness_complex/test/CMakeLists.txt index e73f9c3a..152e2f2c 100644 --- a/src/Witness_complex/test/CMakeLists.txt +++ b/src/Witness_complex/test/CMakeLists.txt @@ -1,14 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(Witness_complex_tests) -if (GCOVR_PATH) - # for gcovr to make coverage reports - Corbera Jenkins plugin - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") -endif() -if (GPROF_PATH) - # for gprof to make coverage reports - Jenkins - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") -endif() +include(GUDHI_test_coverage) add_executable ( Witness_complex_test_simple_witness_complex test_simple_witness_complex.cpp ) target_link_libraries(Witness_complex_test_simple_witness_complex ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) @@ -16,11 +9,7 @@ if (TBB_FOUND) target_link_libraries(Witness_complex_test_simple_witness_complex ${TBB_LIBRARIES}) endif(TBB_FOUND) -# Unitary tests definition and xml result file generation -add_test(NAME simple_witness_complex - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_test_simple_witness_complex - # XML format for Jenkins xUnit plugin - --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Witness_complex_test_simple_witness_complexUT.xml --log_level=test_suite --report_level=no) +gudhi_add_coverage_test(Witness_complex_test_simple_witness_complex) # CGAL and Eigen3 are required for Euclidean version of Witness if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) @@ -30,9 +19,5 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) target_link_libraries(Witness_complex_test_euclidean_simple_witness_complex ${TBB_LIBRARIES}) endif(TBB_FOUND) - # Unitary tests definition and xml result file generation - add_test(NAME euclidean_simple_witness_complex - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_test_euclidean_simple_witness_complex - # XML format for Jenkins xUnit plugin - --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Witness_complex_test_euclidean_simple_witness_complexUT.xml --log_level=test_suite --report_level=no) + gudhi_add_coverage_test(Witness_complex_test_euclidean_simple_witness_complex) endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) -- cgit v1.2.3