From 9689ad23c23f590de422827a077705cf5b4125d9 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 19 Feb 2021 11:21:02 +0100 Subject: [PATCH 1/3] added RUN_SERIAL option to the parallel tests in Triangulation_3 and Mesh_3 --- Mesh_3/test/Mesh_3/CMakeLists.txt | 15 +++++++++++++++ .../examples/Triangulation_3/CMakeLists.txt | 5 +++++ .../test/Triangulation_3/CMakeLists.txt | 8 ++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 404c607d889..e070ffc792c 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -119,6 +119,21 @@ if ( CGAL_FOUND ) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() endforeach() + + if(BUILD_TESTING) + set_property(TEST execution___of__test_meshing_verbose PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_meshing_polyhedron_with_features PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_meshing_implicit_function PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_meshing_3D_image PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_meshing_3D_gray_image PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_meshing_unit_tetrahedron PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_meshing_polyhedron PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_meshing_polyhedral_complex PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_mesh_capsule_var_distance_bound PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_mesh_3_issue_1554 PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_mesh_polyhedral_domain_with_features_deprecated PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_mesh_cell_base_3 PROPERTY RUN_SERIAL 1) + endif() endif() else() diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index a44531dec74..8976d00e6b3 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -52,6 +52,11 @@ if ( CGAL_FOUND ) message(STATUS "NOTICE: a few examples require TBB and will not be compiled.") endif() + if(BUILD_TESTING) + set_property(TEST execution___of__parallel_insertion_and_removal_in_regular_3 PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__parallel_insertion_in_delaunay_3 PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__sequential_parallel PROPERTY RUN_SERIAL 1) + endif() else() message(STATUS "This program requires the CGAL library, and will not be compiled.") diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 4dfcc8c4bb5..7b1222f44b9 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -40,7 +40,11 @@ if ( CGAL_FOUND ) endforeach() endif() - if(BUILD_TESTING) + if(BUILD_TESTING) + set_property(TEST execution___of__test_delaunay_3 PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_regular_3 PROPERTY RUN_SERIAL 1) + set_property(TEST execution___of__test_regular_insert_range_with_info PROPERTY RUN_SERIAL 1) + set_tests_properties( execution___of__test_delaunay_hierarchy_3 execution___of__test_delaunay_hierarchy_3_old @@ -53,5 +57,5 @@ if ( CGAL_FOUND ) else() message(STATUS "This program requires the CGAL library, and will not be compiled.") - + endif() From 5ca5472ba43cc58cd1551588af652b80dc0e085d Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 19 Feb 2021 13:15:09 +0100 Subject: [PATCH 2/3] better style --- Mesh_3/test/Mesh_3/CMakeLists.txt | 26 ++++++++++--------- .../examples/Triangulation_3/CMakeLists.txt | 8 +++--- .../test/Triangulation_3/CMakeLists.txt | 12 +++++---- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index e070ffc792c..2792abc27a2 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -121,18 +121,20 @@ if ( CGAL_FOUND ) endforeach() if(BUILD_TESTING) - set_property(TEST execution___of__test_meshing_verbose PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_meshing_polyhedron_with_features PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_meshing_implicit_function PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_meshing_3D_image PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_meshing_3D_gray_image PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_meshing_unit_tetrahedron PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_meshing_polyhedron PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_meshing_polyhedral_complex PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_mesh_capsule_var_distance_bound PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_mesh_3_issue_1554 PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_mesh_polyhedral_domain_with_features_deprecated PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_mesh_cell_base_3 PROPERTY RUN_SERIAL 1) + set_property(TEST + execution___of__test_meshing_verbose + execution___of__test_meshing_polyhedron_with_features + execution___of__test_meshing_implicit_function + execution___of__test_meshing_3D_image + execution___of__test_meshing_3D_gray_image + execution___of__test_meshing_unit_tetrahedron + execution___of__test_meshing_polyhedron + execution___of__test_meshing_polyhedral_complex + execution___of__test_mesh_capsule_var_distance_bound + execution___of__test_mesh_3_issue_1554 + execution___of__test_mesh_polyhedral_domain_with_features_deprecated + execution___of__test_mesh_cell_base_3 + PROPERTY RUN_SERIAL 1) endif() endif() diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 8976d00e6b3..d25ea650600 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -53,9 +53,11 @@ if ( CGAL_FOUND ) endif() if(BUILD_TESTING) - set_property(TEST execution___of__parallel_insertion_and_removal_in_regular_3 PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__parallel_insertion_in_delaunay_3 PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__sequential_parallel PROPERTY RUN_SERIAL 1) + set_property(TEST + execution___of__parallel_insertion_and_removal_in_regular_3 + execution___of__parallel_insertion_in_delaunay_3 + execution___of__sequential_parallel + PROPERTY RUN_SERIAL 1) endif() else() diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 7b1222f44b9..1741af02164 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -41,10 +41,12 @@ if ( CGAL_FOUND ) endif() if(BUILD_TESTING) - set_property(TEST execution___of__test_delaunay_3 PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_regular_3 PROPERTY RUN_SERIAL 1) - set_property(TEST execution___of__test_regular_insert_range_with_info PROPERTY RUN_SERIAL 1) - + set_property(TEST + execution___of__test_delaunay_3 + execution___of__test_regular_3 + execution___of__test_regular_insert_range_with_info + PROPERTY RUN_SERIAL 1) + set_tests_properties( execution___of__test_delaunay_hierarchy_3 execution___of__test_delaunay_hierarchy_3_old @@ -57,5 +59,5 @@ if ( CGAL_FOUND ) else() message(STATUS "This program requires the CGAL library, and will not be compiled.") - + endif() From a61653b2d84fedfd5469a073d1a40ba5a59a94a1 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 22 Feb 2021 12:03:05 +0100 Subject: [PATCH 3/3] all parallel tests are executed serial only in case of TBB on --- .../examples/Triangulation_3/CMakeLists.txt | 18 +++++++++--------- .../test/Triangulation_3/CMakeLists.txt | 16 +++++++++------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index d25ea650600..5cfa58d2d27 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -47,18 +47,18 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "sequential_parallel.cpp" ) target_link_libraries( parallel_insertion_and_removal_in_regular_3 PUBLIC CGAL::TBB_support) target_link_libraries( parallel_insertion_in_delaunay_3 PUBLIC CGAL::TBB_support ) - target_link_libraries( sequential_parallel PUBLIC CGAL::TBB_support) + target_link_libraries( sequential_parallel PUBLIC CGAL::TBB_support) + + if(BUILD_TESTING) + set_property(TEST + execution___of__parallel_insertion_and_removal_in_regular_3 + execution___of__parallel_insertion_in_delaunay_3 + execution___of__sequential_parallel + PROPERTY RUN_SERIAL 1) + endif() else() message(STATUS "NOTICE: a few examples require TBB and will not be compiled.") endif() - - if(BUILD_TESTING) - set_property(TEST - execution___of__parallel_insertion_and_removal_in_regular_3 - execution___of__parallel_insertion_in_delaunay_3 - execution___of__sequential_parallel - PROPERTY RUN_SERIAL 1) - endif() else() message(STATUS "This program requires the CGAL library, and will not be compiled.") diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 1741af02164..444dd43a145 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -38,15 +38,17 @@ if ( CGAL_FOUND ) test_regular_insert_range_with_info) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endforeach() + + if(BUILD_TESTING) + set_property(TEST + execution___of__test_delaunay_3 + execution___of__test_regular_3 + execution___of__test_regular_insert_range_with_info + PROPERTY RUN_SERIAL 1) + endif() endif() - if(BUILD_TESTING) - set_property(TEST - execution___of__test_delaunay_3 - execution___of__test_regular_3 - execution___of__test_regular_insert_range_with_info - PROPERTY RUN_SERIAL 1) - + if(BUILD_TESTING) set_tests_properties( execution___of__test_delaunay_hierarchy_3 execution___of__test_delaunay_hierarchy_3_old