🔨 remove double tests
This commit is contained in:
parent
bec554936c
commit
752c62b4bd
2 changed files with 18 additions and 19 deletions
6
Makefile
6
Makefile
|
@ -79,7 +79,7 @@ coverage:
|
||||||
mkdir build_coverage
|
mkdir build_coverage
|
||||||
cd build_coverage ; CXX=g++-8 cmake .. -GNinja -DJSON_Coverage=ON -DJSON_MultipleHeaders=ON
|
cd build_coverage ; CXX=g++-8 cmake .. -GNinja -DJSON_Coverage=ON -DJSON_MultipleHeaders=ON
|
||||||
cd build_coverage ; ninja
|
cd build_coverage ; ninja
|
||||||
cd build_coverage ; ctest -E '.*_default' -j10
|
cd build_coverage ; ctest -j10
|
||||||
cd build_coverage ; ninja lcov_html
|
cd build_coverage ; ninja lcov_html
|
||||||
open build_coverage/test/html/index.html
|
open build_coverage/test/html/index.html
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ coverage-fast:
|
||||||
mkdir build_coverage
|
mkdir build_coverage
|
||||||
cd build_coverage ; CXX=g++-9 cmake .. -GNinja -DJSON_Coverage=ON -DJSON_MultipleHeaders=ON
|
cd build_coverage ; CXX=g++-9 cmake .. -GNinja -DJSON_Coverage=ON -DJSON_MultipleHeaders=ON
|
||||||
cd build_coverage ; ninja
|
cd build_coverage ; ninja
|
||||||
cd build_coverage ; ctest -E '.*_default' -j10
|
cd build_coverage ; ctest -j10
|
||||||
cd build_coverage ; ninja fastcov_html
|
cd build_coverage ; ninja fastcov_html
|
||||||
open build_coverage/test/html/index.html
|
open build_coverage/test/html/index.html
|
||||||
|
|
||||||
|
@ -485,7 +485,7 @@ clang_sanitize:
|
||||||
mkdir clang_sanitize_build
|
mkdir clang_sanitize_build
|
||||||
cd clang_sanitize_build ; CXX=$(COMPILER_DIR)/clang++ cmake .. -DJSON_Sanitizer=On -DJSON_MultipleHeaders=ON -GNinja
|
cd clang_sanitize_build ; CXX=$(COMPILER_DIR)/clang++ cmake .. -DJSON_Sanitizer=On -DJSON_MultipleHeaders=ON -GNinja
|
||||||
cd clang_sanitize_build ; ninja
|
cd clang_sanitize_build ; ninja
|
||||||
cd clang_sanitize_build ; ctest -E '.*_default' -j10
|
cd clang_sanitize_build ; ctest -j10
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
|
@ -155,32 +155,20 @@ foreach(file ${files})
|
||||||
string(REGEX REPLACE "unit-([^$]+)" "test-\\1" testcase ${file_basename})
|
string(REGEX REPLACE "unit-([^$]+)" "test-\\1" testcase ${file_basename})
|
||||||
|
|
||||||
add_executable(${testcase} $<TARGET_OBJECTS:doctest_main> ${file})
|
add_executable(${testcase} $<TARGET_OBJECTS:doctest_main> ${file})
|
||||||
target_compile_definitions(${testcase} PRIVATE
|
target_compile_definitions(${testcase} PRIVATE DOCTEST_CONFIG_SUPER_FAST_ASSERTS)
|
||||||
DOCTEST_CONFIG_SUPER_FAST_ASSERTS
|
|
||||||
)
|
|
||||||
target_compile_options(${testcase} PRIVATE
|
target_compile_options(${testcase} PRIVATE
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>
|
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>
|
||||||
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated;-Wno-float-equal>
|
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated;-Wno-float-equal>
|
||||||
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
|
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
|
||||||
)
|
)
|
||||||
target_include_directories(${testcase} PRIVATE
|
target_include_directories(${testcase} PRIVATE ${CMAKE_BINARY_DIR}/include thirdparty/doctest thirdparty/fifo_map)
|
||||||
${CMAKE_BINARY_DIR}/include
|
|
||||||
thirdparty/doctest
|
|
||||||
thirdparty/fifo_map
|
|
||||||
)
|
|
||||||
target_link_libraries(${testcase} ${NLOHMANN_JSON_TARGET_NAME})
|
target_link_libraries(${testcase} ${NLOHMANN_JSON_TARGET_NAME})
|
||||||
|
|
||||||
add_test(NAME "${testcase}_default"
|
add_test(NAME "${testcase}"
|
||||||
COMMAND ${testcase} ${DOCTEST_TEST_FILTER}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
set_tests_properties("${testcase}_default" PROPERTIES LABELS "default" FIXTURES_REQUIRED TEST_DATA)
|
|
||||||
|
|
||||||
add_test(NAME "${testcase}_all"
|
|
||||||
COMMAND ${testcase} ${DOCTEST_TEST_FILTER} --no-skip
|
COMMAND ${testcase} ${DOCTEST_TEST_FILTER} --no-skip
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
set_tests_properties("${testcase}_all" PROPERTIES LABELS "all" FIXTURES_REQUIRED TEST_DATA)
|
set_tests_properties("${testcase}" PROPERTIES LABELS "all" FIXTURES_REQUIRED TEST_DATA)
|
||||||
|
|
||||||
if(JSON_Valgrind)
|
if(JSON_Valgrind)
|
||||||
add_test(NAME "${testcase}_valgrind"
|
add_test(NAME "${testcase}_valgrind"
|
||||||
|
@ -191,6 +179,17 @@ foreach(file ${files})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
add_executable(json_unit EXCLUDE_FROM_ALL $<TARGET_OBJECTS:doctest_main> ${files})
|
||||||
|
target_compile_definitions(json_unit PRIVATE DOCTEST_CONFIG_SUPER_FAST_ASSERTS)
|
||||||
|
target_compile_options(json_unit PRIVATE
|
||||||
|
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>
|
||||||
|
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated;-Wno-float-equal>
|
||||||
|
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
|
||||||
|
)
|
||||||
|
target_include_directories(json_unit PRIVATE ${CMAKE_BINARY_DIR}/include thirdparty/doctest thirdparty/fifo_map)
|
||||||
|
target_link_libraries(json_unit ${NLOHMANN_JSON_TARGET_NAME})
|
||||||
|
add_dependencies(json_unit download_test_data)
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Test the generated build configs
|
# Test the generated build configs
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
Loading…
Reference in a new issue