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

Commit

Permalink
Tweak testing options
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Nov 21, 2014
1 parent 35b9045 commit eb64a00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
16 changes: 10 additions & 6 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit eb64a00

Please sign in to comment.