Skip to content

Commit

Permalink
Self-check exported JSON EOF validation tests via CTest
Browse files Browse the repository at this point in the history
  • Loading branch information
gumb0 committed Feb 13, 2024
1 parent 0e863fb commit 1548ab2
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions test/integration/statetest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,45 @@ set_tests_properties(

# Tests for exporting JSON tests

set(EXPORT_DIR exported_tests)
set(EXPORT_STATE_TESTS_DIR exported_state_tests)

add_test(
NAME ${PREFIX}/export_to_json
NAME ${PREFIX}/export_state_tests_to_json
COMMAND evmone-unittests --gtest_filter=state_transition.*
)
set_tests_properties(
${PREFIX}/export_to_json PROPERTIES
ENVIRONMENT EVMONE_EXPORT_TESTS=${EXPORT_DIR}
${PREFIX}/export_state_tests_to_json PROPERTIES
ENVIRONMENT EVMONE_EXPORT_TESTS=${EXPORT_STATE_TESTS_DIR}
FIXTURES_SETUP EXPORT_JSON_TESTS
)

add_test(
NAME ${PREFIX}/execute_exported_tests
# TODO: Broken exported tests are filtered out.
COMMAND evmone-statetest ${EXPORT_DIR} --gtest_filter=-*block.*:*tx.tx_non_existing_sender
COMMAND evmone-statetest ${EXPORT_STATE_TESTS_DIR} --gtest_filter=-*block.*:*tx.tx_non_existing_sender
)
set_tests_properties(
${PREFIX}/execute_exported_tests PROPERTIES
FIXTURES_REQUIRED EXPORT_JSON_TESTS
)

set(EXPORT_VALIDATION_TESTS_DIR exported_validation_tests)

add_test(
NAME ${PREFIX}/export_validation_tests_to_json
COMMAND evmone-unittests --gtest_filter=eof_validation.*
)
set_tests_properties(
${PREFIX}/export_validation_tests_to_json PROPERTIES
ENVIRONMENT EVMONE_EXPORT_TESTS=${EXPORT_VALIDATION_TESTS_DIR}
FIXTURES_SETUP EXPORT_JSON_VALIDATION_TESTS
)

add_test(
NAME ${PREFIX}/execute_exported_validation_tests
COMMAND evmone-eoftest ${EXPORT_VALIDATION_TESTS_DIR}
)
set_tests_properties(
${PREFIX}/execute_exported_validation_tests PROPERTIES
FIXTURES_REQUIRED EXPORT_JSON_VALIDATION_TESTS
)

0 comments on commit 1548ab2

Please sign in to comment.