-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework CMake tests definition for exporting JSON tests and store the exported fixtures as a CI artifact.
- Loading branch information
Showing
4 changed files
with
64 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# evmone: Fast Ethereum Virtual Machine implementation | ||
# Copyright 2023 The evmone Authors. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Commands and tests for exporting evmone's tests to JSON formats | ||
|
||
set(PREFIX ${PREFIX}/export) | ||
set(EXPORT_DIR fixtures) | ||
|
||
add_test( | ||
# Clean the export directory before exporting to delete potentially outdated tests. | ||
NAME ${PREFIX}/clean_export_dir | ||
COMMAND ${CMAKE_COMMAND} -E rm -rf ${EXPORT_DIR} | ||
) | ||
set_tests_properties( | ||
${PREFIX}/clean_export_dir PROPERTIES | ||
FIXTURES_SETUP EXPORT_PREPARATION | ||
) | ||
|
||
add_test( | ||
NAME ${PREFIX}/export_state_tests | ||
COMMAND evmone-unittests --gtest_filter=state_transition.* | ||
) | ||
set_tests_properties( | ||
${PREFIX}/export_state_tests PROPERTIES | ||
ENVIRONMENT EVMONE_EXPORT_TESTS=${EXPORT_DIR}/state_tests | ||
FIXTURES_SETUP EXPORT_STATE_TESTS | ||
FIXTURES_REQUIRED EXPORT_PREPARATION | ||
) | ||
|
||
add_test( | ||
NAME ${PREFIX}/execute_exported_state_tests | ||
# TODO: Broken exported tests are filtered out. | ||
COMMAND evmone-statetest ${EXPORT_DIR}/state_tests --gtest_filter=-*block.* | ||
) | ||
set_tests_properties( | ||
${PREFIX}/execute_exported_state_tests PROPERTIES | ||
FIXTURES_REQUIRED EXPORT_STATE_TESTS | ||
) | ||
|
||
add_test( | ||
NAME ${PREFIX}/export_eof_tests | ||
COMMAND evmone-unittests --gtest_filter=eof_validation.* | ||
) | ||
set_tests_properties( | ||
${PREFIX}/export_eof_tests PROPERTIES | ||
ENVIRONMENT EVMONE_EXPORT_TESTS=${EXPORT_DIR}/eof_tests | ||
FIXTURES_SETUP EXPORT_EOF_TESTS | ||
FIXTURES_REQUIRED EXPORT_PREPARATION | ||
) | ||
|
||
add_test( | ||
NAME ${PREFIX}/execute_exported_eof_tests | ||
COMMAND evmone-eoftest ${EXPORT_DIR}/eof_tests | ||
) | ||
set_tests_properties( | ||
${PREFIX}/execute_exported_eof_tests PROPERTIES | ||
FIXTURES_REQUIRED EXPORT_EOF_TESTS | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters