2018-04-24 12:51:18 +00:00
|
|
|
# EVMC: Ethereum Client-VM Connector API.
|
2018-08-21 07:44:18 +00:00
|
|
|
# Copyright 2018 The EVMC Authors.
|
2018-08-22 11:57:25 +00:00
|
|
|
# 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)
|
|
|
|
|
2018-07-05 13:05:20 +00:00
|
|
|
hunter_add_package(CLI11)
|
|
|
|
find_package(CLI11)
|
2018-04-10 15:11:43 +00:00
|
|
|
|
2018-08-30 12:49:20 +00:00
|
|
|
add_executable(evmc-vmtester vmtester.hpp vmtester.cpp tests.cpp)
|
2018-06-21 09:08:32 +00:00
|
|
|
set_target_properties(evmc-vmtester PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
|
2018-08-30 12:49:20 +00:00
|
|
|
target_link_libraries(evmc-vmtester PRIVATE evmc loader evmc-example-host GTest::gtest CLI11::CLI11)
|
2018-06-18 12:00:28 +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"
|
|
|
|
)
|