Skip to content

Commit

Permalink
cmake: Split WASI unit tests into a separate executable
Browse files Browse the repository at this point in the history
  • Loading branch information
gumb0 committed May 19, 2021
1 parent 90223c7 commit 72e7826
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ add_subdirectory(smoketests)
add_subdirectory(spectests)
add_subdirectory(testfloat)
add_subdirectory(unittests)
add_subdirectory(unittests_wasi)

if(FIZZY_FUZZING)
add_subdirectory(fuzzer)
Expand Down
3 changes: 1 addition & 2 deletions test/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
include(GoogleTest)

add_executable(fizzy-unittests)
target_link_libraries(fizzy-unittests PRIVATE fizzy::fizzy-internal fizzy::wasi fizzy::test-utils GTest::gtest_main GTest::gmock)
target_link_libraries(fizzy-unittests PRIVATE fizzy::fizzy-internal fizzy::test-utils GTest::gtest_main GTest::gmock)

target_sources(
fizzy-unittests PRIVATE
Expand Down Expand Up @@ -42,7 +42,6 @@ target_sources(
validation_stack_type_test.cpp
validation_test.cpp
value_test.cpp
wasi_test.cpp
wasm_engine_test.cpp
)

Expand Down
19 changes: 19 additions & 0 deletions test/unittests_wasi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Fizzy: A fast WebAssembly interpreter
# Copyright 2019-2021 The Fizzy Authors.
# SPDX-License-Identifier: Apache-2.0

include(GoogleTest)

add_executable(fizzy-unittests-wasi)
target_link_libraries(fizzy-unittests-wasi PRIVATE fizzy::fizzy-internal fizzy::wasi fizzy::test-utils GTest::gtest_main GTest::gmock)

target_sources(
fizzy-unittests-wasi PRIVATE
wasi_test.cpp
)

gtest_discover_tests(
fizzy-unittests-wasi
TEST_PREFIX ${PROJECT_NAME}/unittests_wasi/
PROPERTIES ENVIRONMENT LLVM_PROFILE_FILE=${CMAKE_BINARY_DIR}/unittests-wasi-%p.profraw
)
File renamed without changes.

0 comments on commit 72e7826

Please sign in to comment.