2018-04-24 12:51:18 +00:00
|
|
|
# EVMC: Ethereum Client-VM Connector API.
|
2018-04-12 09:01:24 +00:00
|
|
|
# Copyright 2018 Pawel Bylica.
|
|
|
|
# Licensed under the MIT License. See the LICENSE file.
|
|
|
|
|
2018-04-11 13:29:29 +00:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2018-04-11 15:37:03 +00:00
|
|
|
hunter_add_package(Boost COMPONENTS program_options filesystem system)
|
|
|
|
find_package(Boost CONFIG REQUIRED program_options filesystem system)
|
2018-04-10 15:11:43 +00:00
|
|
|
|
2018-04-11 15:47:31 +00:00
|
|
|
add_executable(evmc-vmtester vmtester.hpp vmtester.cpp tests.cpp)
|
2018-04-11 15:37:03 +00:00
|
|
|
|
|
|
|
target_link_libraries(
|
2018-04-11 15:47:31 +00:00
|
|
|
evmc-vmtester
|
2018-04-11 15:37:03 +00:00
|
|
|
PRIVATE
|
|
|
|
evmc
|
|
|
|
GTest::gtest
|
|
|
|
Boost::program_options
|
|
|
|
Boost::filesystem
|
|
|
|
Boost::system
|
|
|
|
${CMAKE_DL_LIBS}
|
|
|
|
)
|
2018-04-11 15:36:54 +00:00
|
|
|
|
2018-04-11 13:29:29 +00:00
|
|
|
install(TARGETS evmc-vmtester RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
2018-04-11 15:36:54 +00:00
|
|
|
add_test(NAME vmtester-help
|
2018-04-11 15:47:31 +00:00
|
|
|
COMMAND evmc-vmtester --help
|
2018-04-11 15:36:54 +00:00
|
|
|
)
|
|
|
|
set_tests_properties(vmtester-help PROPERTIES
|
|
|
|
PASS_REGULAR_EXPRESSION "Options:"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(NAME vmtester-nonexistingvm
|
2018-04-11 15:47:31 +00:00
|
|
|
COMMAND evmc-vmtester nonexistingvm
|
2018-04-11 15:36:54 +00:00
|
|
|
)
|
|
|
|
set_tests_properties(vmtester-nonexistingvm PROPERTIES
|
|
|
|
WILL_FAIL TRUE
|
|
|
|
FAIL_REGULAR_EXPRESSION "no such file"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(NAME vmtester-novm
|
2018-04-11 15:47:31 +00:00
|
|
|
COMMAND evmc-vmtester
|
2018-04-11 15:36:54 +00:00
|
|
|
)
|
|
|
|
set_tests_properties(vmtester-novm PROPERTIES
|
|
|
|
WILL_FAIL TRUE
|
|
|
|
FAIL_REGULAR_EXPRESSION "required but missing"
|
|
|
|
)
|