- Notifications
You must be signed in to change notification settings - Fork 333
Export EOF validation unit tests to json EOFTests #818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2c6214c to 0e863fb Compare Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@ ## master #818 +/- ## ========================================== - Coverage 97.98% 97.93% -0.05% ========================================== Files 114 116 +2 Lines 11158 11309 +151 ========================================== + Hits 10933 11076 +143 - Misses 225 233 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
|
1548ab2 to 74875e4 Compare test/unittests/eof_validation.cpp Outdated
| namespace | ||
| { | ||
| /// Creates the file path for the exported test based on its name. | ||
| fs::path get_export_test_path(const testing::TestInfo& test_info, std::string_view export_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it make more sense to share this function with state_transition.cpp. E.g. test_export.cpp?
test/unittests/eof_validation.cpp Outdated
| << hex(test_case.container); | ||
| } | ||
| | ||
| if (const auto export_dir = std::getenv("EVMONE_EXPORT_TESTS"); export_dir != nullptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also be shared by having common abstract ExportableFixture with virtual export_test(...). Can be done later though.
e9f8876 to f918413 Compare | I think I accidentally removed @chfast's commit |
42a0685 to 2d775e2 Compare 2d775e2 to 6d0ae02 Compare | # Tests for exporting JSON tests | ||
| | ||
| set(EXPORT_DIR exported_tests) | ||
| set(EXPORT_STATE_TESTS_DIR exported_state_tests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need separate dir any more. The top dir will be the suite name: state_transition and eof_validation. I think it is better to test exporting to the same dir because this is more common use case.
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will also export eof_validation suite. You can use it with evmone-eoftest test or filter it out.
6d0ae02 to 62d18d9 Compare
No description provided.