Skip to content

Commit

Permalink
Fixed disabled test properties
Browse files Browse the repository at this point in the history
  • Loading branch information
scharlton2 committed Apr 19, 2024
1 parent febb177 commit 629f8b2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- 'Version3/**'
- 'README.md'
schedule:
- cron: '1 2 2/7 * *'
- cron: '1 2 * * 2'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
run: ctest -S ctest.cmake -DCTEST_TEST_TIMEOUT=900

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

- name: Upload results
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ if(PHRQC_USE_GMP)
endif()

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

if(MSVC)

Expand Down
2 changes: 1 addition & 1 deletion cmemcheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
ctest_start("Continuous")
ctest_update()
ctest_configure(OPTIONS -DPHRQC_TESTING:BOOL=ON)
ctest_configure(OPTIONS "-DPHRQC_TESTING:BOOL=ON;-DPHRQC_ENABLE_REGRESSION_TESTING:BOOL=ON")
ctest_build()
if(${CMAKE_VERSION} VERSION_LESS "3.29")
ctest_memcheck(EXCLUDE "numdiff" EXCLUDE_LABEL "long_memcheck" PARALLEL_LEVEL 2)
Expand Down
16 changes: 5 additions & 11 deletions mytest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -830,21 +830,15 @@ if (NUMDIFF_COMMAND)
endif()
endforeach()
endif()

# # disable tests that take too long
# if (${prefix} IN_LIST SKIP)
# set_tests_properties(${test_name} PROPERTIES DISABLED TRUE)
# endif()
endforeach()
endif()

if (NOT PHRQC_ENABLE_REGRESSION_TESTING)
foreach(test ${TESTS})
get_test_property(test_labels ${test} LABELS)
if ("long_debug" IN_LIST test_labels)
set_tests_properties(${test} PROPERTIES DISABLED TRUE)
endif()
if ("long_memcheck" IN_LIST test_labels)
get_property(all_tests DIRECTORY PROPERTY TESTS)
foreach(test ${all_tests})
get_test_property(${test} LABELS test_labels)
if ("long_debug" IN_LIST test_labels OR "long_memcheck" IN_LIST test_labels)
# message(STATUS "disabling ${test}" )
set_tests_properties(${test} PROPERTIES DISABLED TRUE)
endif()
endforeach()
Expand Down

0 comments on commit 629f8b2

Please # to comment.