mirror of
https://github.com/status-im/evmc.git
synced 2025-02-23 00:18:24 +00:00
Add ctests for vmtester
This commit is contained in:
parent
9c239da9bf
commit
f1fcb37fbe
@ -28,6 +28,7 @@ target_include_directories(evmc INTERFACE include)
|
||||
|
||||
option(EVMC_BUILD_TESTS "Build EVMC tests and test tools" OFF)
|
||||
if(EVMC_BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
|
@ -20,3 +20,28 @@ target_link_libraries(
|
||||
Boost::system
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
|
||||
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`
|
||||
|
Loading…
x
Reference in New Issue
Block a user