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

Split system_tests into multiple suites such that each of them can finish CICD testing in time #100

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions tests/eosio.system_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ FC_REFLECT( connector, (balance)(weight) );

using namespace eosio_system;

BOOST_AUTO_TEST_SUITE(eosio_system_tests)

bool within_error(int64_t a, int64_t b, int64_t err) { return std::abs(a - b) <= err; };
bool within_one(int64_t a, int64_t b) { return within_error(a, b, 1); }

// Split the tests into multiple suites so that they can be finished within CICD time limit.
// Each suite takes approximately same amount of time.
BOOST_AUTO_TEST_SUITE(eosio_system_part1_tests)

BOOST_FIXTURE_TEST_CASE( buysell, eosio_system_tester ) try {

BOOST_REQUIRE_EQUAL( core_sym::from_string("0.0000"), get_balance( "alice1111111" ) );
Expand Down Expand Up @@ -1640,6 +1642,9 @@ BOOST_FIXTURE_TEST_CASE(producer_pay, eosio_system_tester, * boost::unit_test::t
}
} FC_LOG_AND_RETHROW()

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(eosio_system_part2_tests)

BOOST_FIXTURE_TEST_CASE(change_inflation, eosio_system_tester) try {

{
Expand Down Expand Up @@ -1773,6 +1778,9 @@ BOOST_AUTO_TEST_CASE(extreme_inflation) try {
BOOST_REQUIRE_EQUAL(t.wasm_assert_msg("quantity exceeds available supply"), t.push_action("defproducera"_n, "claimrewards"_n, mvo()("owner", "defproducera")));
} FC_LOG_AND_RETHROW()

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(eosio_system_part3_tests)

BOOST_FIXTURE_TEST_CASE(multiple_producer_pay, eosio_system_tester, * boost::unit_test::tolerance(1e-10)) try {

const int64_t secs_per_year = 52 * 7 * 24 * 3600;
Expand Down Expand Up @@ -3035,6 +3043,8 @@ BOOST_FIXTURE_TEST_CASE( voters_actions_affect_proxy_and_producers, eosio_system

} FC_LOG_AND_RETHROW()

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(eosio_system_part4_tests)

BOOST_FIXTURE_TEST_CASE( vote_both_proxy_and_producers, eosio_system_tester ) try {
//alice1111111 becomes a proxy
Expand Down Expand Up @@ -3718,6 +3728,9 @@ BOOST_FIXTURE_TEST_CASE( wasmcfg, eosio_system_tester ) try {
BOOST_REQUIRE_EQUAL( active_params.max_table_elements, 8192 );
} FC_LOG_AND_RETHROW()

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(eosio_system_part5_tests)

BOOST_FIXTURE_TEST_CASE( setram_effect, eosio_system_tester ) try {

const asset net = core_sym::from_string("8.0000");
Expand Down
Loading