-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #221 from ethereum/vmtester
vmtester: Drop CLI11 dependency
- Loading branch information
Showing
2 changed files
with
135 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,34 @@ | ||
# EVMC: Ethereum Client-VM Connector API. | ||
# Copyright 2018 The EVMC Authors. | ||
# Licensed under the Apache License, Version 2.0. See the LICENSE file. | ||
# Copyright 2019 The EVMC Authors. | ||
# Licensed under the Apache License, Version 2.0. | ||
|
||
include(GNUInstallDirs) | ||
|
||
hunter_add_package(CLI11) | ||
find_package(CLI11) | ||
|
||
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) | ||
target_link_libraries(evmc-vmtester PRIVATE evmc loader evmc-example-host GTest::gtest) | ||
set_source_files_properties(vmtester.cpp PROPERTIES COMPILE_DEFINITIONS PROJECT_VERSION=\"${PROJECT_VERSION}\") | ||
|
||
|
||
install(TARGETS evmc-vmtester RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
|
||
add_test(NAME vmtester-help | ||
COMMAND evmc-vmtester --help | ||
) | ||
set_tests_properties(vmtester-help PROPERTIES | ||
PASS_REGULAR_EXPRESSION "Options:" | ||
) | ||
|
||
add_test(NAME vmtester-nonexistingvm | ||
COMMAND evmc-vmtester nonexistingvm | ||
) | ||
set_tests_properties(vmtester-nonexistingvm PROPERTIES | ||
WILL_FAIL TRUE | ||
FAIL_REGULAR_EXPRESSION "no such file" | ||
) | ||
|
||
add_test(NAME vmtester-novm | ||
COMMAND evmc-vmtester | ||
) | ||
set_tests_properties(vmtester-novm PROPERTIES | ||
WILL_FAIL TRUE | ||
FAIL_REGULAR_EXPRESSION "required but missing" | ||
) | ||
add_test(NAME vmtester-help COMMAND evmc-vmtester --version --help) | ||
set_tests_properties(vmtester-help PROPERTIES PASS_REGULAR_EXPRESSION "Usage:") | ||
|
||
add_test(NAME vmtester-nonexistingvm COMMAND evmc-vmtester nonexistingvm) | ||
set_tests_properties(vmtester-nonexistingvm PROPERTIES PASS_REGULAR_EXPRESSION "Cannot open") | ||
|
||
add_test(NAME vmtester-noarg COMMAND evmc-vmtester) | ||
set_tests_properties(vmtester-noarg PROPERTIES PASS_REGULAR_EXPRESSION "is required") | ||
|
||
add_test(NAME vmtester-too-many-args COMMAND evmc-vmtester a b) | ||
set_tests_properties(vmtester-too-many-args PROPERTIES PASS_REGULAR_EXPRESSION "Unexpected") | ||
|
||
add_test(NAME vmtester-version COMMAND evmc-vmtester --version) | ||
set_tests_properties(vmtester-version PROPERTIES PASS_REGULAR_EXPRESSION ${PROJECT_VERSION}) | ||
|
||
add_test(NAME vmtester-unknown-option COMMAND evmc-vmtester --verbose) | ||
set_tests_properties(vmtester-unknown-option PROPERTIES PASS_REGULAR_EXPRESSION "Unknown") | ||
|
||
add_test(NAME vmtester-option-long-prefix COMMAND evmc-vmtester ---) | ||
set_tests_properties(vmtester-option-long-prefix PROPERTIES PASS_REGULAR_EXPRESSION "Unknown") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters