Skip to content
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

use libtester 5.0 in CI; use ubuntu 22.04 for CI; use EOS VM OC for tests #681

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

spoonincode
Copy link
Member

Move CI to using libtester 5.0. A nice benefit of this is that c++20 can now be used in the EVM tests since libtester 5.0 is compatible with c++20.

But the primary motivation was to get the EVM tests running in EOS VM OC. Using OC improves the performance of test runs but also means the tests are running in the same environment we nominally expect it to be run in production on EOS: via OC. (Clearly contract unit tests aren't intended to exercise correctness of Leap's runtime environment, but it's still nice to see the tests run properly this way.)

Enabling tests to run via EOS VM OC consists of two main changes,

See inline comments for some additional caveats.

PR also makes some other minor bumps to CI components, like using ubuntu22 now.


add_test(NAME unit_tests COMMAND unit_test --report_level=detailed --color_output --run_test=!evm_runtime_tests)
add_test(NAME unit_tests COMMAND unit_test --report_level=detailed --color_output --run_test=!evm_runtime_tests -- --eos-vm-oc)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means anyone performing ctest will now need to be using post-5.0.0 libtester otherwise the tests will fail because OC won't work properly.

@@ -1101,12 +1101,14 @@ struct evm_runtime_tester : eosio_system_tester, silkworm::State {
};

BOOST_AUTO_TEST_SUITE(evm_runtime_tests)
BOOST_FIXTURE_TEST_CASE( GeneralStateTests, evm_runtime_tester ) try {
BOOST_AUTO_TEST_CASE( GeneralStateTests ) try {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought pretty hard about how I could avoid removing the fixture (and thus needing to plumb through all the t. below, among the other refactoring). Just couldn't come up with anything. The problem is the only ctor of validating_tester that allows either a custom config or modifying the config (what is used in current approach), also requires an externally created tmpdir to ensure the tmpdir outlives the tester. It's too bad there isn't a variant of the ctor that just has the config modification callback so that validating_tester's internal tmpdir can continue to be used.

@spoonincode spoonincode merged commit 2371df3 into main Feb 23, 2024
3 checks passed
@spoonincode spoonincode deleted the libtester5_oc branch February 23, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants