-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
|
||
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) |
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 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 { |
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 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.
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,
eosio_system_tester
instead of changing libtester's default, but this modification is not without some significant annoyance.See inline comments for some additional caveats.
PR also makes some other minor bumps to CI components, like using ubuntu22 now.