Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit eb64a00

Browse files
author
Jamie Snape
committed
Tweak testing options
1 parent 35b9045 commit eb64a00

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ message(STATUS "Setting up database(s) for testing - done")
100100
#-----------------------------------------------------------------------------
101101

102102
include(CTest)
103+
option(MIDAS_RUN_SECURITY_CHECKS "Run security checks?" ON)
103104
option(MIDAS_RUN_STYLE_TESTS "Run PHP style tests?" ON)
104105
option(MIDAS_RUN_TESTS_WITH_COVERAGE "Run tests with coverage?" OFF)
105106

tests/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,17 @@ endfunction()
112112

113113
add_midas_style_test(StyleTests ${CMAKE_SOURCE_DIR}/tests)
114114

115-
add_test(NAME SecurityCheck COMMAND ${CMAKE_SOURCE_DIR}/vendor/bin/security-checker --no-interaction --quiet security:check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
115+
if(MIDAS_RUN_SECURITY_CHECKS)
116+
add_test(NAME SecurityCheck COMMAND ${CMAKE_SOURCE_DIR}/vendor/bin/security-checker --no-interaction security:check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
117+
endif()
116118

117-
add_test(UTF8Encoding ${PHP} ${CMAKE_SOURCE_DIR}/tests/UTF8Tools.php --src ${CMAKE_SOURCE_DIR})
118-
set_tests_properties(
119-
UTF8Encoding PROPERTIES
120-
FAIL_REGULAR_EXPRESSION "ERROR;WARNING"
121-
)
119+
if(MIDAS_RUN_STYLE_TESTS)
120+
add_test(UTF8Encoding ${PHP} ${CMAKE_SOURCE_DIR}/tests/UTF8Tools.php --src ${CMAKE_SOURCE_DIR})
121+
set_tests_properties(
122+
UTF8Encoding PROPERTIES
123+
FAIL_REGULAR_EXPRESSION "ERROR;WARNING"
124+
)
125+
endif()
122126

123127
if(NOT WIN32)
124128
add_midas_test(KWUtils KWUtilsTest.php)

0 commit comments

Comments
 (0)