diff --git a/CMakeLists.txt b/CMakeLists.txt index 4919e462e..24f641c7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,6 +100,7 @@ message(STATUS "Setting up database(s) for testing - done") #----------------------------------------------------------------------------- include(CTest) +option(MIDAS_RUN_SECURITY_CHECKS "Run security checks?" ON) option(MIDAS_RUN_STYLE_TESTS "Run PHP style tests?" ON) option(MIDAS_RUN_TESTS_WITH_COVERAGE "Run tests with coverage?" OFF) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 92912eb96..79505ef21 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -112,13 +112,17 @@ endfunction() add_midas_style_test(StyleTests ${CMAKE_SOURCE_DIR}/tests) -add_test(NAME SecurityCheck COMMAND ${CMAKE_SOURCE_DIR}/vendor/bin/security-checker --no-interaction --quiet security:check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +if(MIDAS_RUN_SECURITY_CHECKS) + add_test(NAME SecurityCheck COMMAND ${CMAKE_SOURCE_DIR}/vendor/bin/security-checker --no-interaction security:check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +endif() -add_test(UTF8Encoding ${PHP} ${CMAKE_SOURCE_DIR}/tests/UTF8Tools.php --src ${CMAKE_SOURCE_DIR}) -set_tests_properties( - UTF8Encoding PROPERTIES - FAIL_REGULAR_EXPRESSION "ERROR;WARNING" -) +if(MIDAS_RUN_STYLE_TESTS) + add_test(UTF8Encoding ${PHP} ${CMAKE_SOURCE_DIR}/tests/UTF8Tools.php --src ${CMAKE_SOURCE_DIR}) + set_tests_properties( + UTF8Encoding PROPERTIES + FAIL_REGULAR_EXPRESSION "ERROR;WARNING" + ) +endif() if(NOT WIN32) add_midas_test(KWUtils KWUtilsTest.php)