Added tests again in the build system
This commit is contained in:
parent
30515e5bcc
commit
b20c42059b
2 changed files with 20 additions and 4 deletions
|
@ -2,10 +2,6 @@ cmake_minimum_required(VERSION 3.2.2)
|
|||
cmake_policy(SET CMP0048 NEW)
|
||||
|
||||
project(Criterion VERSION 1.2.2)
|
||||
get_cmake_property(_variableNames VARIABLES)
|
||||
foreach (_variableName ${_variableNames})
|
||||
message(STATUS "${_variableName}=${${_variableName}}")
|
||||
endforeach()
|
||||
|
||||
set(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
|
||||
set(GettextTranslate_ALL)
|
||||
|
@ -75,6 +71,8 @@ set(INTERFACE_FILES
|
|||
include/criterion/stats.h
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_subdirectory(samples)
|
||||
|
||||
include_directories(include src)
|
||||
|
|
|
@ -18,7 +18,25 @@ set(SAMPLES
|
|||
simple
|
||||
)
|
||||
|
||||
set(SCRIPTS
|
||||
tap_test
|
||||
early_exit
|
||||
verbose
|
||||
list
|
||||
pattern
|
||||
fail_fast
|
||||
help
|
||||
)
|
||||
|
||||
foreach(sample ${SAMPLES})
|
||||
add_executable(${sample} ${sample}.c)
|
||||
target_link_libraries(${sample} criterion)
|
||||
add_test(${sample} ${sample})
|
||||
set_property(TEST ${sample} PROPERTY
|
||||
ENVIRONMENT "CRITERION_ALWAYS_SUCCEED=1"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
foreach(script ${SCRIPTS})
|
||||
add_test(${script} ${CMAKE_CURRENT_LIST_DIR}/tests/${script}.sh)
|
||||
endforeach()
|
||||
|
|
Loading…
Add table
Reference in a new issue