Skip to content

Conversation

@gumb0
Copy link
Member

@gumb0 gumb0 commented Feb 13, 2024

No description provided.

@gumb0 gumb0 added the EOF label Feb 13, 2024
@gumb0 gumb0 force-pushed the eof/export-validation-tests branch from 2c6214c to 0e863fb Compare February 13, 2024 17:15
@gumb0 gumb0 self-assigned this Feb 13, 2024
@gumb0 gumb0 changed the title Export EOF validation unit tets to json EOFTests Export EOF validation unit tests to json EOFTests Feb 13, 2024
@codecov
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (5492627) 97.98% compared to head (62d18d9) 97.93%.

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 
Flag Coverage Δ
blockchaintests 59.75% <ø> (+0.04%) ⬆️
statetests 62.23% <ø> (+0.05%) ⬆️
statetests-silkpre 24.33% <0.00%> (-0.14%) ⬇️
unittests 96.05% <94.56%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
lib/evmone/eof.cpp 84.33% <ø> (+0.77%) ⬆️
lib/evmone/eof.hpp 100.00% <ø> (ø)
test/unittests/eof_validation.hpp 60.00% <0.00%> (ø)
test/unittests/eof_validation.cpp 93.93% <94.56%> (+8.22%) ⬆️

... and 2 files with indirect coverage changes

@gumb0 gumb0 force-pushed the eof/export-validation-tests branch 2 times, most recently from 1548ab2 to 74875e4 Compare February 13, 2024 17:48
@gumb0 gumb0 requested review from chfast and pdobacz February 13, 2024 18:12
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)
Copy link
Member

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?

<< hex(test_case.container);
}

if (const auto export_dir = std::getenv("EVMONE_EXPORT_TESTS"); export_dir != nullptr)
Copy link
Member

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.

@gumb0 gumb0 marked this pull request as draft February 14, 2024 11:17
@gumb0 gumb0 force-pushed the eof/export-validation-tests branch from e9f8876 to f918413 Compare February 19, 2024 13:58
@gumb0
Copy link
Member Author

gumb0 commented Feb 19, 2024

I think I accidentally removed @chfast's commit

@gumb0 gumb0 force-pushed the eof/export-validation-tests branch 7 times, most recently from 42a0685 to 2d775e2 Compare February 21, 2024 17:49
@gumb0 gumb0 marked this pull request as ready for review February 21, 2024 17:49
@gumb0 gumb0 force-pushed the eof/export-validation-tests branch from 2d775e2 to 6d0ae02 Compare February 21, 2024 18:17
@gumb0 gumb0 requested review from chfast and pdobacz February 21, 2024 18:27
# Tests for exporting JSON tests

set(EXPORT_DIR exported_tests)
set(EXPORT_STATE_TESTS_DIR exported_state_tests)
Copy link
Member

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
Copy link
Member

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.

@gumb0 gumb0 force-pushed the eof/export-validation-tests branch from 6d0ae02 to 62d18d9 Compare February 22, 2024 13:59
@gumb0 gumb0 requested a review from chfast February 22, 2024 14:09
@gumb0 gumb0 merged commit 399beb9 into master Feb 22, 2024
@gumb0 gumb0 deleted the eof/export-validation-tests branch February 22, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants