mirror of https://github.com/status-im/evmc.git
CMake: Add unittests to CTest
This commit is contained in:
parent
61542e0444
commit
fcc067dd73
|
@ -20,5 +20,5 @@ install:
|
|||
- cmake --build . --config Release --target install
|
||||
|
||||
script:
|
||||
- test/Release/evmc-unittests.exe
|
||||
- cmake --build . --config Release --target RUN_TESTS
|
||||
- $HOME/bin/evmc-vmtester.exe $HOME/bin/evmc-example-vm.dll
|
||||
|
|
|
@ -54,7 +54,6 @@ build_script:
|
|||
after_build:
|
||||
- ps: >-
|
||||
if ($env:GENERATOR) {
|
||||
cd C:\projects\evmc\build\test
|
||||
Release\evmc-unittests.exe
|
||||
cmake --build . --config $env:CONFIGURATION --target RUN_TESTS
|
||||
C:\install\bin\evmc-vmtester.exe C:\install\bin\evmc-example-vm.dll
|
||||
}
|
||||
|
|
|
@ -39,10 +39,6 @@ jobs:
|
|||
- run:
|
||||
name: "Build"
|
||||
command: cmake --build ~/build
|
||||
- run:
|
||||
name: "Unit tests"
|
||||
working_directory: ~/build/test
|
||||
command: ./evmc-unittests
|
||||
- run:
|
||||
name: "Test"
|
||||
command: cmake --build ~/build --target test
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# Copyright 2019 The EVMC Authors.
|
||||
# Licensed under the Apache License, Version 2.0.
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
add_library(loader-mocked STATIC ${PROJECT_SOURCE_DIR}/lib/loader/loader.c)
|
||||
target_link_libraries(loader-mocked PRIVATE evmc)
|
||||
target_compile_definitions(loader-mocked PRIVATE EVMC_LOADER_MOCK=1)
|
||||
|
@ -17,3 +19,5 @@ add_executable(
|
|||
|
||||
target_link_libraries(evmc-unittests PRIVATE loader-mocked evmc-example-vm-static evmc-example-host instructions GTest::gtest GTest::main)
|
||||
set_target_properties(evmc-unittests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
|
||||
|
||||
gtest_add_tests(TARGET evmc-unittests TEST_PREFIX unittests/)
|
||||
|
|
Loading…
Reference in New Issue