Skip to content

Commit

Permalink
test: Add basic evmone-statetest integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Oct 20, 2022
1 parent 0335a89 commit b033cbd
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ DUP1,4
{\"error\":null,\"gas\":999985,\"gasUsed\":15,\"output\":\"\"}
")


get_property(ALL_TESTS DIRECTORY PROPERTY TESTS)
set_tests_properties(${ALL_TESTS} PROPERTIES ENVIRONMENT LLVM_PROFILE_FILE=${CMAKE_BINARY_DIR}/integration-%p.profraw)
endif()

add_subdirectory(statetest)

get_property(ALL_TESTS DIRECTORY PROPERTY TESTS)
set_tests_properties(${ALL_TESTS} PROPERTIES ENVIRONMENT LLVM_PROFILE_FILE=${CMAKE_BINARY_DIR}/integration-%p.profraw)

32 changes: 32 additions & 0 deletions test/integration/statetest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# evmone: Fast Ethereum Virtual Machine implementation
# Copyright 2022 The evmone Authors.
# SPDX-License-Identifier: Apache-2.0

# Integration tests for evmone-statetest.

set(PREFIX ${PREFIX}/statetest)
set(TESTS1 ${CMAKE_CURRENT_SOURCE_DIR}/tests1)

add_test(
NAME ${PREFIX}/missing_arg
COMMAND evmone-statetest
)
set_tests_properties(
${PREFIX}/missing_arg PROPERTIES
PASS_REGULAR_EXPRESSION "Missing argument with the path to the tests directory"
)

add_test(
NAME ${PREFIX}/tests1_list
COMMAND evmone-statetest ${TESTS1} --gtest_list_tests
)
set_tests_properties(
${PREFIX}/tests1_list PROPERTIES
PASS_REGULAR_EXPRESSION [[
B\.
T
SuiteA\.
test1
test2
]]
)
Empty file.
Empty file.
Empty file.

0 comments on commit b033cbd

Please sign in to comment.