Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix EosioTester to only generate one CTest "target" #7164

Merged
merged 2 commits into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions CMakeModules/EosioTester.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ find_library(GMP_LIBRARIES NAMES libgmp.a gmp.lib gmp libgmp-10 mpir
DOC "Path to the GMP library"
)

macro(add_eosio_test test_name)
macro(add_eosio_test_executable test_name)
add_executable( ${test_name} ${ARGN} )
target_link_libraries( ${test_name}
${LLVM}
Expand Down Expand Up @@ -128,7 +128,6 @@ macro(add_eosio_test test_name)
${PLATFORM_SPECIFIC_LIBS}
)

#### TODO /usr/local/include is a hack for fc and some other includes
target_include_directories( ${test_name} PUBLIC
${Boost_INCLUDE_DIRS}
@OPENSSL_INCLUDE_DIR@
Expand All @@ -137,10 +136,13 @@ macro(add_eosio_test test_name)
@CMAKE_INSTALL_FULL_INCLUDEDIR@/wasm-jit
@CMAKE_INSTALL_FULL_INCLUDEDIR@/softfloat )

endmacro()

macro(add_eosio_test test_name)
add_eosio_test_executable( ${test_name} ${ARGN} )
#This will generate a test with the default runtime
add_test(NAME ${test_name} COMMAND ${test_name} --report_level=detailed --color_output)

#Manually run unit_test for all supported runtimes
#To run unit_test with all log from blockchain displayed, put --verbose after --, i.e. unit_test -- --verbose
add_test(NAME ${test_name}_binaryen COMMAND ${test_name}
--report_level=detailed --color_output -- --binaryen)
add_test(NAME ${test_name}_wavm COMMAND ${test_name}
--report_level=detailed --color_output --catch_system_errors=no -- --wavm)
endmacro()
13 changes: 7 additions & 6 deletions CMakeModules/EosioTesterBuild.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ find_library(GMP_LIBRARIES NAMES libgmp.a gmp.lib gmp libgmp-10 mpir
DOC "Path to the GMP library"
)

macro(add_eosio_test test_name)
macro(add_eosio_test_executable test_name)
add_executable( ${test_name} ${ARGN} )
target_link_libraries( ${test_name}
${LLVM}
Expand Down Expand Up @@ -138,13 +138,14 @@ macro(add_eosio_test test_name)
@CMAKE_SOURCE_DIR@/libraries/chainbase/include
@CMAKE_SOURCE_DIR@/libraries/testing/include
@CMAKE_SOURCE_DIR@/libraries/wasm-jit/Include )
#
endmacro()

macro(add_eosio_test test_name)
add_eosio_test_executable( ${test_name} ${ARGN} )
#This will generate a test with the default runtime
add_test(NAME ${test_name} COMMAND ${test_name} --report_level=detailed --color_output)
#Manually run unit_test for all supported runtimes
#To run unit_test with all log from blockchain displayed, put --verbose after --, i.e. unit_test -- --verbose
add_test(NAME ${test_name}_binaryen COMMAND ${test_name}
--report_level=detailed --color_output -- --binaryen)
add_test(NAME ${test_name}_wavm COMMAND ${test_name}
--report_level=detailed --color_output --catch_system_errors=no -- --wavm)
endmacro()

if(ENABLE_COVERAGE_TESTING)
Expand Down