evmc/test/vmtester/CMakeLists.txt

38 lines
1.0 KiB
CMake
Raw Normal View History

# EVMC: Ethereum Client-VM Connector API.
2018-08-21 07:44:18 +00:00
# Copyright 2018 The EVMC Authors.
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
2018-04-12 09:01:24 +00:00
2018-04-11 13:29:29 +00:00
include(GNUInstallDirs)
hunter_add_package(CLI11)
find_package(CLI11)
2018-04-10 15:11:43 +00:00
add_executable(evmc-vmtester vmtester.hpp vmtester.cpp tests.cpp)
set_target_properties(evmc-vmtester PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
target_link_libraries(evmc-vmtester PRIVATE evmc loader evmc-example-host GTest::gtest CLI11::CLI11)
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"
)