evmc/test/vmtester/CMakeLists.txt

48 lines
1.1 KiB
CMake
Raw Normal View History

2018-04-12 11:01:24 +02:00
# EVMC -- Ethereum Client-VM Connector API
# Copyright 2018 Pawel Bylica.
# Licensed under the MIT License. See the LICENSE file.
2018-04-11 17:37:03 +02:00
hunter_add_package(Boost COMPONENTS program_options filesystem system)
find_package(Boost CONFIG REQUIRED program_options filesystem system)
2018-04-10 17:11:43 +02:00
2018-04-11 00:37:03 +02:00
hunter_add_package(GTest)
find_package(GTest CONFIG REQUIRED)
add_executable(vmtester vmtester.hpp vmtester.cpp tests.cpp)
2018-04-11 17:37:03 +02:00
target_link_libraries(
vmtester
PRIVATE
evmc
GTest::gtest
Boost::program_options
Boost::filesystem
Boost::system
${CMAKE_DL_LIBS}
)
2018-04-11 17:36:54 +02:00
add_test(NAME vmtester-help
COMMAND vmtester --help
)
set_tests_properties(vmtester-help PROPERTIES
PASS_REGULAR_EXPRESSION "Options:"
)
add_test(NAME vmtester-nonexistingvm
COMMAND vmtester nonexistingvm
)
set_tests_properties(vmtester-nonexistingvm PROPERTIES
WILL_FAIL TRUE
FAIL_REGULAR_EXPRESSION "no such file"
)
add_test(NAME vmtester-novm
COMMAND vmtester
)
set_tests_properties(vmtester-novm PROPERTIES
WILL_FAIL TRUE
FAIL_REGULAR_EXPRESSION "required but missing"
)
# TODO: Add test for `vmtester examplevm.so`