diff --git a/.github/workflows/add_release_documentation.yml b/.github/workflows/add_release_documentation.yml index be9fd17f94..39643b46bb 100644 --- a/.github/workflows/add_release_documentation.yml +++ b/.github/workflows/add_release_documentation.yml @@ -93,7 +93,7 @@ jobs: && echo CXXFLAGS_var="-Wall -pedantic -O3" >> $GITHUB_ENV - name: build config variables if: ${{ env.MINOR_RELEASE == 'true' }} - run: export CONFIG_OPTIONS="--without-blas ${LESS_TEST_OPTION}" + run: export CONFIG_OPTIONS="--without-blas ${TEST_LEVEL_FLAG}" && export CONFIG_SERIAL_DEBUG="$CONFIG_OPTIONS --enable-debug --with-sc=$SC_SERIAL_DEBUG/install --with-p4est=$P4EST_SERIAL_DEBUG/install" - name: Check vars if: ${{ env.MINOR_RELEASE == 'true' }} diff --git a/.github/workflows/build_cmake_tarball.yml b/.github/workflows/build_cmake_tarball.yml index b63e420873..306b384a30 100644 --- a/.github/workflows/build_cmake_tarball.yml +++ b/.github/workflows/build_cmake_tarball.yml @@ -32,10 +32,10 @@ env: on: workflow_call: inputs: - LESS_TESTS: + TEST_LEVEL: required: true - type: boolean - description: 'Enable less tests option for configuring' + type: number + description: 'Test level used for configuring (0 for full tests, 1 for less thorough tests, 2 for minimal tests)' jobs: build: @@ -75,7 +75,7 @@ jobs: # # - name: build config variables - run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=$DEBUG_FLAGS -DCMAKE_CXX_FLAGS_DEBUG=$DEBUG_FLAGS -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE" + run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=$DEBUG_FLAGS -DCMAKE_CXX_FLAGS_DEBUG=$DEBUG_FLAGS -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE" && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV - name: cmake run: mkdir build && cd build && cmake ../ $CONFIG_OPTIONS @@ -118,12 +118,12 @@ jobs: echo TAR_DIR="$TAR_DIR" >>$GITHUB_ENV # build config vars - - name: less-test-option - if: ${{ inputs.LESS_TESTS }} - run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON" - && echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV + - name: Set test level + if: ${{ inputs.TEST_LEVEL != 0 }} + run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" + && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV - name: build config variables - run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE" + run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE" && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV - name: Check vars run: echo "[$CONFIG_DEBUG]" diff --git a/.github/workflows/tests_cmake_t8code.yml b/.github/workflows/tests_cmake_t8code.yml index 430fc1cd4c..18a8604f10 100644 --- a/.github/workflows/tests_cmake_t8code.yml +++ b/.github/workflows/tests_cmake_t8code.yml @@ -39,10 +39,10 @@ on: required: true type: string description: 'Build type (Release/Debug)' - LESS_TESTS: + TEST_LEVEL: required: true - type: boolean - description: 'Enable less tests option for configuring' + type: number + description: 'Test level used for configuring (0 for full tests, 1 for less thorough tests, 2 for minimal tests)' jobs: t8code_cmake_tests: @@ -79,12 +79,12 @@ jobs: # T8CODE # # build config vars - - name: less-test option - if: ${{ inputs.LESS_TESTS }} - run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON" - && echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV + - name: Set test level + if: ${{ inputs.TEST_LEVEL != 0 }} + run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" + && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV - name: build config variables - run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" + run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV # cmake and test - name: Printing MPI compiler info diff --git a/.github/workflows/tests_cmake_t8code_api.yml b/.github/workflows/tests_cmake_t8code_api.yml index 445e06d331..5505d16f0f 100644 --- a/.github/workflows/tests_cmake_t8code_api.yml +++ b/.github/workflows/tests_cmake_t8code_api.yml @@ -39,10 +39,10 @@ on: required: true type: string description: 'Build type (Release/Debug)' - LESS_TESTS: + TEST_LEVEL: required: true - type: boolean - description: 'Enable less tests option for configuring' + type: number + description: 'Test level used for configuring (0 for full tests, 1 for less thorough tests, 2 for minimal tests)' jobs: t8code_cmake_tests: @@ -80,12 +80,12 @@ jobs: # # # build config vars - - name: less-test option - if: ${{ inputs.LESS_TESTS }} - run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON" - && echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV + - name: Set test level + if: ${{ inputs.TEST_LEVEL != 0 }} + run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" + && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV - name: build config variables - run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_FORTRAN_INTERFACE=ON -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" + run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_FORTRAN_INTERFACE=ON -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV # cmake and test with fortran - name: check fortran diff --git a/.github/workflows/tests_cmake_t8code_linkage.yml b/.github/workflows/tests_cmake_t8code_linkage.yml index 0785d5127d..4252710041 100644 --- a/.github/workflows/tests_cmake_t8code_linkage.yml +++ b/.github/workflows/tests_cmake_t8code_linkage.yml @@ -39,10 +39,10 @@ on: required: true type: string description: 'Build type (Release/Debug)' - LESS_TESTS: + TEST_LEVEL: required: true - type: boolean - description: 'Enable less tests option for configuring' + type: number + description: 'Test level used for configuring (0 for full tests, 1 for less thorough tests, 2 for minimal tests)' jobs: t8code_cmake_tests: @@ -80,12 +80,12 @@ jobs: # # # build config vars - - name: less-test option - if: ${{ inputs.LESS_TESTS }} - run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON" - && echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV + - name: Set test level + if: ${{ inputs.TEST_LEVEL != 0 }} + run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" + && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV - name: build config variables - run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" + run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV # cmake and test with netcdf - name: check NetCDF diff --git a/.github/workflows/tests_cmake_t8code_w_shipped_submodules.yml b/.github/workflows/tests_cmake_t8code_w_shipped_submodules.yml index fbe73c3a75..d393504e92 100644 --- a/.github/workflows/tests_cmake_t8code_w_shipped_submodules.yml +++ b/.github/workflows/tests_cmake_t8code_w_shipped_submodules.yml @@ -39,10 +39,10 @@ on: required: true type: string description: 'Build type (Release/Debug)' - LESS_TESTS: + TEST_LEVEL: required: true - type: boolean - description: 'Enable less tests option for configuring' + type: number + description: 'Test level used for configuring (0 for full tests, 1 for less thorough tests, 2 for minimal tests)' jobs: t8code_cmake_tests: @@ -76,12 +76,12 @@ jobs: # T8CODE # # build config vars - - name: less-test option - if: ${{ inputs.LESS_TESTS }} - run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON" - && echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV + - name: Set test level + if: ${{ inputs.TEST_LEVEL != 0 }} + run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" + && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV - name: build config variables - run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE" + run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE" && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV # cmake and test - name: Printing MPI compiler info diff --git a/.github/workflows/tests_cmake_testsuite.yml b/.github/workflows/tests_cmake_testsuite.yml index ff80a72c66..19396d3662 100644 --- a/.github/workflows/tests_cmake_testsuite.yml +++ b/.github/workflows/tests_cmake_testsuite.yml @@ -89,8 +89,7 @@ jobs: MAKEFLAGS: ${{ matrix.MAKEFLAGS }} MPI: ${{ matrix.MPI }} BUILD_TYPE: ${{ matrix.BUILD_TYPE }} - LESS_TESTS: ${{ github.event_name == 'pull_request' }} - + TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. # Run t8code linkage tests with and without MPI and in serial and debug mode t8code_linkage_tests: @@ -108,7 +107,7 @@ jobs: MAKEFLAGS: ${{ matrix.MAKEFLAGS }} MPI: ${{ matrix.MPI }} BUILD_TYPE: ${{ matrix.BUILD_TYPE }} - LESS_TESTS: ${{ github.event_name == 'pull_request' }} + TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. # Run t8code linkage tests with and without MPI and in serial and debug mode t8code_api_tests: @@ -126,7 +125,7 @@ jobs: MAKEFLAGS: ${{ matrix.MAKEFLAGS }} MPI: ${{ matrix.MPI }} BUILD_TYPE: ${{ matrix.BUILD_TYPE }} - LESS_TESTS: ${{ github.event_name == 'pull_request' }} + TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. # Run t8code tests with shipped submodules. This test is only for the build system, so only one config is tested. t8code_w_shipped_submodules_tests: @@ -136,11 +135,11 @@ jobs: MAKEFLAGS: -j4 MPI: ON BUILD_TYPE: Debug - LESS_TESTS: ${{ github.event_name == 'pull_request' }} + TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. t8code_tarball: if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule') uses: ./.github/workflows/build_cmake_tarball.yml needs: [preparation, sc_p4est_tests, t8code_tests, t8code_linkage_tests, t8code_api_tests, t8code_w_shipped_submodules_tests] with: - LESS_TESTS: ${{ github.event_name == 'pull_request' }} + TEST_LEVEL: ${{ github.event_name == 'pull_request' && 1 || 0 }} # Set TEST_LEVEL to 1 if the event is a PR, otherwise 0. diff --git a/.github/workflows/update_documentation.yml b/.github/workflows/update_documentation.yml index c0a9b64593..ca7b5670f9 100644 --- a/.github/workflows/update_documentation.yml +++ b/.github/workflows/update_documentation.yml @@ -67,7 +67,7 @@ jobs: run: echo CFLAGS_var="-Wall -pedantic -O3" >> $GITHUB_ENV && echo CXXFLAGS_var="-Wall -pedantic -O3" >> $GITHUB_ENV - name: build config variables - run: export CONFIG_OPTIONS="--without-blas ${LESS_TEST_OPTION}" + run: export CONFIG_OPTIONS="--without-blas ${TEST_LEVEL_FLAG}" && export CONFIG_SERIAL_DEBUG="$CONFIG_OPTIONS --enable-debug --with-sc=$SC_SERIAL_DEBUG/install --with-p4est=$P4EST_SERIAL_DEBUG/install" - name: Check vars run: echo "[$CONFIG_SERIAL_DEBUG]" diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c348ad4a7..a5fa5370d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,6 @@ option( T8CODE_EXPORT_COMPILE_COMMANDS "Export the compile commands as json. Can option( T8CODE_BUILD_TESTS "Build t8code's automated tests" ON ) cmake_dependent_option( T8CODE_BUILD_TPL_TESTS "Build the tests from libsc and p4est" ON "T8CODE_BUILD_TESTS" OFF ) -cmake_dependent_option( T8CODE_ENABLE_LESS_TESTS "Tests not as thoroughly to speed up the test suite. Tests the same functionality. (WARNING: Use with care.)" OFF "T8CODE_BUILD_TESTS" OFF ) option( T8CODE_BUILD_EXAMPLES "Build t8code's examples" ON ) cmake_dependent_option( T8CODE_BUILD_TPL_EXAMPLES "Build the examples from libsc and p4est" OFF "T8CODE_BUILD_EXAMPLES" OFF ) @@ -41,6 +40,8 @@ option( T8CODE_USE_SYSTEM_P4EST "Use system-installed p4est library" OFF ) option( T8CODE_BUILD_DOCUMENTATION "Build t8code's documentation" OFF ) cmake_dependent_option( T8CODE_BUILD_DOCUMENTATION_SPHINX "Build t8code's documentation using sphinx" OFF "T8CODE_BUILD_DOCUMENTATION" OFF ) +set(T8CODE_TEST_LEVEL 0 CACHE STRING "Test level: 0 for full tests, 1 for less thorough tests, 2 for minimal tests. (WARNING: Use with care.)") +add_definitions(-DT8CODE_TEST_LEVEL=${T8CODE_TEST_LEVEL}) set(T8CODE_CUSTOM_PARALLEL_TEST_COMMAND "" CACHE STRING "Define a custom command for parallel tests , e.g.: mpirun -np 8 (overwrites standard mpirun -np 4 if build with mpi)") set(T8CODE_CUSTOM_SERIAL_TEST_COMMAND "" CACHE STRING "Define a custom command for serial tests.") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 98783ebaff..fc58c94b9d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -64,10 +64,6 @@ if( T8CODE_ENABLE_OCC ) target_link_libraries( T8 PUBLIC ${OpenCASCADE_LIBRARIES} ) endif() -if( T8CODE_ENABLE_LESS_TESTS ) - target_compile_definitions( T8 PUBLIC T8_ENABLE_LESS_TESTS=1 ) -endif() - if( T8CODE_BUILD_PEDANTIC ) target_compile_options( T8 PUBLIC -pedantic ) set (T8_CXXFLAGS "${T8_CXXFLAGS} -Wpedantic") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4e6d164d86..301a2bea2e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -125,7 +125,7 @@ add_t8_test( NAME t8_gtest_vtk_writer_parallel SOURCES t8_gtest_main.cxx t8_IO/ add_t8_test( NAME t8_gtest_nca_serial SOURCES t8_gtest_main.cxx t8_schemes/t8_gtest_nca.cxx ) add_t8_test( NAME t8_gtest_pyra_connectivity_serial SOURCES t8_gtest_main.cxx t8_schemes/t8_gtest_pyra_connectivity.cxx ) add_t8_test( NAME t8_gtest_face_neigh_serial SOURCES t8_gtest_main.cxx t8_schemes/t8_gtest_face_neigh.cxx ) -add_t8_test( NAME t8_gtest_get_linear_id_serial SOURCES t8_gtest_main.cxx t8_schemes/t8_gtest_get_linear_id.cxx ) +add_t8_test( NAME t8_gtest_get_linear_id_serial SOURCES t8_gtest_main.cxx t8_schemes/t8_gtest_get_linear_id.cxx ) add_t8_test( NAME t8_gtest_ancestor_serial SOURCES t8_gtest_main.cxx t8_schemes/t8_gtest_ancestor.cxx ) add_t8_test( NAME t8_gtest_ancestor_id_serial SOURCES t8_gtest_main.cxx t8_schemes/t8_gtest_ancestor_id.cxx ) add_t8_test( NAME t8_gtest_element_count_leaves_serial SOURCES t8_gtest_main.cxx t8_schemes/t8_gtest_element_count_leaves.cxx ) diff --git a/test/t8_cmesh_generator/t8_cmesh_parameterized_examples/t8_cmesh_params.hxx b/test/t8_cmesh_generator/t8_cmesh_parameterized_examples/t8_cmesh_params.hxx index 53c42de2a5..4303d5a927 100644 --- a/test/t8_cmesh_generator/t8_cmesh_parameterized_examples/t8_cmesh_params.hxx +++ b/test/t8_cmesh_generator/t8_cmesh_parameterized_examples/t8_cmesh_params.hxx @@ -38,7 +38,7 @@ #define T8_CMESH_BINARY 2 #define T8_CMESH_DIM_RANGE 4 /* this is the dim range for hypercube hybrid and empty cmesh */ #define T8_CMESH_MAX_TEST_DIMS 3 -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 #define T8_CMESH_MAX_NUM_OF_TREES 5 #define T8_CMESH_MAX_NUM_OF_PRISMS 5 #define T8_CMESH_MAX_NUM_XYZ_TREES 2 diff --git a/test/t8_forest/t8_gtest_balance.cxx b/test/t8_forest/t8_gtest_balance.cxx index 3914382ad2..fa4ef734d4 100644 --- a/test/t8_forest/t8_gtest_balance.cxx +++ b/test/t8_forest/t8_gtest_balance.cxx @@ -247,7 +247,7 @@ TEST_P (gtest_balance, balance_consistency_test) t8_forest_unref (&already_balanced_forest); } -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 4; #else const int maxlvl = 5; diff --git a/test/t8_forest/t8_gtest_element_is_leaf.cxx b/test/t8_forest/t8_gtest_element_is_leaf.cxx index a2f0ca767d..5cb65d0817 100644 --- a/test/t8_forest/t8_gtest_element_is_leaf.cxx +++ b/test/t8_forest/t8_gtest_element_is_leaf.cxx @@ -37,7 +37,7 @@ /* Maximum uniform level for forest. */ -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 #define T8_IS_LEAF_MAX_LVL 3 #else #define T8_IS_LEAF_MAX_LVL 4 diff --git a/test/t8_forest_incomplete/t8_gtest_iterate_replace.cxx b/test/t8_forest_incomplete/t8_gtest_iterate_replace.cxx index cc43d418f7..4d0c90d15a 100644 --- a/test/t8_forest_incomplete/t8_gtest_iterate_replace.cxx +++ b/test/t8_forest_incomplete/t8_gtest_iterate_replace.cxx @@ -220,7 +220,7 @@ t8_adapt_forest (t8_forest_t forest_from, t8_forest_adapt_t adapt_fn, int do_ada TEST_P (forest_iterate, test_iterate_replace) { -#if T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int runs = 1; #else const int runs = 2; diff --git a/test/t8_forest_incomplete/t8_gtest_permute_hole.cxx b/test/t8_forest_incomplete/t8_gtest_permute_hole.cxx index 7ee130f663..628a9d7cd3 100644 --- a/test/t8_forest_incomplete/t8_gtest_permute_hole.cxx +++ b/test/t8_forest_incomplete/t8_gtest_permute_hole.cxx @@ -65,7 +65,7 @@ class forest_permute: public testing::TestWithParam { SetUp () override { eclass = GetParam (); -#if T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 level = 1; #else level = eclass < 4 ? 2 : 1; diff --git a/test/t8_geometry/t8_gtest_point_inside.cxx b/test/t8_geometry/t8_gtest_point_inside.cxx index 5d2cd6266d..0c4ec3f39c 100644 --- a/test/t8_geometry/t8_gtest_point_inside.cxx +++ b/test/t8_geometry/t8_gtest_point_inside.cxx @@ -342,7 +342,7 @@ auto print_test = [] (const testing::TestParamInfo &info) { return * Number of points to use in tests * */ -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 #define T8_NUM_SAMPLE_POINTS 1000 #else #define T8_NUM_SAMPLE_POINTS 10000 diff --git a/test/t8_schemes/t8_gtest_ancestor_id.cxx b/test/t8_schemes/t8_gtest_ancestor_id.cxx index 23fd898498..3f68ee4a5e 100644 --- a/test/t8_schemes/t8_gtest_ancestor_id.cxx +++ b/test/t8_schemes/t8_gtest_ancestor_id.cxx @@ -75,7 +75,7 @@ class class_ancestor_id: public TestDFS { TEST_P (class_ancestor_id, t8_recursive_dfs_ancestor_id) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 4; #else const int maxlvl = 6; diff --git a/test/t8_schemes/t8_gtest_boundary_extrude.cxx b/test/t8_schemes/t8_gtest_boundary_extrude.cxx index a994546cd3..c717790413 100644 --- a/test/t8_schemes/t8_gtest_boundary_extrude.cxx +++ b/test/t8_schemes/t8_gtest_boundary_extrude.cxx @@ -84,7 +84,7 @@ class class_test_boundary_extrude: public TestDFS { TEST_P (class_test_boundary_extrude, test_boundary_extrude_dfs) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 4; #else const int maxlvl = 6; diff --git a/test/t8_schemes/t8_gtest_child_parent_face.cxx b/test/t8_schemes/t8_gtest_child_parent_face.cxx index 1e8ce8108d..2652a96601 100644 --- a/test/t8_schemes/t8_gtest_child_parent_face.cxx +++ b/test/t8_schemes/t8_gtest_child_parent_face.cxx @@ -72,7 +72,7 @@ class class_child_parent_face: public TestDFS { TEST_P (class_child_parent_face, t8_recursive_dfs_child_parent_face) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 4; #else const int maxlvl = 6; diff --git a/test/t8_schemes/t8_gtest_element_ref_coords.cxx b/test/t8_schemes/t8_gtest_element_ref_coords.cxx index f6f75c3a31..40962b1db5 100644 --- a/test/t8_schemes/t8_gtest_element_ref_coords.cxx +++ b/test/t8_schemes/t8_gtest_element_ref_coords.cxx @@ -33,7 +33,7 @@ #include #include -#if T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 #define MAX_LEVEL_REF_COORD_TEST 3 #else #define MAX_LEVEL_REF_COORD_TEST 4 diff --git a/test/t8_schemes/t8_gtest_equal.cxx b/test/t8_schemes/t8_gtest_equal.cxx index e3b42b483e..7631429055 100644 --- a/test/t8_schemes/t8_gtest_equal.cxx +++ b/test/t8_schemes/t8_gtest_equal.cxx @@ -76,7 +76,7 @@ class class_test_equal: public TestDFS { TEST_P (class_test_equal, test_equal_dfs) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 3; #else const int maxlvl = 5; diff --git a/test/t8_schemes/t8_gtest_face_descendant.cxx b/test/t8_schemes/t8_gtest_face_descendant.cxx index 696bb45483..e4cd31495b 100644 --- a/test/t8_schemes/t8_gtest_face_descendant.cxx +++ b/test/t8_schemes/t8_gtest_face_descendant.cxx @@ -111,7 +111,7 @@ class class_descendant: public TestDFS { TEST_P (class_descendant, t8_check_face_desc) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 3; #else const int maxlvl = 5; diff --git a/test/t8_schemes/t8_gtest_face_neigh.cxx b/test/t8_schemes/t8_gtest_face_neigh.cxx index 9051e5ed08..7ce88ee876 100644 --- a/test/t8_schemes/t8_gtest_face_neigh.cxx +++ b/test/t8_schemes/t8_gtest_face_neigh.cxx @@ -56,7 +56,7 @@ class face_neigh: public testing::TestWithParam> { const t8_scheme *scheme; t8_eclass_t eclass; -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 3; #else const int maxlvl = 4; diff --git a/test/t8_schemes/t8_gtest_find_parent.cxx b/test/t8_schemes/t8_gtest_find_parent.cxx index f27ef7a896..26ccf94055 100644 --- a/test/t8_schemes/t8_gtest_find_parent.cxx +++ b/test/t8_schemes/t8_gtest_find_parent.cxx @@ -66,7 +66,7 @@ class class_find_parent: public TestDFS { TEST_P (class_find_parent, t8_compute_child_find_parent) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 4; #else const int maxlvl = 6; diff --git a/test/t8_schemes/t8_gtest_get_linear_id.cxx b/test/t8_schemes/t8_gtest_get_linear_id.cxx index c13f710b5a..97905f878c 100644 --- a/test/t8_schemes/t8_gtest_get_linear_id.cxx +++ b/test/t8_schemes/t8_gtest_get_linear_id.cxx @@ -72,7 +72,7 @@ TEST_P (get_linear_id, uniform_forest) { t8_forest_t forest, forest_adapt; t8_cmesh_t cmesh; -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 5; #else const int maxlvl = 6; @@ -117,7 +117,7 @@ TEST_P (get_linear_id, uniform_forest) * (on the level defined by the element) */ TEST_P (get_linear_id, id_at_other_level) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int max_lvl = 3; /* Maximal level to compute elements on */ const int add_lvl = 3; /* maxlvl + add_lvl is the level of the descendants*/ #else diff --git a/test/t8_schemes/t8_gtest_input_equal_output.cxx b/test/t8_schemes/t8_gtest_input_equal_output.cxx index ae2bb29d31..cc83139f61 100644 --- a/test/t8_schemes/t8_gtest_input_equal_output.cxx +++ b/test/t8_schemes/t8_gtest_input_equal_output.cxx @@ -88,7 +88,7 @@ class class_test_equal: public TestDFS { TEST_P (class_test_equal, test_equal_dfs) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 3; #else const int maxlvl = 5; diff --git a/test/t8_schemes/t8_gtest_nca.cxx b/test/t8_schemes/t8_gtest_nca.cxx index 5410f4587a..8c10e14a73 100644 --- a/test/t8_schemes/t8_gtest_nca.cxx +++ b/test/t8_schemes/t8_gtest_nca.cxx @@ -224,7 +224,7 @@ t8_recursive_nca_check (t8_element_t *check_nca, t8_element_t *desc_a, t8_elemen * output of element_get_nca.*/ TEST_P (nca, recursive_check) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int recursion_depth = 3; #else /* User lower recursion depth for pyramids, it takes to much time otherwise */ diff --git a/test/t8_schemes/t8_gtest_pack_unpack.cxx b/test/t8_schemes/t8_gtest_pack_unpack.cxx index a3fb2a03d6..865f8980c5 100644 --- a/test/t8_schemes/t8_gtest_pack_unpack.cxx +++ b/test/t8_schemes/t8_gtest_pack_unpack.cxx @@ -127,7 +127,7 @@ class class_test_pack: public TestDFS { TEST_P (class_test_pack, test_equal_dfs) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 4; #else const int maxlvl = 6; diff --git a/test/t8_schemes/t8_gtest_set_linear_id.cxx b/test/t8_schemes/t8_gtest_set_linear_id.cxx index dff524ddaa..81f7ae449e 100644 --- a/test/t8_schemes/t8_gtest_set_linear_id.cxx +++ b/test/t8_schemes/t8_gtest_set_linear_id.cxx @@ -62,7 +62,7 @@ class class_test_set_linear_id: public TestBFS { /* Destroy BFS test */ bfs_test_teardown (); } -#if T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 3; #else const int maxlvl = 5; diff --git a/test/t8_schemes/t8_gtest_successor.cxx b/test/t8_schemes/t8_gtest_successor.cxx index 7a3075046e..9728b4e79d 100644 --- a/test/t8_schemes/t8_gtest_successor.cxx +++ b/test/t8_schemes/t8_gtest_successor.cxx @@ -136,7 +136,7 @@ t8_deep_successor (t8_element_t *element, t8_element_t *successor, t8_element_t TEST_P (class_successor, test_recursive_and_deep_successor) { -#ifdef T8_ENABLE_LESS_TESTS +#if T8CODE_TEST_LEVEL == 1 const int maxlvl = 3; #else const int maxlvl = 4;