CMake: Add test "vmtester examplevm"

This commit is contained in:
Paweł Bylica 2019-04-02 13:31:05 +02:00
parent fcc067dd73
commit d3d21e00fc
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
4 changed files with 2 additions and 5 deletions

View File

@ -21,4 +21,3 @@ install:
script: script:
- cmake --build . --config Release --target RUN_TESTS - cmake --build . --config Release --target RUN_TESTS
- $HOME/bin/evmc-vmtester.exe $HOME/bin/evmc-example-vm.dll

View File

@ -55,5 +55,4 @@ after_build:
- ps: >- - ps: >-
if ($env:GENERATOR) { if ($env:GENERATOR) {
cmake --build . --config $env:CONFIGURATION --target RUN_TESTS cmake --build . --config $env:CONFIGURATION --target RUN_TESTS
C:\install\bin\evmc-vmtester.exe C:\install\bin\evmc-example-vm.dll
} }

View File

@ -64,9 +64,6 @@ jobs:
mkdir ~/build-example-instructions && cd ~/build-example-instructions mkdir ~/build-example-instructions && cd ~/build-example-instructions
cmake ~/project/examples/use_instructions_in_cmake -DCMAKE_PREFIX_PATH=~/install cmake ~/project/examples/use_instructions_in_cmake -DCMAKE_PREFIX_PATH=~/install
cmake --build . cmake --build .
- run:
name: "Run evmc-vmtester libevmc-example-vm.so"
command: ~/install/bin/evmc-vmtester ~/install/lib/libevmc-example-vm.so
build-cxx17: build-cxx17:
<<: *build <<: *build

View File

@ -12,6 +12,8 @@ set_source_files_properties(vmtester.cpp PROPERTIES COMPILE_DEFINITIONS PROJECT_
install(TARGETS evmc-vmtester RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS evmc-vmtester RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
add_test(NAME vmtester/examplevm COMMAND evmc-vmtester $<TARGET_FILE:evmc-example-vm>)
add_test(NAME vmtester-help COMMAND evmc-vmtester --version --help) add_test(NAME vmtester-help COMMAND evmc-vmtester --version --help)
set_tests_properties(vmtester-help PROPERTIES PASS_REGULAR_EXPRESSION "Usage:") set_tests_properties(vmtester-help PROPERTIES PASS_REGULAR_EXPRESSION "Usage:")