Skip to content

Commit 629f8b2

Browse files
committed
Fixed disabled test properties
1 parent febb177 commit 629f8b2

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

.github/workflows/cmake.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424
- 'Version3/**'
2525
- 'README.md'
2626
schedule:
27-
- cron: '1 2 2/7 * *'
27+
- cron: '1 2 * * 2'
2828
workflow_dispatch:
2929

3030
jobs:
@@ -167,7 +167,7 @@ jobs:
167167
run: ctest -S ctest.cmake -DCTEST_TEST_TIMEOUT=900
168168

169169
- name: CMemCheck (Linux)
170-
if: runner.os == 'Linux'
170+
if: runner.os == 'Linux' && github.event_name == 'schedule'
171171
run: ctest -S cmemcheck.cmake -DCTEST_TEST_TIMEOUT=900
172172

173173
- name: Upload results

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ if(PHRQC_USE_GMP)
162162
endif()
163163

164164
option(PHRQC_TESTING "Set TESTING preprocessor definition" OFF)
165-
option(PHRQC_ENABLE_REGRESSION_TESTING "When TESTING, enable tests that take longer to run" OFF)
165+
option(PHRQC_ENABLE_REGRESSION_TESTING "Enables all tests including tests that take over 600 seconds to run" OFF)
166166

167167
if(MSVC)
168168

cmemcheck.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
2222
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
2323
ctest_start("Continuous")
2424
ctest_update()
25-
ctest_configure(OPTIONS -DPHRQC_TESTING:BOOL=ON)
25+
ctest_configure(OPTIONS "-DPHRQC_TESTING:BOOL=ON;-DPHRQC_ENABLE_REGRESSION_TESTING:BOOL=ON")
2626
ctest_build()
2727
if(${CMAKE_VERSION} VERSION_LESS "3.29")
2828
ctest_memcheck(EXCLUDE "numdiff" EXCLUDE_LABEL "long_memcheck" PARALLEL_LEVEL 2)

mytest/CMakeLists.txt

+5-11
Original file line numberDiff line numberDiff line change
@@ -830,21 +830,15 @@ if (NUMDIFF_COMMAND)
830830
endif()
831831
endforeach()
832832
endif()
833-
834-
# # disable tests that take too long
835-
# if (${prefix} IN_LIST SKIP)
836-
# set_tests_properties(${test_name} PROPERTIES DISABLED TRUE)
837-
# endif()
838833
endforeach()
839834
endif()
840835

841836
if (NOT PHRQC_ENABLE_REGRESSION_TESTING)
842-
foreach(test ${TESTS})
843-
get_test_property(test_labels ${test} LABELS)
844-
if ("long_debug" IN_LIST test_labels)
845-
set_tests_properties(${test} PROPERTIES DISABLED TRUE)
846-
endif()
847-
if ("long_memcheck" IN_LIST test_labels)
837+
get_property(all_tests DIRECTORY PROPERTY TESTS)
838+
foreach(test ${all_tests})
839+
get_test_property(${test} LABELS test_labels)
840+
if ("long_debug" IN_LIST test_labels OR "long_memcheck" IN_LIST test_labels)
841+
# message(STATUS "disabling ${test}" )
848842
set_tests_properties(${test} PROPERTIES DISABLED TRUE)
849843
endif()
850844
endforeach()

0 commit comments

Comments
 (0)