diff --git a/manifest/main.ml b/manifest/main.ml index a921b634e442f5c6b05749c92f8297064d848ae9..ae2e5718fbd69a8aa110f4ef7aaf209296218c1d 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -4574,7 +4574,6 @@ end = struct let _integration_consensus = tezt [ - "test_main"; "test_baking"; "test_consensus_key"; "test_deactivation"; @@ -4607,7 +4606,7 @@ end = struct in let _integration_gas = tezt - ["test_main"; "test_gas_costs"; "test_gas_levels"] + ["test_gas_costs"; "test_gas_levels"] ~path:(path // "lib_protocol/test/integration/gas") ~opam:(sf "tezos-protocol-%s-tests" name_dash) ~with_macos_security_framework:true @@ -4624,7 +4623,6 @@ end = struct let _integration_michelson = let modules = [ - ("test_main", true); ("test_annotations", true); ("test_block_time_instructions", true); ("test_contract_event", true); @@ -4687,7 +4685,6 @@ end = struct let _integration_operations = let modules = [ - ("test_main", true); ("test_activation", true); ("test_combined_operations", true); ("test_failing_noop", true); @@ -4726,7 +4723,6 @@ end = struct only_if N.(number >= 014) @@ fun () -> tezt [ - "test_main"; "generator_descriptors"; "generators"; "manager_operation_helpers"; @@ -4759,7 +4755,6 @@ end = struct let _integration = let modules = [ - ("test_main", true); ("test_constants", true); ("test_frozen_bonds", true); ("test_liquidity_baking", true); @@ -4852,7 +4847,6 @@ end = struct let _unit = let modules = [ - ("test_main", true); ("test_bond_id_repr", true); ("test_consensus_key", true); ("test_contract_repr", true); diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/dune b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/dune index e43d7b45a08c16c095b60340cbd76128c828c236..4a436a53b8d4f211dc88fda0fb655e7f62b11881 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/dune @@ -28,7 +28,6 @@ -open Tezos_protocol_016_PtMumbai_parameters -open Tezos_protocol_plugin_016_PtMumbai) (modules - test_main test_baking test_consensus_key test_deactivation diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_baking.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_baking.ml index ed011ef165a20fd1ed7f7937b560d51f5f966e9e..aa9128cf30f9c4afaab4321f8ecf0f169df67316 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_baking.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_baking.ml @@ -28,7 +28,8 @@ (** Testing ------- Component: Protocol (baking) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_baking.ml Subject: Rewards and bakers. Tests based on RPCs. *) @@ -432,27 +433,27 @@ let test_committee_sampling () = let tests = [ Tztest.tztest "cycle" `Quick test_cycle; - Tztest.tztest - "test_bake_n_cycles for 12 cycles" - `Quick - (test_bake_n_cycles 12); + Tztest.tztest "bake_n_cycles for 12 cycles" `Quick (test_bake_n_cycles 12); Tztest.tztest "voting_power" `Quick test_voting_power_cache; Tztest.tztest "the fixed baking reward is given after a bake" `Quick test_basic_baking_reward; Tztest.tztest - "test that the block producer gets the bonus while the payload producer \ - gets the baking reward " + "the block producer gets the bonus while the payload producer gets the \ + baking reward " `Quick test_rewards_block_and_payload_producer; Tztest.tztest - "test that a delegate with 8000 tez can bake" + "a delegate with 8000 tez can bake" `Quick (test_enough_active_stake_to_bake ~has_active_stake:true); Tztest.tztest - "test that a delegate with 7999 tez cannot bake" + "a delegate with 7999 tez cannot bake" `Quick (test_enough_active_stake_to_bake ~has_active_stake:false); - Tztest.tztest "test committee sampling" `Quick test_committee_sampling; + Tztest.tztest "committee sampling" `Quick test_committee_sampling; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("baking", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_consensus_key.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_consensus_key.ml index 103124ab73ea3516b90376a5b8a5999e2fd0e374..4fd27b63d9713307941e61685bd77294bd9b9b7e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_consensus_key.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_consensus_key.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (delegate_storage) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_consensus_key.ml Subject: consistency of the [Drain_delegate] operation *) @@ -231,72 +232,73 @@ let tests = Tztest. [ tztest - "test drain delegate high balance, excluding ck, ck delegates" + "drain delegate high balance, excluding ck, ck delegates" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:true ~ck_delegates:true); tztest - "test drain delegate high balance, excluding ck, ck does not delegate" + "drain delegate high balance, excluding ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:true ~ck_delegates:false); tztest - "test drain delegate high balance, with ck, ck delegates" + "drain delegate high balance, with ck, ck delegates" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:false ~ck_delegates:true); tztest - "test drain delegate high balance, with ck, ck does not delegate" + "drain delegate high balance, with ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:false ~ck_delegates:false); tztest - "test drain delegate low balance, excluding ck, ck delegates" + "drain delegate low balance, excluding ck, ck delegates" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:true ~ck_delegates:true); tztest - "test drain delegate low balance, excluding ck, ck does not delegate" + "drain delegate low balance, excluding ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:true ~ck_delegates:false); tztest - "test drain delegate low balance, with ck, ck delegates" + "drain delegate low balance, with ck, ck delegates" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:false ~ck_delegates:true); tztest - "test drain delegate low balance, with ck, ck does not delegate" + "drain delegate low balance, with ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:false ~ck_delegates:false); tztest - "test empty drain delegate excluding ck" + "empty drain delegate excluding ck" `Quick (test_drain_empty_delegate ~exclude_ck:true); tztest - "test empty drain delegate with ck" + "empty drain delegate with ck" `Quick (test_drain_empty_delegate ~exclude_ck:false); - tztest "test tz4 consensus key" `Quick test_tz4_consensus_key; - tztest - "test endorsement with ck" - `Quick - test_endorsement_with_consensus_key; + tztest "tz4 consensus key" `Quick test_tz4_consensus_key; + tztest "endorsement with ck" `Quick test_endorsement_with_consensus_key; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("consensus key", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_deactivation.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_deactivation.ml index 8e8cedc20c1848faa038a5e4c74bbe7158f08820..e288e389d930d18fa83ca97dd1055f205c3cc258 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_deactivation.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_deactivation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_deactivation.ml Subject: After a given number of cycles during which a delegate has not made use of its baking and endorsing rights, its account will be deactivated for validator selection. To bake/endorse @@ -354,3 +355,7 @@ let tests = `Quick test_a_really_deactivated_account_is_not_in_the_committee; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("deactivation", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_delegation.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_delegation.ml index 59e59733644424c01aa63c47823c31e634b306b4..de512b351f025f47b1f226b293a9fa17ca82034e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_delegation.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_delegation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (delegation) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_delegation.ml Subject: - Properties on bootstrap contracts (self-delegation, cannot delete/change their delegate (as opposed to contracts not-being-delegate which can do these), bootstrap manager @@ -1612,3 +1613,7 @@ let tests_delegate_registration = (******************************************************************************) let tests = tests_bootstrap_contracts @ tests_delegate_registration + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("delegation", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_baking.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_baking.ml index 3944df29b9dc8bb9102c7be02eb2be3201fa61e8..1740f0e8ac62882e6fb84a60452f7baefd04aed6 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_baking.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_baking.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (double baking) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_double_baking.ml Subject: A double baking evidence operation may be injected when it has been observed that a baker baked two different blocks at the same level and same round. @@ -461,3 +462,7 @@ let tests = `Quick test_valid_double_endorsing_followed_by_double_baking; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("double baking", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_endorsement.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_endorsement.ml index 39aa32571bfe04abd0e0f491e162d7fe798c60dc..a0c6d2cd26630eb7f615e85ae917067c5148fc93 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_endorsement.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_endorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (double endorsement) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_double_endorsement.ml Subject: Double endorsement evidence operation may happen when an endorser endorsed two different blocks on the same level. *) @@ -509,3 +510,7 @@ let tests = `Quick test_freeze_more_with_low_balance; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("double endorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_preendorsement.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_preendorsement.ml index 6d3ec64f42a96c80a4bb043ba8cb6d282483d625..d72304bd6ba32d781d397ded85ed08be5b77943e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_preendorsement.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_double_preendorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (double preendorsement) in Full_construction & Application modes - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_double_preendorsement.ml Subject: These tests target different cases for double preendorsement *) open Protocol @@ -399,3 +400,7 @@ let tests = let baking_mode = Block.Baking end) in AppMode.tests @ ConstrMode.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("double preendorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_endorsement.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_endorsement.ml index cda3ce637c0a046930eabb3a18d749476a7b50ee..788718b5ee07d3bea238a0dd2dff57a066a2955b 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_endorsement.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_endorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (endorsement) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_endorsement.ml Subject: Endorsing a block adds an extra layer of confidence to the Tezos' PoS algorithm. The block endorsing operation must be included in the following block. @@ -612,3 +613,7 @@ let tests = `Quick test_endorsement_grandparent_full_construction; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("endorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_frozen_deposits.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_frozen_deposits.ml index e5f392920dd1b06bd74eaca018f3ce156491b642..89135a13ef54fbd1d080ae83708518d2c96f9a3d 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_frozen_deposits.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_frozen_deposits.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (frozen_deposits) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_frozen_deposits.ml Subject: consistency of frozen deposits and the [set_deposits_limit] operation *) @@ -680,7 +681,7 @@ let test_error_is_thrown_when_smaller_upper_bound_for_frozen_window () = let tests = Tztest. [ - tztest "test invariants" `Quick test_invariants; + tztest "invariants" `Quick test_invariants; tztest "set deposits limit to 0%" `Quick (test_set_limit 0); tztest "set deposits limit to 5%" `Quick (test_set_limit 5); tztest "set a too high deposits limit" `Quick test_set_too_high_limit; @@ -698,19 +699,23 @@ let tests = `Quick test_unfreeze_deposits_after_deactivation; tztest - "frozen deposits with delegation" + "deposits with delegation" `Quick test_frozen_deposits_with_delegation; tztest - "test frozen deposits with overdelegation" + "frozen deposits with overdelegation" `Quick test_frozen_deposits_with_overdelegation; tztest - "test set limit with overdelegation" + "set limit with overdelegation" `Quick test_set_limit_with_overdelegation; tztest - "test error is thrown when the frozen window is smaller" + "error is thrown when the frozen window is smaller" `Quick test_error_is_thrown_when_smaller_upper_bound_for_frozen_window; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("frozen deposits", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml index 3f1ec561e735194682d60cc7f34b05a35ea7775f..4d87aeb74497ca9e649b843d602d0eefd7320925 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Helpers RPCs) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_helpers_rpcs.ml Subject: On RPCs. *) @@ -61,3 +62,7 @@ let test_baking_rights () = return_unit let tests = [Tztest.tztest "baking_rights" `Quick test_baking_rights] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("helpers rpcs", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_main.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_main.ml deleted file mode 100644 index e5341ec77bb0a847b2211b32a09a83ef198678a2..0000000000000000000000000000000000000000 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_main.ml +++ /dev/null @@ -1,53 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > consensus" - [ - (Protocol.name ^ ": endorsement", Test_endorsement.tests); - (Protocol.name ^ ": preendorsement", Test_preendorsement.tests); - (Protocol.name ^ ": double endorsement", Test_double_endorsement.tests); - ( Protocol.name ^ ": double preendorsement", - Test_double_preendorsement.tests ); - (Protocol.name ^ ": double baking", Test_double_baking.tests); - (Protocol.name ^ ": seed", Test_seed.tests); - (Protocol.name ^ ": baking", Test_baking.tests); - (Protocol.name ^ ": delegation", Test_delegation.tests); - (Protocol.name ^ ": deactivation", Test_deactivation.tests); - (Protocol.name ^ ": helpers rpcs", Test_helpers_rpcs.tests); - (Protocol.name ^ ": participation monitoring", Test_participation.tests); - (Protocol.name ^ ": frozen deposits", Test_frozen_deposits.tests); - (Protocol.name ^ ": consensus key", Test_consensus_key.tests); - ] - |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_participation.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_participation.ml index d4d2de0a592381f500ef309b6010b15fb4696e83..1e48f7407254880644ec3982b618c286e3c383c5 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_participation.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_participation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (participation monitoring) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_participation.ml Subject: Participation monitoring in Tenderbake *) @@ -192,12 +193,16 @@ let test_participation_rpc () = let tests = [ Tztest.tztest - "test insufficient participation" + "insufficient participation" `Quick (test_participation ~sufficient_participation:false); Tztest.tztest - "test minimal participation" + "minimal participation" `Quick (test_participation ~sufficient_participation:true); - Tztest.tztest "test participation RPC" `Quick test_participation_rpc; + Tztest.tztest "participation RPC" `Quick test_participation_rpc; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("participation monitoring", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_preendorsement.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_preendorsement.ml index e26246056d954aee37b0eed2a85bb11da301733a..8aab79358b88b16a2746b2031c2a6da2288ebf00 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_preendorsement.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_preendorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (preendorsement) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_preendorsement.ml *) open Protocol @@ -242,3 +243,7 @@ let tests = `Quick test_preendorsement_for_next_round; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("preendorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_seed.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_seed.ml index 993edf276dfd7185f7cd57606198eceec3817aa8..6e647bc2cb2c6be085dc9213a916f6ec7bbe57ba 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_seed.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_seed.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (seed) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_seed.ml Subject: - seed_nonce_hash included in some blocks - revelation operation of seed_nonce that should correspond to each seed_nonce_hash @@ -633,11 +634,14 @@ let tests = "revelation_missing_and_late" `Quick test_revelation_missing_and_late; - Tztest.tztest "test unrevealed" `Quick test_unrevealed; + Tztest.tztest "unrevealed" `Quick test_unrevealed; Tztest.tztest - "test_early_incorrect_unverified_correct_already_vdf" + "early_incorrect_unverified_correct_already_vdf" `Quick test_early_incorrect_unverified_correct_already_vdf; - Tztest.tztest "test VDF status" `Quick test_vdf_status; + Tztest.tztest "VDF status" `Quick test_vdf_status; Tztest.tztest "for_cycle cycle bounds" `Quick test_cycle_bounds; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("seed", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/dune b/src/proto_016_PtMumbai/lib_protocol/test/integration/dune index e5965e61a9f60a5b6791ad7d45b0e73e8dd00177..182c5ac90be784b5769f5e097eb8d06ea6e44093 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/dune @@ -29,7 +29,6 @@ -open Tezos_016_PtMumbai_test_helpers -open Tezos_base_test_helpers) (modules - test_main test_constants test_frozen_bonds test_liquidity_baking diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/dune b/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/dune index e358e9c047c421bb158465f3c295469ba369b6a9..9ad3d27331b88b98bf7603fd34310a465782453b 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/dune @@ -22,7 +22,7 @@ -open Tezos_protocol_016_PtMumbai -open Tezos_016_PtMumbai_test_helpers -open Tezos_base_test_helpers) - (modules test_main test_gas_costs test_gas_levels)) + (modules test_gas_costs test_gas_levels)) (executable (name main) diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_gas_costs.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_gas_costs.ml index 3e25643683f8c08c69caf4f3992d3fd30a651b30..0d769490de25e4f4512f6258a0f532d4da886c88 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_gas_costs.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_gas_costs.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (gas costs) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/gas/main.exe \ + -- --file test_gas_costs.ml Subject: Gas costs Current limitations: for maps, sets & compare, we only test integer comparable keys. @@ -282,3 +283,7 @@ let tests = `Quick (test_cost_reprs_are_all_positive all_io_costs); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("gas cost functions", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_gas_levels.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_gas_levels.ml index 36cbf622cd6001411b4f830aa09a3555d58f5479..18666f35c8d0f0c7da3f28aabaa0fd532a639d2e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_gas_levels.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_gas_levels.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Gas levels) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/gas/main.exe \ + -- --file test_gas_levels.ml Subject: On gas consumption and exhaustion. *) @@ -394,10 +395,10 @@ let make_batch_test_block_one_origination name contract gas_sampler = let app_n = List.map (fun (x, y) -> (x ^ " with contract " ^ name, y)) in app_n [ - ("Test bake one operation", test_one_operation); - ("Test bake one operation list", test_one_operation_list); - ("Test multiple single operations", test_many_single_operations); - ("Test both lists and single operations", test_mixed_operations); + ("bake one operation", test_one_operation); + ("bake one operation list", test_one_operation_list); + ("multiple single operations", test_many_single_operations); + ("both lists and single operations", test_mixed_operations); ] (** Tests the consumption of all gas in a block, should pass *) @@ -554,9 +555,8 @@ let tests = ( "Detect when gas limit of operation list exceeds the hard gas limit \ per block", test_malformed_block_max_limit_reached' ); - ( "Test the gas consumption of various operations", - test_block_mixed_operations ); - ("Test that emptying an account costs gas", test_emptying_account_gas); + ("the gas consumption of various operations", test_block_mixed_operations); + ("emptying an account costs gas", test_emptying_account_gas); ] @ make_batch_test_block_one_origination "nil" nil_contract basic_gas_sampler @ make_batch_test_block_one_origination @@ -567,3 +567,7 @@ let tests = "infinite loop" loop_contract basic_gas_sampler) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("gas levels", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_main.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_main.ml deleted file mode 100644 index 1cad429b13533b3b26461684ca0743830257ec8a..0000000000000000000000000000000000000000 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/test_main.ml +++ /dev/null @@ -1,41 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol > Gas - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > gas" - [ - (Protocol.name ^ ": gas levels", Test_gas_levels.tests); - (Protocol.name ^ ": gas cost functions", Test_gas_costs.tests); - ] - |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/dune b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/dune index c06f4353b81869fe9ae0de1dc2ee811bc8bf580c..c3545cbe131086e72355d7f61b1582ce9b1ce894 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/dune @@ -36,7 +36,6 @@ -open Tezos_benchmark_type_inference_016_PtMumbai -open Tezos_protocol_plugin_016_PtMumbai) (modules - test_main test_annotations test_block_time_instructions test_contract_event diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_annotations.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_annotations.ml index c0ab85002e43db7646753da577fbadaf3f8e3a2c..4534a0f5b2999528b7b469fc0e06a0ea3ec06550 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_annotations.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_annotations.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Michelson annotations) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_annotations.ml Subject: This module tests that Michelson annotations are properly handled. *) @@ -137,3 +138,7 @@ let tests = `Quick test_internal_origination; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("annotations", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_block_time_instructions.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_block_time_instructions.ml index 0bbb1f1d2df2a61cd75898f2f4e79b9982546a5e..abdf566a3dbc49cb9504c5f1ec0d6ded360e8920 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_block_time_instructions.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_block_time_instructions.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Michelson block-time instructions) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_block_time_instructions.ml Subject: This module tests that Michelson instructions related to block time are correct. *) @@ -77,3 +78,7 @@ let tests = `Quick test_min_block_time; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("block time instructions", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_contract_event.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_contract_event.ml index 3fd87a5ab22db039165d521c4e2bc87870c1222c..d782088bfd49070e9f70c156b6e381c40b57b9a3 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_contract_event.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_contract_event.ml @@ -30,7 +30,8 @@ open Lwt_result_syntax (** Testing ------- Component: Protocol (event logging) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_contract_event.ml Subject: This module tests that the event logs can be written to the receipt in correct order and expected format. *) @@ -134,3 +135,7 @@ let tests = `Quick contract_test; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("event logging", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_global_constants_storage.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_global_constants_storage.ml index b1d5597d640c560bb56d970cfab3d4ed82fdca0b..b9915896909caab72c82169a6f7326f3a36953a1 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_global_constants_storage.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_global_constants_storage.ml @@ -29,7 +29,8 @@ open Transfers (** Testing ------- Component: Protocol (global table of constants) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_global_constants_storage.ml Subject: This module tests that the global table of constants can be written to and read from across blocks. *) @@ -129,3 +130,10 @@ let tests = `Quick test_no_double_register; ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("global table of constants", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_interpretation.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_interpretation.ml index 388a6c590acd44972bb3c65ce31f5522a53ffe54..53513516f22e807552c890c447aada3c3b29555d 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_interpretation.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_interpretation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (interpretation) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_interpretation.ml Subject: Interpretation of Michelson scripts *) @@ -373,7 +374,7 @@ let path = project_root // Filename.dirname __FILE__ let tests = [ - Tztest.tztest "test bad contract error" `Quick test_bad_contract_parameter; + Tztest.tztest "bad contract error" `Quick test_bad_contract_parameter; Tztest.tztest "check robustness overflow error" `Slow test_stack_overflow; Tztest.tztest "check robustness overflow error in lwt" @@ -383,18 +384,18 @@ let tests = "test multiplication no illegitimate overflow" `Quick test_multiplication_close_to_overflow_passes; - Tztest.tztest "test stack overflow error" `Slow test_stack_overflow; + Tztest.tztest "stack overflow error" `Slow test_stack_overflow; Tztest.tztest_qcheck2 - ~name:"test map instr against options" + ~name:"map instr against options" QCheck2.Gen.( triple (opt small_signed_int) (opt small_signed_int) small_signed_int) Test_map_instr_on_options.test_mapping; Tztest.tztest - "test lambda_rec instruction" + "lambda_rec instruction" `Quick (test_contract_success (path // "contracts/rec_fact.tz") "0" "5" "120"); Tztest.tztest - "test lambda_rec instruction with apply" + "lambda_rec instruction with apply" `Quick (test_contract_success (path // "contracts/rec_fact_apply.tz") @@ -402,11 +403,11 @@ let tests = "5" "120"); Tztest.tztest - "test lambda_rec instruction with an infinite recursion" + "lambda_rec instruction with an infinite recursion" `Quick (test_contract_fail (path // "contracts/omega.tz") "Unit" "Unit"); Tztest.tztest - "test lambda_rec instruction storage" + "lambda_rec instruction storage" `Quick (test_store_and_reload (path // "contracts/rec_fact_store.tz") @@ -425,7 +426,7 @@ let tests = ~param_2:"5" ~expected_storage_str_2:"Left 120"); Tztest.tztest - "test lambda_rec instruction storage apply store" + "lambda_rec instruction storage apply store" `Quick (test_store_and_reload (path // "contracts/rec_fact_apply_store.tz") @@ -453,3 +454,7 @@ let tests = ~expected_storage_str_2:"Left 120"); ] @ error_encoding_tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("interpretation", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_lambda_normalization.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_lambda_normalization.ml index 3e53d4a0e87f7ed55c56305a4f0417e5083cbeee..a16c3d87f331e5f06d26d7909d4ee542ed4ce3ef 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_lambda_normalization.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_lambda_normalization.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Michelson) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_lambda_normalization.ml Subject: Test that lambdas are normalized to optimized format at elaboration *) @@ -230,7 +231,11 @@ let test_lambda_normalization () = let tests = [ Tztest.tztest - "Test that lambdas are normalized to optimized format during elaboration" + "lambdas are normalized to optimized format during elaboration" `Quick test_lambda_normalization; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("lambda normalization", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml index 03a84159c6b24ab6a7c4446adfd30b9dd8b1338d..dfcf84cec9fa15618a07474e4d6ad850a62dabd5 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml @@ -23,6 +23,14 @@ (* *) (*****************************************************************************) +(** Testing + ------- + Component: Protocol (Michelson) + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_lazy_storage_diff.ml + Subject: Test lazy storage +*) + open Protocol (** Generation of input data *) @@ -138,3 +146,7 @@ let tests = Tztest.tztest "conversion roundtrip" `Slow (on_diffs conversion_roundtrip); Tztest.tztest "encoding roundtrip" `Slow (on_diffs encoding_roundtrip); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("lazy storage diff", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_main.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_main.ml deleted file mode 100644 index 23845304daed578803f6b26cf7ec2738b1c135dd..0000000000000000000000000000000000000000 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_main.ml +++ /dev/null @@ -1,64 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe - Subject: Integration > Michelson -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > michelson" - [ - ( Protocol.name ^ ": global table of constants", - Test_global_constants_storage.tests ); - (Protocol.name ^ ": interpretation", Test_interpretation.tests); - (Protocol.name ^ ": lazy storage diff", Test_lazy_storage_diff.tests); - (Protocol.name ^ ": sapling", Test_sapling.tests); - (Protocol.name ^ ": script typed ir size", Test_script_typed_ir_size.tests); - (Protocol.name ^ ": temp big maps", Test_temp_big_maps.tests); - (Protocol.name ^ ": ticket balance key", Test_ticket_balance_key.tests); - (Protocol.name ^ ": ticket scanner", Test_ticket_scanner.tests); - (Protocol.name ^ ": ticket storage", Test_ticket_storage.tests); - ( Protocol.name ^ ": ticket lazy storage diff", - Test_ticket_lazy_storage_diff.tests ); - ( Protocol.name ^ ": ticket operations diff", - Test_ticket_operations_diff.tests ); - (Protocol.name ^ ": ticket accounting", Test_ticket_accounting.tests); - (Protocol.name ^ ": ticket balance", Test_ticket_balance.tests); - (Protocol.name ^ ": ticket manager", Test_ticket_manager.tests); - (Protocol.name ^ ": typechecking", Test_typechecking.tests); - (Protocol.name ^ ": script cache", Test_script_cache.tests); - ( Protocol.name ^ ": block time instructions", - Test_block_time_instructions.tests ); - (Protocol.name ^ ": annotations", Test_annotations.tests); - (Protocol.name ^ ": event logging", Test_contract_event.tests); - (Protocol.name ^ ": patched contracts", Test_patched_contracts.tests); - (Protocol.name ^ ": lambda normalization", Test_lambda_normalization.tests); - ] - |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_patched_contracts.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_patched_contracts.ml index 7b004719fd75b8a072f92d7b14e677463f6589cf..afaa346c0f2cc8b3137d7678b29ff452c641c728 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_patched_contracts.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_patched_contracts.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Migration (patched scripts) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_patched_contracts.ml Subject: Migration *) @@ -213,3 +214,7 @@ let tests = let module Test = Legacy_patch_test (Patches) in List.concat_map Test.tests Patches.patches) test_modules + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("patched contracts", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_sapling.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_sapling.ml index 22a386f1257bda50db6008d26e95af449148a5ce..a09cf4f99fad90dff6912b35afd51d74f63dff3a 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_sapling.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_sapling.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Sapling) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_sapling.ml Subject: On the privacy-preserving library Sapling *) @@ -1146,34 +1147,31 @@ let tests = "test_get_memo_size" `Quick Raw_context_tests.test_get_memo_size; - Tztest.tztest "test_verify_memo" `Quick Alpha_context_tests.test_verify_memo; + Tztest.tztest "verify_memo" `Quick Alpha_context_tests.test_verify_memo; + Tztest.tztest "bench_phases" `Slow Alpha_context_tests.test_bench_phases; Tztest.tztest - "test_bench_phases" - `Slow - Alpha_context_tests.test_bench_phases; - Tztest.tztest - "test_bench_phases_legacy" + "bench_phases_legacy" `Quick Alpha_context_tests.test_bench_phases_legacy; Tztest.tztest - "test_bench_fold_over_same_token" + "bench_fold_over_same_token" `Slow Alpha_context_tests.test_bench_fold_over_same_token; Tztest.tztest - "test_double_spend_same_input" + "double_spend_same_input" `Quick Alpha_context_tests.test_double_spend_same_input; Tztest.tztest - "test_verifyupdate_one_transaction" + "verifyupdate_one_transaction" `Quick Alpha_context_tests.test_verifyupdate_one_transaction; Tztest.tztest - "test_verifyupdate_two_transactions" + "verifyupdate_two_transactions" `Quick Alpha_context_tests.test_verifyupdate_two_transactions; - Tztest.tztest "test_shielded_tez" `Quick Interpreter_tests.test_shielded_tez; + Tztest.tztest "shielded_tez" `Quick Interpreter_tests.test_shielded_tez; Tztest.tztest - "test use state from other contract and transact" + "use state from other contract and transact" `Quick Interpreter_tests.test_use_state_from_other_contract_and_transact; Tztest.tztest @@ -1181,10 +1179,13 @@ let tests = `Quick Interpreter_tests.test_push_sapling_state_should_be_forbidden; Tztest.tztest - "test_transac_and_block" + "transac_and_block" `Quick Interpreter_tests.test_transac_and_block; - Tztest.tztest "test_drop" `Quick Interpreter_tests.test_drop; - Tztest.tztest "test_double" `Quick Interpreter_tests.test_double; - Tztest.tztest "test_state_as_arg" `Quick Interpreter_tests.test_state_as_arg; + Tztest.tztest "drop" `Quick Interpreter_tests.test_drop; + Tztest.tztest "double" `Quick Interpreter_tests.test_double; + Tztest.tztest "state_as_arg" `Quick Interpreter_tests.test_state_as_arg; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sapling", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_script_cache.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_script_cache.ml index 423d8fae5ee7dabf82abd6f66b90042df0cbb3a4..bab0df4f25d99fb27c0414c6793ac404c96f2747 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_script_cache.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_script_cache.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (cache) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_script_cache.ml Subject: These unit tests check basic behavior of script cache *) @@ -415,3 +416,7 @@ let tests = test_size_limit_is_in_constants_repr; tztest "entries show LRU behavior" `Quick test_entries_shows_lru; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("script cache", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml index 54638bbe6d317664b58f4f050301431d13201342..46edd485106816f2b7f73db022e7297c0c723c96 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (script typed IR size) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_script_typed_ir_size.ml Subject: Script_typed_ir computes good approximation of values' sizes *) @@ -1040,9 +1041,13 @@ let check_micheline_sizes () = let tests = let open Tztest in [ - tztest "check value size" `Quick check_value_size; - tztest "check ty size" `Quick check_ty_size; - tztest "check kinstr size" `Quick check_kinstr_size; - tztest "check witness sizes" `Quick check_witness_sizes; - tztest "check micheline sizes" `Quick check_micheline_sizes; + tztest "value size" `Quick check_value_size; + tztest "ty size" `Quick check_ty_size; + tztest "kinstr size" `Quick check_kinstr_size; + tztest "witness sizes" `Quick check_witness_sizes; + tztest "micheline sizes" `Quick check_micheline_sizes; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("script typed ir size", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_temp_big_maps.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_temp_big_maps.ml index e4a4b50208ad37a5bc2e50fa5f163a5f62f5113f..e7e389e210872e8373182c8154991269ac3929bc 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_temp_big_maps.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_temp_big_maps.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (temporary big maps) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_temp_big_maps.ml Subject: On temporary big maps. *) @@ -96,3 +97,7 @@ let tests = (test_temp_big_maps_contract param_left param_right)) param_right_values) param_left_values) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("temp big maps", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_accounting.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_accounting.ml index eeb2d18629723ece9d9a6b299524333c816f83f6..a1894605abf46ceed428734765e4132b4c4838c9 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_accounting.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_accounting.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_accounting.ml Subject: Ticket scanner tests *) @@ -1471,3 +1472,7 @@ let tests = `Quick test_ticket_token_map_of_list_with_duplicates; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket accounting", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance.ml index 91cab7fa74199b9802fafca57e15467b48ba33f5..bc897c5105a152ddf0d877c096d4db46ad85082d 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_balance_key) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_balance.ml Subject: Ticket balance key hashing *) @@ -1732,34 +1733,35 @@ let test_storage_for_create_and_remove_tickets () = let tests = [ - Tztest.tztest "Test add strict" `Quick test_add_strict; - Tztest.tztest "Test add and remove" `Quick test_add_remove; - Tztest.tztest "Test add to big-map" `Quick test_add_to_big_map; - Tztest.tztest "Test swap big-map" `Quick test_swap_big_map; - Tztest.tztest "Test send ticket" `Quick test_send_tickets; + Tztest.tztest "add strict" `Quick test_add_strict; + Tztest.tztest "dd and remove" `Quick test_add_remove; + Tztest.tztest "add to big-map" `Quick test_add_to_big_map; + Tztest.tztest "swap big-map" `Quick test_swap_big_map; + Tztest.tztest "send ticket" `Quick test_send_tickets; Tztest.tztest - "Test send ticket to implicit" + "send ticket to implicit" `Quick test_send_tickets_to_implicit_account; Tztest.tztest - "Test send and store tickets with amount 0" + "send and store tickets with amount 0" `Quick test_send_and_store_zero_amount_tickets; + Tztest.tztest "send tickets in big-map" `Quick test_send_tickets_in_big_map; + Tztest.tztest "modify big-map" `Quick test_modify_big_map; + Tztest.tztest "send drop" `Quick test_send_tickets_in_big_map_and_drop; Tztest.tztest - "Test send tickets in big-map" - `Quick - test_send_tickets_in_big_map; - Tztest.tztest "Test modify big-map" `Quick test_modify_big_map; - Tztest.tztest "Test send drop" `Quick test_send_tickets_in_big_map_and_drop; - Tztest.tztest - "Test create contract with ticket" + "create contract with ticket" `Quick test_create_contract_with_ticket; - Tztest.tztest "Test join" `Quick test_join_tickets; - Tztest.tztest "Test wallet" `Quick test_ticket_wallet; - Tztest.tztest "Test ticket storage" `Quick test_ticket_storage; + Tztest.tztest "join" `Quick test_join_tickets; + Tztest.tztest "wallet" `Quick test_ticket_wallet; + Tztest.tztest "ticket storage" `Quick test_ticket_storage; Tztest.tztest - "Test storage for create and remove tickets" + "storage for create and remove tickets" `Quick test_storage_for_create_and_remove_tickets; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket balance", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml index 2d00f79a3a01e1c9512241c744d94588137c8445..509e453b8210c58100714398818e17490af826f1 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_balance_key) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_balance_key.ml Subject: Ticket balance key hashing *) @@ -423,30 +424,28 @@ let test_option_some () = let tests = [ - Tztest.tztest "Test different ticketers" `Quick test_different_ticketers; - Tztest.tztest "Test different owners" `Quick test_different_owners; - Tztest.tztest "Test different content" `Quick test_different_content; - Tztest.tztest "Test different amounts" `Quick test_different_amounts; - Tztest.tztest "Test nat int" `Quick test_nat_int; - Tztest.tztest "Test nat mutez" `Quick test_nat_mutez; - Tztest.tztest "Test not bool" `Quick test_bool_nat; - Tztest.tztest "Test nat bytes" `Quick test_nat_bytes; - Tztest.tztest "Test string chain_id" `Quick test_string_chain_id; - Tztest.tztest "Test string key_hash" `Quick test_string_key_hash; - Tztest.tztest "Test string timestamp" `Quick test_string_timestamp; - Tztest.tztest "Test string address" `Quick test_string_address; - Tztest.tztest "Test string key" `Quick test_string_key; - Tztest.tztest "Test string signature" `Quick test_string_signature; - Tztest.tztest "Test annotations for pair" `Quick test_annotation_pair; - Tztest.tztest "Test annotations for or" `Quick test_annotation_or; - Tztest.tztest - "Test annotations for type alias" - `Quick - test_annotation_type_alias; - Tztest.tztest - "Test annotations for paired ors" - `Quick - test_annotation_pair_or; - Tztest.tztest "Test option none" `Quick test_option_none; - Tztest.tztest "Test option some" `Quick test_option_some; + Tztest.tztest "different ticketers" `Quick test_different_ticketers; + Tztest.tztest "different owners" `Quick test_different_owners; + Tztest.tztest "different content" `Quick test_different_content; + Tztest.tztest "different amounts" `Quick test_different_amounts; + Tztest.tztest "nat int" `Quick test_nat_int; + Tztest.tztest "nat mutez" `Quick test_nat_mutez; + Tztest.tztest "not bool" `Quick test_bool_nat; + Tztest.tztest "nat bytes" `Quick test_nat_bytes; + Tztest.tztest "string chain_id" `Quick test_string_chain_id; + Tztest.tztest "string key_hash" `Quick test_string_key_hash; + Tztest.tztest "string timestamp" `Quick test_string_timestamp; + Tztest.tztest "string address" `Quick test_string_address; + Tztest.tztest "string key" `Quick test_string_key; + Tztest.tztest "string signature" `Quick test_string_signature; + Tztest.tztest "annotations for pair" `Quick test_annotation_pair; + Tztest.tztest "annotations for or" `Quick test_annotation_or; + Tztest.tztest "annotations for type alias" `Quick test_annotation_type_alias; + Tztest.tztest "annotations for paired ors" `Quick test_annotation_pair_or; + Tztest.tztest "option none" `Quick test_option_none; + Tztest.tztest "option some" `Quick test_option_some; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket balance key", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml index e484863f390c692b7149e8348572450e0f9f9a9d..6bff3b503daf92600f3005fb35fe2c635a90c65d 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_lazy_storage_diff.ml Subject: Ticket scanner tests *) @@ -657,38 +658,36 @@ let test_mix_lazy_diffs () = let tests = [ - Tztest.tztest "Test allocate new empty" `Quick test_allocate_new_empty; - Tztest.tztest "Test allocate new" `Quick test_allocate_new; - Tztest.tztest - "Test allocate new no tickets" - `Quick - test_allocate_new_no_tickets; + Tztest.tztest "allocate new empty" `Quick test_allocate_new_empty; + Tztest.tztest "allocate new" `Quick test_allocate_new; + Tztest.tztest "allocate new no tickets" `Quick test_allocate_new_no_tickets; Tztest.tztest "Remove" `Quick test_remove_big_map; Tztest.tztest - "Test no updates to existing" + "no updates to existing" `Quick test_no_updates_to_existing_big_map; + Tztest.tztest "update existing big-map" `Quick test_update_existing_big_map; Tztest.tztest - "Test update existing big-map" - `Quick - test_update_existing_big_map; - Tztest.tztest - "Test update same key multiple times on existing big-map" + "update same key multiple times on existing big-map" `Quick test_update_same_key_multiple_times_existing_big_map; Tztest.tztest - "Test remove same key multiple times on existing big-map" + "remove same key multiple times on existing big-map" `Quick test_remove_same_key_multiple_times_existing_big_map; Tztest.tztest - "Test update and remove same key multiple times on existing big-map" + "update and remove same key multiple times on existing big-map" `Quick test_update_and_remove_same_key_multiple_times_existing_big_map; - Tztest.tztest "Test copy" `Quick test_copy_big_map; - Tztest.tztest "Test copy with updates" `Quick test_copy_big_map_with_updates; + Tztest.tztest "copy" `Quick test_copy_big_map; + Tztest.tztest "copy with updates" `Quick test_copy_big_map_with_updates; Tztest.tztest - "Test copy with multiple updates to same key" + "copy with multiple updates to same key" `Quick test_copy_big_map_with_updates_to_same_key; - Tztest.tztest "Test mix lazy diffs" `Quick test_mix_lazy_diffs; + Tztest.tztest "mix lazy diffs" `Quick test_mix_lazy_diffs; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket lazy storage diff", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_manager.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_manager.ml index 9d3614361b3da30235d64ae85bfaa427cc24795c..42d1a520c66f5d4eef4e82e55f08e9780ad7768a 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_manager.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_manager.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_balance_key) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_manager.ml Subject: Tests that compare the ticket-balance table against tickets in the contract storages. The tests include a lot of operations that sends and store tickets. After each operation we check that the @@ -802,3 +803,7 @@ let tests = test_add_remove_from_lazy_storage; Tztest.tztest "Mix of operations" `Quick test_mixed_operations; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket manager", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml index 4f4ccb41f6387b7f231f012f4e394c9ff905fb52..6af87beafcd183d24cf37133e1884a7d7e2f4d4a 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_operations_diff.ml Subject: Ticket scanner tests *) @@ -1307,76 +1308,77 @@ let test_fail_on_zero_amount_tickets () = let tests = [ Tztest.tztest - "Test operations that do not involve tickets" + "operations that do not involve tickets" `Quick test_non_ticket_operations; Tztest.tztest - "Test transfer to non-ticket contract" + "transfer to non-ticket contract" `Quick test_transfer_to_non_ticket_contract; Tztest.tztest - "Test transfer empty ticket list" + "transfer empty ticket list" `Quick test_transfer_empty_ticket_list; - Tztest.tztest "Test transfer one ticket" `Quick test_transfer_one_ticket; + Tztest.tztest "transfer one ticket" `Quick test_transfer_one_ticket; Tztest.tztest - "Test transfer multiple tickets" + "transfer multiple tickets" `Quick test_transfer_multiple_tickets; Tztest.tztest - "Test transfer different tickets" + "transfer different tickets" `Quick test_transfer_different_tickets; Tztest.tztest - "Test transfer to two contracts with different tickets" + "transfer to two contracts with different tickets" `Quick test_transfer_to_two_contracts_with_different_tickets; Tztest.tztest - "Test originate contract that does not contain tickets" + "originate contract that does not contain tickets" `Quick test_originate_non_ticket_contract; Tztest.tztest - "Test originate with empty ticket list" + "originate with empty ticket list" `Quick test_originate_with_empty_tickets_list; Tztest.tztest - "Test originate with one ticket" + "originate with one ticket" `Quick test_originate_with_one_ticket; Tztest.tztest - "Test originate with multiple tickets" + "originate with multiple tickets" `Quick test_originate_with_multiple_tickets; Tztest.tztest - "Test originate with different tickets" + "originate with different tickets" `Quick test_originate_with_different_tickets; Tztest.tztest - "Test originate two contracts with different tickets" + "originate two contracts with different tickets" `Quick test_originate_two_contracts_with_different_tickets; + Tztest.tztest "originate and transfer" `Quick test_originate_and_transfer; Tztest.tztest - "Test originate and transfer" - `Quick - test_originate_and_transfer; - Tztest.tztest - "Test originate big-map with tickets" + "originate big-map with tickets" `Quick test_originate_big_map_with_tickets; Tztest.tztest - "Test transfer big-map with tickets" + "transfer big-map with tickets" `Quick test_transfer_big_map_with_tickets; Tztest.tztest - "Test tx rollup deposit one ticket" + "tx rollup deposit one ticket" `Quick test_tx_rollup_deposit_one_ticket; Tztest.tztest - "Test transfer fails on multiple zero tickets" + "transfer fails on multiple zero tickets" `Quick test_transfer_fails_on_multiple_zero_tickets; Tztest.tztest - "Test fail in zero-amount tickets" + "fail in zero-amount tickets" `Quick test_fail_on_zero_amount_tickets; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket operations diff", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_scanner.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_scanner.ml index 2821fdc0bf5d0edcd0530ad5f2367bb3808adab8..a9c2b00fa2686fd98cf95c7982abc348ae63b491 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_scanner.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_scanner.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_scanner.ml Subject: Ticket scanner tests *) @@ -627,67 +628,67 @@ let test_tickets_remove_overlay_in_non_empty_in_big_map_ref () = let tests = [ + Tztest.tztest "tickets in unit ticket" `Quick test_tickets_in_unit_ticket; + Tztest.tztest "tickets in list" `Quick test_tickets_in_list; Tztest.tztest - "Test tickets in unit ticket" - `Quick - test_tickets_in_unit_ticket; - Tztest.tztest "Test tickets in list" `Quick test_tickets_in_list; - Tztest.tztest - "Test tickets in list with zero amount" + "tickets in list with zero amount" `Quick test_tickets_in_list_with_zero_amount; - Tztest.tztest "Test tickets in pair" `Quick test_tickets_in_pair; + Tztest.tztest "tickets in pair" `Quick test_tickets_in_pair; Tztest.tztest - "Test tickets in pair with zero amount" + "tickets in pair with zero amount" `Quick test_tickets_in_pair_with_zero_amount; - Tztest.tztest "Test tickets in map" `Quick test_tickets_in_map; + Tztest.tztest "tickets in map" `Quick test_tickets_in_map; Tztest.tztest - "Test tickets in map with zero amount" + "tickets in map with zero amount" `Quick test_tickets_in_map_with_zero_amount; - Tztest.tztest "Test tickets in big map" `Quick test_tickets_in_big_map; + Tztest.tztest "tickets in big map" `Quick test_tickets_in_big_map; Tztest.tztest - "Test tickets in big map with include lazy set to false" + "tickets in big map with include lazy set to false" `Quick test_tickets_in_big_map_strict_only; Tztest.tztest - "Test tickets in list in big map" + "tickets in list in big map" `Quick test_tickets_in_list_in_big_map; Tztest.tztest - "Test tickets in a pair of big-map and list with include lazy set to \ - false" + "tickets in a pair of big-map and list with include lazy set to false" `Quick test_tickets_in_pair_big_map_and_list_strict_only; - Tztest.tztest "Test tickets in or left" `Quick test_tickets_in_or_left; + Tztest.tztest "tickets in or left" `Quick test_tickets_in_or_left; Tztest.tztest - "Test tickets in or left with zero amount" + "tickets in or left with zero amount" `Quick test_tickets_in_or_left_with_zero_amount; - Tztest.tztest "Test tickets in or right" `Quick test_tickets_in_or_right; + Tztest.tztest "tickets in or right" `Quick test_tickets_in_or_right; Tztest.tztest - "Test tickets in empty big-map ref" + "tickets in empty big-map ref" `Quick test_tickets_overlay_in_empty_big_map_ref; Tztest.tztest - "Test tickets in big-map ref" + "tickets in big-map ref" `Quick test_tickets_in_empty_big_map_ref; Tztest.tztest - "Test tickets in non-empty big-map ref" + "tickets in non-empty big-map ref" `Quick test_tickets_in_non_empty_big_map_ref; Tztest.tztest - "Test tickets in non-empty big-map ref with overlay" + "tickets in non-empty big-map ref with overlay" `Quick test_tickets_overlay_in_non_empty_in_big_map_ref; Tztest.tztest - "Test tickets replace existing value from overlay" + "tickets replace existing value from overlay" `Quick test_tickets_replace_overlay_in_non_empty_in_big_map_ref; Tztest.tztest - "Test tickets remove existing value from overlay" + "tickets remove existing value from overlay" `Quick test_tickets_remove_overlay_in_non_empty_in_big_map_ref; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket scanner", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_storage.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_storage.ml index ba6ed02088ef46b1874f8ce51e3aa6a8156ee099..68bcb6a7e2b24332a4c928df919ab488484b97ec 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_storage.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_ticket_storage.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Alpha_context.Ticket_balance) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_storage.ml Subject: Ticket storage functions tested using the Ticket_balance module in Alpha_context. *) @@ -269,3 +270,7 @@ let tests = test_ticket_balance_different_owners; Tztest.tztest "ticket storage space" `Quick test_storage_space; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket storage", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_typechecking.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_typechecking.ml index acb8734c9bcf679597cd2fe37c79b983daaacb31..f575d9ac0deffbbb93905f4de58d0d617b54ea7e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_typechecking.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/test_typechecking.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (type-checking) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_typechecking.ml Subject: Type-checking *) @@ -878,59 +879,63 @@ let test_contract_failure path = let tests = [ - Tztest.tztest "test unparse view" `Quick test_unparse_view; + Tztest.tztest "unparse view" `Quick test_unparse_view; Tztest.tztest - "test typecheck stack overflow error" + "typecheck stack overflow error" `Quick test_typecheck_stack_overflow; - Tztest.tztest "test comb type parsing" `Quick test_parse_comb_type; - Tztest.tztest "test comb type unparsing" `Quick test_unparse_comb_type; + Tztest.tztest "comb type parsing" `Quick test_parse_comb_type; + Tztest.tztest "comb type unparsing" `Quick test_unparse_comb_type; Tztest.tztest - "test comb comparable type unparsing" + "comb comparable type unparsing" `Quick test_unparse_comb_comparable_type; - Tztest.tztest "test comb data parsing" `Quick test_parse_comb_data; - Tztest.tztest "test comb data unparsing" `Quick test_unparse_comb_data; - Tztest.tztest "test optimal comb data unparsing" `Quick test_optimal_comb; - Tztest.tztest "test parse address" `Quick test_parse_address; + Tztest.tztest "comb data parsing" `Quick test_parse_comb_data; + Tztest.tztest "comb data unparsing" `Quick test_unparse_comb_data; + Tztest.tztest "optimal comb data unparsing" `Quick test_optimal_comb; + Tztest.tztest "parse address" `Quick test_parse_address; Tztest.tztest - "test unpackability of the contract type" + "unpackability of the contract type" `Quick test_contract_not_packable; Tztest.tztest - "test forbidden SELF in view" + "forbidden SELF in view" `Quick (test_forbidden_op_in_view "SELF"); Tztest.tztest - "test forbidden SET_DELEGATE in view" + "forbidden SET_DELEGATE in view" `Quick (test_forbidden_op_in_view "SET_DELEGATE"); Tztest.tztest - "test forbidden TRANSFER_TOKENS in view" + "forbidden TRANSFER_TOKENS in view" `Quick (test_forbidden_op_in_view "TRANSFER_TOKENS"); Tztest.tztest - "test forbidden CREATE_CONTRACT in view" + "forbidden CREATE_CONTRACT in view" `Quick (test_forbidden_op_in_view "CREATE_CONTRACT"); Tztest.tztest - "test parse contract data for rollup" + "parse contract data for rollup" `Quick test_parse_contract_data_for_unit_rollup; Tztest.tztest - "test parse contract data for rollup with entrypoint invalid type" + "parse contract data for rollup with entrypoint invalid type" `Quick test_parse_contract_data_for_rollup_with_invalid_type; Tztest.tztest - "test lambda_rec instruction" + "lambda_rec instruction" `Quick (test_contract_success (path // "contracts/rec_fact.tz")); Tztest.tztest - "test lambda_rec instruction with apply" + "lambda_rec instruction with apply" `Quick (test_contract_success (path // "contracts/rec_fact_apply.tz")); Tztest.tztest - "test lambda_rec with type error" + "lambda_rec with type error" `Quick (test_contract_failure (path // "contracts/fail_rec.tz")); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("typechecking", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/dune b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/dune index 5efb8044f524ddd5c8b530c00cae418777ea8d14..b421955372788c595a896de4414087b8dd20b0c0 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/dune @@ -28,7 +28,6 @@ -open Tezos_base_test_helpers -open Tezos_protocol_plugin_016_PtMumbai) (modules - test_main test_activation test_combined_operations test_failing_noop diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_activation.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_activation.ml index 27aa8829335b6857559b2dcbc2701f0e7fc59235..c3caf1c1c0a22fe7c16cf074e1a14fa5b5333c90 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_activation.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_activation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (activation) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_activation.ml Subject: The activation operation creates an implicit contract from a registered commitment present in the context. It is parametrized by a public key hash (pkh) and a secret. @@ -571,3 +572,7 @@ let tests = `Quick test_invalid_transfer_from_unactivated_account; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("activation", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_combined_operations.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_combined_operations.ml index 2574fce2d1a0bb092c4175b26d106db655d8fa70..13cc2ad379b36a363d67f200f144232958056f57 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_combined_operations.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_combined_operations.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (combined operations) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_combined_operations.ml Subject: Multiple operations can be grouped in one ensuring their deterministic application. @@ -407,3 +408,6 @@ let tests = `Quick test_inconsistent_counters; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("combined", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_failing_noop.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_failing_noop.ml index bd51316a7ff787dc78f5c8626e4a6bd31b03e1d9..6f54e5daabcf85ee96ba2a1b6761cbdb3178eb0e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_failing_noop.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_failing_noop.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_failing_noop.ml Subject: The Failing_noop operation was added bearing in mind the possibility for the end user to sign arbitrary bytes, encapsulate in the operation, with the absolute garanty that @@ -47,3 +48,7 @@ let failing_noop_must_fail_when_injected () = let tests = [Tztest.tztest "injection fails" `Quick failing_noop_must_fail_when_injected] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("failing_noop operation", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_main.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_main.ml deleted file mode 100644 index dcb9b02326efc5d2af031df62c157aa0a04dba25..0000000000000000000000000000000000000000 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_main.ml +++ /dev/null @@ -1,53 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > operations" - [ - (Protocol.name ^ ": voting", Test_voting.tests); - (Protocol.name ^ ": origination", Test_origination.tests); - (Protocol.name ^ ": revelation", Test_reveal.tests); - (Protocol.name ^ ": transfer", Test_transfer.tests); - (Protocol.name ^ ": activation", Test_activation.tests); - ( Protocol.name ^ ": paid storage increase", - Test_paid_storage_increase.tests ); - (Protocol.name ^ ": combined", Test_combined_operations.tests); - (Protocol.name ^ ": failing_noop operation", Test_failing_noop.tests); - (Protocol.name ^ ": tx rollup", Test_tx_rollup.tests); - (Protocol.name ^ ": sc rollup", Test_sc_rollup.tests); - (Protocol.name ^ ": sc rollup transfer", Test_sc_rollup_transfer.tests); - (Protocol.name ^ ": zk rollup", Test_zk_rollup.tests); - (Protocol.name ^ ": transfer ticket", Test_transfer_ticket.tests); - ] - |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_origination.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_origination.ml index dd4e1bd69f64acecca4bec515bcb83b395222558..40bda2095d3605180cdb2b167ea33dc0ed41257f 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_origination.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_origination.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (origination) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_origination.ml Subject: On originating contracts. *) @@ -324,3 +325,7 @@ let tests = Tztest.tztest "counter" `Quick test_counter; Tztest.tztest "unparsable script" `Quick test_unparsable_script; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("origination", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_paid_storage_increase.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_paid_storage_increase.ml index 8d9944979cf44f1c8a04e55fabe313291c4c8382..8fbdbe53f7de462a7239d494bc7765b31aba92a0 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_paid_storage_increase.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_paid_storage_increase.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (increase_paid_storage) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_paid_storage_increase.ml Subject: On increasing a paid amount of contract storage. *) @@ -243,3 +244,7 @@ let tests = Tztest.tztest "no contract to bump its paid storage" `Quick test_no_contract; Tztest.tztest "effectiveness" `Quick test_effectiveness; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("paid storage increase", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_reveal.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_reveal.ml index 4b1a0def373a8c9855a5e9050744db67ac51fe60..b5308a5402698b3144ac3e63481e02447cffff33 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_reveal.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_reveal.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (revelation) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_reveal.ml Subject: On the reveal operation. *) @@ -745,3 +746,7 @@ let tests = `Quick test_valid_reveal_after_emptying_balance; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("revelation", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup.ml index 6fd543af77bce1eb5a991da46f8dc682599cdeb6..f4f2742b81ae5beb438ddb98fa20ac74c4109cf2 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Rollup layer 1 logic - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_sc_rollup.ml Subject: Test smart contract rollup *) @@ -3228,13 +3229,13 @@ let tests = `Quick test_inbox_max_number_of_messages_per_level; Tztest.tztest - "Test that a player can't timeout another player before timeout period \ - and related timeout value." + "a player can't timeout another player before timeout period and related \ + timeout value." `Quick test_timeout; Tztest.tztest - "Test that a player cannot play more than max_number_of_parallel_games \ - games in parallel." + "a player cannot play more than max_number_of_parallel_games games in \ + parallel." `Quick test_number_of_parallel_games_bounded; Tztest.tztest @@ -3254,7 +3255,7 @@ let tests = `Quick test_refute_invalid_metadata; Tztest.tztest - "Test that SOL/Info_per_level/EOL are added in the inbox" + "SOL/Info_per_level/EOL are added in the inbox" `Quick test_automatically_added_internal_messages; Tztest.tztest @@ -3289,3 +3290,7 @@ let tests = `Quick test_start_game_on_cemented_commitment; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml index a7fdbc9533764f95d27fcb10ef239eba1a528e43..feb0d62a62fbb5825d5dce4d23b3c7023e0a361b 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Sc rollup L1/L2 communication - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_sc_rollup_transfer.ml Subject: Test transfers from Michelson to smart contract rollups *) @@ -416,3 +417,7 @@ let tests = `Quick test_transfer_non_zero_amount_ticket; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup transfer", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_transfer.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_transfer.ml index 58d6be951199b9337dc981cb8099a015bf77c2c2..c9c6555de50bef7b964371cece301a4bd0ffe815 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_transfer.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_transfer.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (transfer) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_transfer.ml Subject: Quantities transfer between contracts. *) @@ -892,3 +893,6 @@ let tests = `Quick test_storage_fees_and_internal_operation; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("transfer", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_transfer_ticket.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_transfer_ticket.ml index 75bf737bce457180b4a10cfc02abf3517840213c..a88ee42fffcda236bd95818128c8cd7b2e85803b 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_transfer_ticket.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_transfer_ticket.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Transfer_ticket logic - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_transfer_ticket.ml Subject: Test ticket transfers *) @@ -331,11 +332,15 @@ let test_contract_as_ticket_transfer_destination () = let tests = [ Tztest.tztest - "Test ticket transfer operations" + "ticket transfer operations" `Quick test_mint_deposit_withdraw_implicit_transfer; Tztest.tztest - "Test 'contract (ticket cty)' as transfer destination" + "'contract (ticket cty)' as transfer destination" `Quick test_contract_as_ticket_transfer_destination; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("transfer ticket", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_tx_rollup.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_tx_rollup.ml index 710ebe7f2cd952d2f0cc743e8ddcdce06306c0c0..114f176e888222db7afbb6b79f0134c986ee492b 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_tx_rollup.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_tx_rollup.ml @@ -28,7 +28,8 @@ (** Testing ------- Component: Tx rollup layer 1 logic - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_tx_rollup.ml Subject: Test rollup *) @@ -5794,52 +5795,51 @@ module Withdraw = struct let tests = [ - Tztest.tztest "Test withdraw" `Quick test_valid_withdraw; + Tztest.tztest "withdraw" `Quick test_valid_withdraw; Tztest.tztest - "Test reveal withdrawals w/ missing commitment" + "reveal withdrawals w/ missing commitment" `Quick test_invalid_reveal_withdrawals_no_commitment; Tztest.tztest - "Test reveal withdrawals w/ missing withdraw in commitment" + "reveal withdrawals w/ missing withdraw in commitment" `Quick test_invalid_reveal_withdrawals_missing_withdraw_in_commitment; Tztest.tztest - "Test reveal withdrawals w/ incorrect tickets info" + "reveal withdrawals w/ incorrect tickets info" `Quick test_reveal_withdrawals_invalid_tickets_info; Tztest.tztest - "Test to reveal withdrawals twice" + "reveal withdrawals twice" `Quick test_reveal_withdrawals_twice; Tztest.tztest - "Test withdraw w/ an invalid message index" + "withdraw w/ an invalid message index" `Quick test_invalid_index_or_context; - Tztest.tztest "Test withdrawing too late" `Quick test_too_late_withdrawal; + Tztest.tztest "withdrawing too late" `Quick test_too_late_withdrawal; Tztest.tztest - "Test storage clean up" + "storage clean up" `Quick test_withdrawal_accounting_is_cleaned_up_after_removal; Tztest.tztest - "Test deposits overflowing to withdrawals" + "deposits overflowing to withdrawals" `Quick test_deposit_overflow_to_withdrawal; Tztest.tztest - "Test deposit to multiple destinations don't overflow" + "deposit to multiple destinations don't overflow" `Quick test_deposit_multiple_destinations_at_limit; Tztest.tztest - "Test multiple withdrawals from the same batch and from different \ - batches" + "multiple withdrawals from the same batch and from different batches" `Quick test_multiple_withdrawals_multiple_batches; Tztest.tztest - "Test deposit, followed by withdrawal, followed by deposit" + "deposit, followed by withdrawal, followed by deposit" `Quick test_forge_deposit_withdraw_deposit; Tztest.tztest - "Test deposit, followed by withdrawal, followed by transfer to an \ - implicit account" + "deposit, followed by withdrawal, followed by transfer to an implicit \ + account" `Quick test_forge_deposit_withdraw_implicit_transfer; ] @@ -5847,19 +5847,15 @@ end let tests = [ + Tztest.tztest "feature flag is disabled" `Quick test_disable_feature_flag; + Tztest.tztest "sunset" `Quick test_sunset; + Tztest.tztest "tx rollup origination and burn" `Quick test_origination; Tztest.tztest - "check feature flag is disabled" - `Quick - test_disable_feature_flag; - Tztest.tztest "check sunset" `Quick test_sunset; - Tztest.tztest "check tx rollup origination and burn" `Quick test_origination; - Tztest.tztest - "check two originated tx rollup in one operation have different address" + "two originated tx rollup in one operation have different address" `Quick test_two_originations; Tztest.tztest - "check the function that updates the burn per byte rate of a transaction \ - rollup" + "the function that updates the burn per byte rate of a transaction rollup" `Quick test_burn_per_byte_update; Tztest.tztest "add one batch to a rollup" `Quick test_add_batch; @@ -5880,80 +5876,78 @@ let tests = "Try to add several batches to reach the inbox count limit" `Quick test_inbox_count_too_big; - Tztest.tztest "Test deposit with valid contract" `Quick test_valid_deposit; + Tztest.tztest "deposit with valid contract" `Quick test_valid_deposit; Tztest.tztest - "Test deposit with invalid parameter" + "deposit with invalid parameter" `Quick test_invalid_deposit_not_ticket; Tztest.tztest - "Test deposit with too big ticket" + "deposit with too big ticket" `Quick test_invalid_deposit_too_big_ticket; Tztest.tztest - "Test deposit with too big ticket type" + "deposit with too big ticket type" `Quick test_invalid_deposit_too_big_ticket_type; Tztest.tztest - "Test valid deposit with big ticket" + "valid deposit with big ticket" `Quick test_valid_deposit_big_ticket; Tztest.tztest - "Test valid deposit to inexistant rollup" + "valid deposit to inexistant rollup" `Quick test_valid_deposit_inexistant_rollup; - Tztest.tztest "Test invalid entrypoint" `Quick test_invalid_entrypoint; + Tztest.tztest "invalid entrypoint" `Quick test_invalid_entrypoint; Tztest.tztest - "Test valid deposit to invalid L2 address" + "valid deposit to invalid L2 address" `Quick test_invalid_l2_address; Tztest.tztest - "Test valid deposit with non-zero amount" + "valid deposit with non-zero amount" `Quick test_valid_deposit_invalid_amount; Tztest.tztest - "Test depositing too many tickets" + "depositing too many tickets" `Quick test_deposit_too_many_tickets; - Tztest.tztest "Test finalization" `Quick test_finalization; + Tztest.tztest "finalization" `Quick test_finalization; Tztest.tztest "Smoke test commitment" `Quick test_commitment_duplication; Tztest.tztest - "Test commitment predecessor edge cases" + "commitment predecessor edge cases" `Quick test_commitment_predecessor; - Tztest.tztest "Test full inbox" `Quick test_full_inbox; + Tztest.tztest "full inbox" `Quick test_full_inbox; Tztest.tztest - "Test too many finalized commitments" + "too many finalized commitments" `Quick test_too_many_commitments; - Tztest.tztest - "Test finalization edge cases" - `Quick - test_finalization_edge_cases; - Tztest.tztest "Test bond finalization" `Quick test_bond_finalization; - Tztest.tztest "Test state" `Quick test_state; + Tztest.tztest "finalization edge cases" `Quick test_finalization_edge_cases; + Tztest.tztest "bond finalization" `Quick test_bond_finalization; + Tztest.tztest "state" `Quick test_state; Tztest.tztest "Try to commit to the current inbox and fail" `Quick test_commit_current_inbox; + Tztest.tztest "state with deleted commitment" `Quick test_state_with_deleted; Tztest.tztest - "Test state with deleted commitment" - `Quick - test_state_with_deleted; - Tztest.tztest - "Test upfront message preallocation" + "upfront message preallocation" `Quick test_state_message_storage_preallocation; Tztest.tztest - "Test storage burn for submitting batch" + "storage burn for submitting batch" `Quick test_storage_burn_for_adding_batch; Tztest.tztest - "Test additional space allocation for deposit" + "additional space allocation for deposit" `Quick test_additional_space_allocation_for_valid_deposit; Tztest.tztest - "Test additional space allocation for commitment" + "additional space allocation for commitment" `Quick test_storage_burn_for_commitment; ] @ Withdraw.tests @ Rejection.tests @ parsing_tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("tx rollup", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_voting.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_voting.ml index 544ce97f3ec1a6d9500d97cfa07e2170ad079e18..8897d3985825b10be94d1cb2c6146d2a0ca41520 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_voting.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_voting.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol (voting) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_voting.ml Subject: On the voting process. *) @@ -2100,3 +2101,6 @@ let tests = test_conflicting_ballot; Tztest.tztest "Valid Ballot operations" `Quick test_valid_ballot; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("voting", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_zk_rollup.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_zk_rollup.ml index afdecb6526469d3102ef6584120f088dfacddf05..640449faea0c381168b1dd1ab68d9a4005e195a9 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_zk_rollup.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/test_zk_rollup.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Rollup layer 1 logic - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/operations/main.exe \ + -- --file test_zk_rollup.ml Subject: Test zk rollup *) @@ -1259,3 +1260,7 @@ let tests = `Quick test_valid_deposit_and_external_withdrawal; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("zk rollup", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_constants.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_constants.ml index 907efa6ed56b64ecb4f163596f84636e55909a3f..2416594a63a2e023b0a0ebf2afc906a1ac3fba28 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_constants.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_constants.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol (baking) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe \ + -- --file test_constants.ml Subject: the consistency of parametric constants *) @@ -213,3 +214,7 @@ let tests = `Quick liquidity_baking_subsidy_param; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("constants", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_frozen_bonds.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_frozen_bonds.ml index 08ed2f8b6f32b813af82468ebabb8044a08752f5..3262512af586f16947b5d91ede6f665c91303dd3 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_frozen_bonds.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_frozen_bonds.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (token) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe \ + -- --file test_frozen_bonds.ml Subject: Frozen bonds applicable to contracts and part of their stake. *) @@ -671,27 +672,31 @@ let tests = tztest "frozen bonds - delegated balance" `Quick test_delegated_balance; tztest "frozen bonds - test rpcs" `Quick test_rpcs; tztest - "test: delegate, freeze, unfreeze, undelegate" + "delegate, freeze, unfreeze, undelegate" `Quick test_delegate_freeze_unfreeze_undelegate; tztest - "test: delegate, freeze, undelegate, unfreeze" + "delegate, freeze, undelegate, unfreeze" `Quick test_delegate_freeze_undelegate_unfreeze; tztest - "test: delegate, double freeze, undelegate, unfreeze" + "delegate, double freeze, undelegate, unfreeze" `Quick test_delegate_double_freeze_undelegate_unfreeze; tztest - "test: delegate, freeze, redelegate, unfreeze" + "delegate, freeze, redelegate, unfreeze" `Quick test_delegate_freeze_redelegate_unfreeze; tztest - "test: delegate, freeze, unfreeze, freeze, redelegate" + "delegate, freeze, unfreeze, freeze, redelegate" `Quick test_delegate_freeze_unfreeze_freeze_redelegate; tztest - "test: delegate, freeze, slash, undelegate" + "delegate, freeze, slash, undelegate" `Quick test_delegate_freeze_slash_undelegate; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("frozen bonds", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_liquidity_baking.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_liquidity_baking.ml index 19cdffd74406ec38940fcf4769e2fbb9a82a024a..7c887470dd22114d0734fccf0a1221e8d8497d08 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_liquidity_baking.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_liquidity_baking.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: liquidity baking - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe \ + -- --file test_liquidity_baking.ml Subject: Test liquidity baking subsidies, CPMM storage updates, and toggle vote. *) @@ -428,116 +429,120 @@ let liquidity_baking_origination_no_tzBTC_mainnet_migration () = let tests = [ Tztest.tztest - "test liquidity baking script hashes" + "liquidity baking script hashes" `Quick liquidity_baking_origination; Tztest.tztest - "test liquidity baking cpmm is originated at the expected address" + "liquidity baking cpmm is originated at the expected address" `Quick liquidity_baking_cpmm_address; Tztest.tztest "Init Context" `Quick generate_init_state; Tztest.tztest - "test liquidity baking subsidy is correct" + "liquidity baking subsidy is correct" `Quick (liquidity_baking_subsidies 64); Tztest.tztest - "test liquidity baking toggle vote with 100% of bakers voting LB_off \ - baking one block longer" + "liquidity baking toggle vote with 100% of bakers voting LB_off baking \ + one block longer" `Quick (liquidity_baking_toggle_100 1); Tztest.tztest - "test liquidity baking toggle vote with 100% of bakers voting LB_off \ - baking two blocks longer" + "liquidity baking toggle vote with 100% of bakers voting LB_off baking \ + two blocks longer" `Quick (liquidity_baking_toggle_100 2); Tztest.tztest - "test liquidity baking toggle vote with 100% of bakers voting LB_off \ - baking 100 blocks longer" + "liquidity baking toggle vote with 100% of bakers voting LB_off baking \ + 100 blocks longer" `Quick (liquidity_baking_toggle_100 100); Tztest.tztest - "test liquidity baking toggle vote with 80% of bakers voting LB_off \ - baking one block longer" + "liquidity baking toggle vote with 80% of bakers voting LB_off baking \ + one block longer" `Quick (liquidity_baking_toggle_80 1); Tztest.tztest - "test liquidity baking toggle vote with 80% of bakers voting LB_off \ - baking two blocks longer" + "liquidity baking toggle vote with 80% of bakers voting LB_off baking \ + two blocks longer" `Quick (liquidity_baking_toggle_80 2); Tztest.tztest - "test liquidity baking toggle vote with 80% of bakers voting LB_off \ - baking 100 blocks longer" + "liquidity baking toggle vote with 80% of bakers voting LB_off baking \ + 100 blocks longer" `Quick (liquidity_baking_toggle_80 100); Tztest.tztest - "test liquidity baking toggle vote with 60% of bakers voting LB_off \ - baking one block longer" + "liquidity baking toggle vote with 60% of bakers voting LB_off baking \ + one block longer" `Quick (liquidity_baking_toggle_60 1); Tztest.tztest - "test liquidity baking toggle vote with 60% of bakers voting LB_off \ - baking two blocks longer" + "liquidity baking toggle vote with 60% of bakers voting LB_off baking \ + two blocks longer" `Quick (liquidity_baking_toggle_60 2); Tztest.tztest - "test liquidity baking toggle vote with 60% of bakers voting LB_off \ - baking 100 blocks longer" + "liquidity baking toggle vote with 60% of bakers voting LB_off baking \ + 100 blocks longer" `Quick (liquidity_baking_toggle_60 100); Tztest.tztest - "test liquidity baking does not shut off with toggle vote at 50% and \ - baking 100 blocks longer than sunset level in previous protocols" + "liquidity baking does not shut off with toggle vote at 50% and baking \ + 100 blocks longer than sunset level in previous protocols" `Quick liquidity_baking_toggle_50; Tztest.tztest - "test a liquidity baking restart with 100% of bakers voting off, then \ - pass, then on" + "liquidity baking restart with 100% of bakers voting off, then pass, \ + then on" `Quick (liquidity_baking_restart 2000 1); Tztest.tztest - "test liquidity baking toggle ema in block metadata is zero with no \ - bakers voting LB_off." + "liquidity baking toggle ema in block metadata is zero with no bakers \ + voting LB_off." `Quick liquidity_baking_toggle_ema_zero; Tztest.tztest - "test liquidity baking toggle ema is equal to the threshold after the \ - subsidy has been stopped by a toggle vote" + "liquidity baking toggle ema is equal to the threshold after the subsidy \ + has been stopped by a toggle vote" `Quick liquidity_baking_toggle_ema_threshold; Tztest.tztest - "test liquidity baking storage is updated" + "liquidity baking storage is updated" `Quick (liquidity_baking_storage 64); Tztest.tztest - "test liquidity baking balance updates" + "liquidity baking balance updates" `Quick liquidity_baking_balance_update; Tztest.tztest - "test liquidity baking CPMM address in storage matches address in the \ + "liquidity baking CPMM address in storage matches address in the \ origination result" `Quick liquidity_baking_origination_result_cpmm_address; Tztest.tztest - "test liquidity baking CPMM balance in origination result is 100 mutez" + "liquidity baking CPMM balance in origination result is 100 mutez" `Quick liquidity_baking_origination_result_cpmm_balance; Tztest.tztest - "test liquidity baking LQT contract is originated at expected address" + "liquidity baking LQT contract is originated at expected address" `Quick liquidity_baking_origination_result_lqt_address; Tztest.tztest - "test liquidity baking LQT balance in origination result is 0 mutez" + "liquidity baking LQT balance in origination result is 0 mutez" `Quick liquidity_baking_origination_result_lqt_balance; Tztest.tztest - "test liquidity baking originates three contracts when tzBTC does not \ - exist and level indicates we are not on mainnet" + "liquidity baking originates three contracts when tzBTC does not exist \ + and level indicates we are not on mainnet" `Quick liquidity_baking_origination_test_migration; Tztest.tztest - "test liquidity baking originates three contracts when tzBTC does not \ - exist and level indicates we might be on mainnet" + "liquidity baking originates three contracts when tzBTC does not exist \ + and level indicates we might be on mainnet" `Quick liquidity_baking_origination_no_tzBTC_mainnet_migration; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("liquidity baking", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_main.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_main.ml deleted file mode 100644 index 534f0e4dba9544097271f05f98b39e929c2fa4ad..0000000000000000000000000000000000000000 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_main.ml +++ /dev/null @@ -1,45 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration" - [ - (Protocol.name ^ ": constants", Test_constants.tests); - (Protocol.name ^ ": liquidity baking", Test_liquidity_baking.tests); - (Protocol.name ^ ": storage description", Test_storage.tests); - (Protocol.name ^ ": storage tests", Test_storage_functions.tests); - (Protocol.name ^ ": token movements", Test_token.tests); - (Protocol.name ^ ": frozen bonds", Test_frozen_bonds.tests); - ] - |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_storage.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_storage.ml index ad1873f559dabad78e77c69333dd8782191783af..5ba607a46c132a7ffb2dfb78046ed54f37b70461 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_storage.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_storage.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Context Storage - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe \ + -- --file test_storage.ml Subject: Test the correctnesss of debug message from storage_functor *) @@ -235,3 +236,7 @@ let tests = `Quick (fun _ -> test_register_indexed_subcontext_2); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("storage description", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_storage_functions.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_storage_functions.ml index 899c7b540e5c00caaef1ee7716129750c3810503..9a0778c6a6ad671c9f57545d70b2aa23681624dc 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_storage_functions.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_storage_functions.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Context Storage - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe \ + -- --file test_storage_functions.ml Subject: Test storage functions. *) @@ -175,3 +176,7 @@ let tests = test_fold_keys_unaccounted; Tztest.tztest "length test" `Quick test_length; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("storage tests", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_token.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_token.ml index c2c1ea7d119e462c27c30dab097150847f8c7fc4..0baf9ed407fdf808ff50ab25837e4f93bc2ce583 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_token.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_token.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (token) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/main.exe \ + -- --file test_token.ml Subject: Token movements in the protocol. *) @@ -752,3 +753,7 @@ let tests = `Quick test_transfer_n_with_non_empty_source; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("token movements", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/dune b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/dune index 8c3f813826876ca5c086892f62f87f058d17c6d6..c4da91d164aad4ab5365882379460f69b34d881a 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/dune @@ -30,7 +30,6 @@ -open Tezos_base_test_helpers -open Tezos_protocol_plugin_016_PtMumbai) (modules - test_main generator_descriptors generators manager_operation_helpers diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_1m_restriction.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_1m_restriction.ml index 42817533c8b26da450fe7e8dd4d75ccf6408d7a9..83fa785f50cd706ede9e9b1882b3f4030dd7f56c 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_1m_restriction.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_1m_restriction.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe \ + -- --file test_1m_restriction.ml Subject: 1M restriction in validation of manager operation. *) @@ -225,3 +226,7 @@ let tests : (string * [`Quick | `Slow] * (unit -> unit Lwt.t)) trace = batch_is_not_singles_tests; conflict_free_tests; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("one-manager restriction", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_covalidity.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_covalidity.ml index 5a67b17588a7e76a48a356ebf82aee95290fbfa7..0ae6fda9032f1623b0d2adeaf2c30475a4f7dabc 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_covalidity.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_covalidity.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe \ + -- --file test_covalidity.ml Subject: Validation of operation. *) open Validate_helpers @@ -153,3 +154,7 @@ let tests = [] voting_periods |> Qcheck2_helpers.qcheck_wrap_lwt + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("covalidity", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_main.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_main.ml deleted file mode 100644 index f4b9908fd88611c62b190cff31bdac0026099230..0000000000000000000000000000000000000000 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_main.ml +++ /dev/null @@ -1,47 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2022 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe - Subject: Integration > Validate -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > validate" - [ - (Protocol.name ^ ": sanity checks", Test_sanity.tests); - (Protocol.name ^ ": mempool", Test_mempool.tests); - ( Protocol.name ^ ": single manager validation", - Test_manager_operation_validation.tests ); - ( Protocol.name ^ ": batched managers validation", - Test_validation_batch.tests ); - (Protocol.name ^ ": one-manager restriction", Test_1m_restriction.tests); - (Protocol.name ^ ": covalidity", Test_covalidity.tests); - ] - |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_manager_operation_validation.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_manager_operation_validation.ml index cc1e81a8fcfaff5235cdafd6c3322a11665e2851..1278c0c9df07c334f558ddaf04057f4020703b4a 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_manager_operation_validation.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_manager_operation_validation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe \ + -- --file test_manager_operation_validation.ml Subject: Validation of manager operation. *) @@ -615,8 +616,15 @@ let tests = mk_gas ); ("empty undelegated source", test_empty_undelegate, all, mk_default); ("minimal gas for manager", test_low_gas_limit, gas_consum, mk_default); - ("check dal disabled", test_feature_flags, all, mk_flags disabled_dal); - ("check toru disabled", test_feature_flags, all, mk_flags disabled_toru); - ("check scoru disabled", test_feature_flags, all, mk_flags disabled_scoru); - ("check zkru disabled", test_feature_flags, all, mk_flags disabled_zkru); + ("dal disabled", test_feature_flags, all, mk_flags disabled_dal); + ("toru disabled", test_feature_flags, all, mk_flags disabled_toru); + ("scoru disabled", test_feature_flags, all, mk_flags disabled_scoru); + ("zkru disabled", test_feature_flags, all, mk_flags disabled_zkru); ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("single manager validation", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_mempool.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_mempool.ml index bcfc020ddbb71a56c2146eef3b0ea1b5ee98a52d..a7c0b2d57ac6dd3f6764e3f774ecaf3ad79ccdc7 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_mempool.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_mempool.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe \ + -- --file test_mempool.ml Subject: Integration > Validate > Mempool mode *) @@ -383,3 +384,6 @@ let tests = test_add_and_replace; Tztest.tztest "remove operations" `Quick test_remove_operation; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("mempool", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_sanity.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_sanity.ml index 1177a259385856a53ead4be36bbc3935fcbad7c3..8a254e097e3caab6cecaef7ed7aaf8946fd2eb97 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_sanity.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_sanity.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe \ + -- --file test_sanity.ml Subject: Validation of operation. *) @@ -172,3 +173,7 @@ let tests = ("manager operation coverage", ensure_manager_operation_coverage); ("covalidation coverage", covalidation_sanity); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sanity checks", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_validation_batch.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_validation_batch.ml index 6d6a10ecb481238361a2e5d0fd312294caa7a47f..74fb437400820c2f95c0388035848a6c59201a14 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_validation_batch.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/test_validation_batch.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/integration/validate/main.exe \ + -- --file test_validation_batch.ml Subject: Validation of batched manager operation. *) @@ -620,3 +621,10 @@ let tests = revealed, mk_high_gas_limit ); ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("batched managers validation", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/liquidity_baking_pbt.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/liquidity_baking_pbt.ml index 6eb71eb3d7bf1cc36b948d712146939423f29f5f..46d32c6894e4ee84804df2ead709ef453967cc7f 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/liquidity_baking_pbt.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/liquidity_baking_pbt.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: pbt for liquidity baking - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file liquidity_baking_pbt.ml Subject: Test liquidity baking contracts using randomly generated inputs. *) @@ -319,9 +320,8 @@ let () = let open Qcheck2_helpers in Alcotest.run ~__FILE__ - "protocol > pbt > liquidity baking" + Protocol.name [ - ( Protocol.name ^ ": Machines Cross-Validation", - qcheck_wrap machine_validation_tests ); - (Protocol.name ^ ": Economic Properties", qcheck_wrap economic_tests); + ("Machines Cross-Validation", qcheck_wrap machine_validation_tests); + ("Economic Properties", qcheck_wrap economic_tests); ] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/saturation_fuzzing.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/saturation_fuzzing.ml index d18d88741a79447a3d77a5624d0f290ff8b1b690..bd68e73fae58396f18aaacf82f1889daa065f1e3 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/saturation_fuzzing.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/saturation_fuzzing.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file saturation_fuzzing.ml Subject: Operations in Saturation_repr *) @@ -190,12 +191,12 @@ let tests_sqrt = [test_sqrt_squared; test_squared_sqrt] let () = Alcotest.run ~__FILE__ - "protocol > pbt > saturation" + Protocol.name [ - (Protocol.name ^ ": add", qcheck_wrap tests_add); - (Protocol.name ^ ": mul", qcheck_wrap tests_mul); - (Protocol.name ^ ": sub", qcheck_wrap tests_sub); - (Protocol.name ^ ": add and sub", qcheck_wrap tests_add_sub); - (Protocol.name ^ ": sqrt", qcheck_wrap tests_sqrt); - (Protocol.name ^ ": <= and >=", qcheck_wrap tests_boundaries); + ("add", qcheck_wrap tests_add); + ("mul", qcheck_wrap tests_mul); + ("sub", qcheck_wrap tests_sub); + ("add and sub", qcheck_wrap tests_add_sub); + ("sqrt", qcheck_wrap tests_sqrt); + ("<= and >=", qcheck_wrap tests_boundaries); ] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_bitset.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_bitset.ml index 2adf84a1978a365cdc19fb983b109c06f60794b7..e63fd96ed110bdeb1a6358dee73d05acb64847bf 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_bitset.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_bitset.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_bitset.ml Subject: Bitset structure *) @@ -97,9 +98,9 @@ let test_fill = let () = Alcotest.run ~__FILE__ - "bits" + Protocol.name [ - ( Protocol.name ^ ": quantity", + ( "quantity", qcheck_wrap [ QCheck2.Test.make diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_bytes_conversion.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_bytes_conversion.ml index ac0001cba7310493715cc7ea06b6fc03b1de9dad..2c3479b6987946de9878eb27b63106990a609500 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_bytes_conversion.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_bytes_conversion.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: pbt for bytes <=> nat/int conversions - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_bytes_conversion.ml Subject: Test the conversions between bytes and int/nat *) @@ -210,6 +211,5 @@ let tests = let () = Alcotest.run ~__FILE__ - ("protocol > script_bytes > " ^ Protocol.name - ^ ": bytes and int/nat conversion ") + (Protocol.name ^ ": bytes and int/nat conversion ") tests diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_carbonated_map.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_carbonated_map.ml index ce22c3c4200823ecf345b908d6d8a74fc4f91f84..078c8258ba51a89be6ecc1bb7e6591dd96bd1554 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_carbonated_map.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_carbonated_map.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_carbonated_map.ml Subject: Operations in Carbonated_map *) @@ -548,7 +549,4 @@ let tests ~rand = qcheck_wrap ~rand qcheck_tests @ unit_tests let () = (* Ensure deterministic results. *) let rand = Random.State.make [|0x1337533D; 71287309; 397060904|] in - Alcotest.run - ~__FILE__ - "protocol > pbt > carbonated map" - [(Protocol.name ^ ": Carbonated map", tests ~rand)] + Alcotest.run ~__FILE__ Protocol.name [("Carbonated map", tests ~rand)] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_compare_operations.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_compare_operations.ml index 1512fa32bc6d063da0f7094e753abe361c0dd1ac..8014f6b6028ba7d81d2075f8723aab6633c3ecae 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_compare_operations.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_compare_operations.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Operation compare) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_compare_operations.ml Subject: Valid operations Comparison *) @@ -97,7 +98,5 @@ let tests = [test_compare_is_strorder] let () = Alcotest.run ~__FILE__ - "Compare operations" - [ - (Protocol.name ^ ": Compare_operations", Qcheck2_helpers.qcheck_wrap tests); - ] + Protocol.name + [("Compare_operations", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_dal_slot_proof.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_dal_slot_proof.ml index 5e1a35744d5a6e02b2b59984ee1354381f0cc92d..3e5bfcec0228284268b90920a04d47a259f1362f 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_dal_slot_proof.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_dal_slot_proof.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: PBT for refutation proofs of Dal - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_dal_slot_proof.ml Subject: Refutation proof-related functions of Dal *) diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_gas_properties.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_gas_properties.ml index 9ec8f40e2d8f921999879519e763087cae12f566..328719471854d3532c92b636ab12aa4294ea76de 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_gas_properties.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_gas_properties.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (gas properties) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_gas_properties.ml Subject: Arithmetic properties around gas. *) @@ -140,7 +141,4 @@ let tests = ] let () = - Alcotest.run - ~__FILE__ - "protocol > pbt > gas" - [(Protocol.name ^ ": gas properties", qcheck_wrap tests)] + Alcotest.run ~__FILE__ Protocol.name [("gas properties", qcheck_wrap tests)] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_merkle_list.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_merkle_list.ml index 6c47f0582bb0be0218aff0bbd890e76d6fd5e3a8..4fd8d5b25d7676b88c0594ebc8ac4451ff047f5e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_merkle_list.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_merkle_list.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_merkle_list.ml Subject: Tx rollup l2 encoding *) @@ -111,15 +112,15 @@ let () = let qcheck_wrap = qcheck_wrap ~rand:(Random.State.make_self_init ()) in Alcotest.run ~__FILE__ - "Merkle list" + Protocol.name [ - ( Protocol.name ^ ": scons_equiv", + ( "scons_equiv", qcheck_wrap [ test_scons_scons_tr_equiv ~count:1000; test_scons_compute_equiv ~count:1000; ] ); - ( Protocol.name ^ ": check_path", + ( "check_path", qcheck_wrap [test_check_path ~count:1000; test_check_path_wrong ~count:1000] ); ] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_operation_encoding.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_operation_encoding.ml index 3e86031acca17e4cf5f63e8de1638b7876362f7a..8f348c9102c35b62914dde171aeb95f6fabce6e1 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_operation_encoding.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_operation_encoding.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_operation_encoding.ml Subject: Encoding for operations *) @@ -62,5 +63,5 @@ let () = let qcheck_wrap = qcheck_wrap ~rand:(Random.State.make_self_init ()) in Alcotest.run ~__FILE__ - "Operation_encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap [test_operation])] + (Protocol.name ^ ": Operation_encoding") + [(": roundtrip", qcheck_wrap [test_operation])] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_refutation_game.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_refutation_game.ml index 5883c3aab5d20c7c8b49de22440f980846d309ca..469bc235e488794216d1b72ea1e5fdf3a4472805 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_refutation_game.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_refutation_game.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: PBT for the SCORU refutation game - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_refutation_game.ml Subject: SCORU refutation game *) open Protocol diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sampler.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sampler.ml index cd2b634592f8851b22a7509b250a5e10014b88c5..90f327aab137d595d890f379c4d658bc7344cb00 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sampler.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sampler.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_sampler.ml Subject: Operations in Saturation_repr *) @@ -266,8 +267,5 @@ let alias_z_test = let () = Alcotest.run ~__FILE__ - "protocol > pbt > sampling" - [ - ( Protocol.name ^ ": sampling", - qcheck_wrap [alias_float_test; alias_z_test] ); - ] + Protocol.name + [("sampling", qcheck_wrap [alias_float_test; alias_z_test])] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sc_rollup_encoding.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sc_rollup_encoding.ml index 998d8ab4d6cc11096147f2b0560a1e51cee3947a..dc8c55fdedd94ee1e2c0de03392110d25127d466 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sc_rollup_encoding.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sc_rollup_encoding.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_sc_rollup_encoding.ml Subject: SC rollup encoding *) @@ -290,5 +291,5 @@ let tests = let () = Alcotest.run ~__FILE__ - "SC rollup encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap tests)] + (Protocol.name ^ ": SC rollup encoding") + [(": roundtrip", qcheck_wrap tests)] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml index 9f556f9056849cd0419c35bf58790c3dc8a2d528..af44a23d49abac1d74b752da33485b7afe270cad 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_sc_rollup_tick_repr.ml Subject: Operations in Tick_repr *) @@ -105,5 +106,5 @@ let tests = let () = Alcotest.run ~__FILE__ - "Tick_repr" - [(Protocol.name ^ ": Tick_repr", Qcheck2_helpers.qcheck_wrap tests)] + Protocol.name + [("Tick_repr", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_script_comparison.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_script_comparison.ml index 64f5e85501955648e6697543934ef8c788337651..19a852dc8bd3635909b484469f07a7ef89f0126e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_script_comparison.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_script_comparison.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Script_comparison - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_script_comparison.ml Subject: PBT of the Script_comparable.compare_comparable function. *) @@ -344,14 +345,12 @@ let test_pack_unpack = let () = Alcotest.run ~__FILE__ - "protocol > pbt > script_comparison" + Protocol.name [ - ( Protocol.name ^ ": compatible_with_reference", - qcheck_wrap [test_compatible_with_reference] ); - ( Protocol.name ^ ": compatible_with_packing", - qcheck_wrap [test_compatible_with_packing] ); - (Protocol.name ^ ": reflexivity", qcheck_wrap [test_reflexivity]); - (Protocol.name ^ ": symmetry", qcheck_wrap [test_symmetry]); - (Protocol.name ^ ": transitivity", qcheck_wrap [test_transitivity]); - (Protocol.name ^ ": pack_unpack", qcheck_wrap [test_pack_unpack]); + ("compatible_with_reference", qcheck_wrap [test_compatible_with_reference]); + ("compatible_with_packing", qcheck_wrap [test_compatible_with_packing]); + ("reflexivity", qcheck_wrap [test_reflexivity]); + ("symmetry", qcheck_wrap [test_symmetry]); + ("transitivity", qcheck_wrap [test_transitivity]); + ("pack_unpack", qcheck_wrap [test_pack_unpack]); ] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_tez_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_tez_repr.ml index b08c2775fee38917162705128a5fc80564808e17..2c4f25cd2a0bf94c251d7b7c5c2cece3c62e02e0 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_tez_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_tez_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_tez_repr.ml Subject: Operations in Tez_repr *) @@ -132,5 +133,5 @@ let tests = let () = Alcotest.run ~__FILE__ - "protocol > pbt > tez_repr" - [(Protocol.name ^ ": Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] + Protocol.name + [("Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_tx_rollup_l2_encoding.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_tx_rollup_l2_encoding.ml index 9c78e11d4f9c338fee8fa752051d0a7b60283ef0..2abdd72e92723f2221668338ab94fc08d27307f8 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_tx_rollup_l2_encoding.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_tx_rollup_l2_encoding.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_tx_rollup_l2_encoding.ml Subject: Tx rollup l2 encoding *) @@ -278,10 +279,10 @@ let () = let qcheck_wrap = qcheck_wrap ~rand:(Random.State.make_self_init ()) in Alcotest.run ~__FILE__ - "Compact_encoding" + (Protocol.name ^ ": Compact_encoding") [ - (Protocol.name ^ ": quantity", qcheck_wrap [test_quantity ~count:100_000]); - ( Protocol.name ^ ": roundtrip", + (": quantity", qcheck_wrap [test_quantity ~count:100_000]); + ( ": roundtrip", qcheck_wrap [ test_roundtrip diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_zk_rollup_encoding.ml b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_zk_rollup_encoding.ml index fa638fffe4b71548526c4ff03b0db30302721221..dc439eafe3857b46f744a1e9508dc2e7852eb67a 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_zk_rollup_encoding.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/test_zk_rollup_encoding.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/pbt/main.exe \ + -- --file test_zk_rollup_encoding.ml Subject: Zk rollup encodings *) @@ -222,8 +223,8 @@ let tests_to_scalar = [test_address_to_scalar; test_operation_to_scalar] let () = Alcotest.run ~__FILE__ - "ZK rollup encoding" + (Protocol.name ^ ": ZK rollup encoding") [ - (Protocol.name ^ ": roundtrip", qcheck_wrap tests_roundtrip); - (Protocol.name ^ ": to_scalar", qcheck_wrap tests_to_scalar); + (": roundtrip", qcheck_wrap tests_roundtrip); + (": to_scalar", qcheck_wrap tests_to_scalar); ] diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/dune b/src/proto_016_PtMumbai/lib_protocol/test/unit/dune index 138dd6abfa7935c2464a0a91c81b88b832045834..ff995683c840a3dab614703b5fbc318b3088c8c1 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/dune @@ -43,7 +43,6 @@ -open Tezos_crypto_dal -open Tezos_webassembly_interpreter_extra) (modules - test_main test_bond_id_repr test_consensus_key test_contract_repr diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_alpha_context.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_alpha_context.ml index 7a3c059c5ff5a9c853717ad1cfc3b657161f4570..f144c644196947d2b4315a34d954c961e22d3af2 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_alpha_context.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_alpha_context.ml @@ -29,7 +29,8 @@ open Alpha_context (** Testing ------- Component: Alpha_context - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_alpha_context.ml Dependencies: helpers/block.ml Subject: To test the modules (including the top-level) in alpha_context.ml as individual units, particularly @@ -284,3 +285,7 @@ let tests = `Quick Test_Big_map.test_list_key_values_parameters; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("alpha context", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_bond_id_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_bond_id_repr.ml index 8edf228bfd031e1a8a68729706cf70117af71b29..a29deb8fdc73ccc9d9255b847de7e2e97b109941 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_bond_id_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_bond_id_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Bond_id_repr - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_bond_id_repr.ml Dependencies: -- Subject: Test bond id representations for RPC definitions. *) @@ -144,3 +145,7 @@ let tests = test_destruct_invalid_bond_id_repr; Tztest.tztest "Deserialize/serialize roundtrip" `Quick test_roundtrip; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("bond_id_repr", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_consensus_key.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_consensus_key.ml index f4ba78ac243bcb7738a4694d3c9554e0f72fb055..7b348607a9cc28f5a38451739c6d193b05276588 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_consensus_key.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_consensus_key.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (delegate_consensus_key) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_consensus_key.ml Subject: Functions from the module `Delegate_consensus_key` *) @@ -237,3 +238,7 @@ let test_consensus_key_storage () = let tests = [Tztest.tztest "consensus_key_storage" `Quick test_consensus_key_storage] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Delegate consensus key", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_contract_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_contract_repr.ml index 54f24386c51d6a4d52992409eef24b2828c20b55..87a85511b79b717fde50f44e2364ff53a5118a8b 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_contract_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_contract_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Contract_repr - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_contract_repr.ml Dependencies: contract_hash.ml Subject: To test the modules (including the top-level) in contract_repr.ml as individual units, particularly @@ -118,3 +119,7 @@ let tests = `Quick Test_contract_repr.test_to_b58check_originated; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Contract_repr", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_dal_slot_proof.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_dal_slot_proof.ml index dcb8f9a94dc23509017b9258c803d71a062c9379..12cd3ea2f5af94493fdc34ce5a86d965b478500f 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_dal_slot_proof.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_dal_slot_proof.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (dal slot proof) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_dal_slot_proof.ml Subject: These unit tests check proof-related functions of Dal slots. *) @@ -438,3 +439,7 @@ let tests = let dal_parameters = constants_test.dal end) in Test.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("dal slot proof", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_destination_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_destination_repr.ml index 201e9f42fb3da9f392ef9f38accb459fa3ebd8aa..b562b5298bea80ad0279129bb7e50cf99e62b5c3 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_destination_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_destination_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Destination_repr - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_destination_repr.ml Subject: To test the encoding of [Destination_repr] and assert it is compatible with [Contract_repr.encoding]. *) @@ -222,3 +223,7 @@ let tests = @@ test_encoding_json_compat; tztest "Comparison of destinations" `Quick test_compare_destination; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Destination_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_fitness.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_fitness.ml index 741d592398942dc9953726bceb20c4ecc5302e3e..eb483e02e2a1d8037e5495f54ee5fb692087b484 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_fitness.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_fitness.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (committee selection) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_fitness.ml Subject: test the fitness module *) @@ -155,3 +156,6 @@ let tests = `Quick test_compare_all; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("fitness", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_fixed_point.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_fixed_point.ml index 7821335eb10b3bdcfb133a752c82433089c8596c..d9e47363088f4fdc0f2708552bf9c8d2eec2f288 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_fixed_point.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_fixed_point.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (fixed-point decimals) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_fixed_point.ml Subject: On fixed-point decimal numbers. *) @@ -172,3 +173,7 @@ let tests = Tztest.tztest "FP tests (3 decimals)" `Quick fp_nonzero; Tztest.tztest "FP pp tests (3 decimals)" `Quick fp_pp; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("fixed point computation", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_gas_monad.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_gas_monad.ml index bd364efbf41c402575c2281de4f38604d7ddf57e..85debca835ce2aaa2444cd76ee0ae4e263db6aee 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_gas_monad.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_gas_monad.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Gas_monad - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_gas_monad.ml Subject: Tests for the gas monad module *) @@ -195,20 +196,24 @@ let test_syntax_module () = let tests = [ - Tztest.tztest "Test exhaustion" `Quick test_gas_exhaustion; + Tztest.tztest "exhaustion" `Quick test_gas_exhaustion; Tztest.tztest - "Test exhaustion before error" + "exhaustion before error" `Quick test_gas_exhaustion_before_error; Tztest.tztest - "Test successful result with remaining gas" + "successful result with remaining gas" `Quick test_successful_with_remaining_gas; Tztest.tztest - "Test successful result with spare gas" + "successful result with spare gas" `Quick test_successful_with_spare_gas; - Tztest.tztest "Test inner error" `Quick test_inner_error; - Tztest.tztest "Test unlimited" `Quick test_unlimited; - Tztest.tztest "Test syntax module" `Quick test_syntax_module; + Tztest.tztest "inner error" `Quick test_inner_error; + Tztest.tztest "unlimited" `Quick test_unlimited; + Tztest.tztest "syntax module" `Quick test_syntax_module; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("gas monad", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_global_constants_storage.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_global_constants_storage.ml index 5cc39768875f3ee7e1822e2f0951420fc368b852..b757e712952e9e6f67cc3baa9d02044533bf088b 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_global_constants_storage.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_global_constants_storage.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Global table of constants - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_global_constants_storage.ml Dependencies: contract_hash.ml Subject: Test the global table of constants *) @@ -410,3 +411,7 @@ let tests = test_expand_is_idempotent; test_fold_does_not_stack_overflow; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Global_constants_storage", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_level_module.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_level_module.ml index c44e81fe8779ba1eaea87a0c6c43320b52d7d3a6..1e7137347d4245831b5bc0efc59aa3cfb91e17ba 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_level_module.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_level_module.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (baking) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_level_module.ml Subject: some functions in the Level module *) @@ -276,3 +277,7 @@ let tests = Tztest.tztest "level_from_raw" `Quick test_level_from_raw; Tztest.tztest "first_level_in_cycle" `Quick test_first_level_in_cycle; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("level module", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_liquidity_baking_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_liquidity_baking_repr.ml index ade13826dacd2e60bbe5ec1f482499087873d49b..70ab4d32682bf46db5dc9836eb524f3d01e45cdb 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_liquidity_baking_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_liquidity_baking_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Liquidity_baking_repr module - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_liquidity_baking_repr.ml Subject: Tests for the Liquidity_baking_repr module *) @@ -216,44 +217,39 @@ let test_ema_symmetry () = let tests = [ + Tztest.tztest "EMA does not change when vote is Pass" `Quick test_ema_pass; Tztest.tztest - "Test EMA does not change when vote is Pass" - `Quick - test_ema_pass; - Tztest.tztest - "Test EMA remains in bounds when vote is Off" + "EMA remains in bounds when vote is Off" `Quick test_ema_in_bound_off; + Tztest.tztest "EMA increases when vote is Off" `Quick test_ema_increases_off; Tztest.tztest - "Test EMA increases when vote is Off" - `Quick - test_ema_increases_off; - Tztest.tztest - "Test EMA does not increase too much when vote is Off" + "EMA does not increase too much when vote is Off" `Quick test_ema_increases_off_bound; Tztest.tztest - "Test EMA remains in bounds when vote is On" + "EMA remains in bounds when vote is On" `Quick test_ema_in_bound_on; + Tztest.tztest "EMA decreases when vote is On" `Quick test_ema_decreases_on; Tztest.tztest - "Test EMA decreases when vote is On" - `Quick - test_ema_decreases_on; - Tztest.tztest - "Test EMA does not decrease too much when vote is On" + "EMA does not decrease too much when vote is On" `Quick test_ema_decreases_on_bound; Tztest.tztest - "Test EMA goes from 0 to one billion in 1386 Off votes" + "EMA goes from 0 to one billion in 1386 Off votes" `Quick test_ema_many_off; Tztest.tztest - "Test EMA goes from two billions to one billion in 1386 On votes" + "EMA goes from two billions to one billion in 1386 On votes" `Quick test_ema_many_on; Tztest.tztest - "Test that voting On and Off have symmetric effects on the EMA" + "voting On and Off have symmetric effects on the EMA" `Quick test_ema_symmetry; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("liquidity baking", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_local_contexts.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_local_contexts.ml index 28e3b876ee2277fe28933d69fe7632d72f31f0ad..197e0bb6e1d270d75d5a0b6befa888ecc0008518 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_local_contexts.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_local_contexts.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Local context storages by functors - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_local_contexts.ml Dependencies: helpers/block.ml Subject: Tests for local contexts @@ -132,3 +133,7 @@ let tests = `Quick test_local_remove_existing; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("local_contexts", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_main.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_main.ml deleted file mode 100644 index 90b3ac74143ccefa4ba9d14942d282f39a2cc0d2..0000000000000000000000000000000000000000 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_main.ml +++ /dev/null @@ -1,66 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2022 Marigold *) -(* Copyright (c) 2022 Nomadic Labs *) -(* Copyright (c) 2022 Oxhead Alpha *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -let () = - Alcotest_lwt.run - ~__FILE__ - (Protocol.name ^ " > unit") - [ - ("Tez_repr.ml", Test_tez_repr.tests); - ("Contract_repr.ml", Test_contract_repr.tests); - ("Destination_repr.ml", Test_destination_repr.tests); - ("Operation_repr.ml", Test_operation_repr.tests); - ( Protocol.name ^ ": Global_constants_storage.ml", - Test_global_constants_storage.tests ); - ("fitness", Test_fitness.tests); - ("fixed point computation", Test_fixed_point.tests); - ("level module", Test_level_module.tests); - ("qty", Test_qty.tests); - ("round", Test_round_repr.tests); - ("time", Test_time_repr.tests); - ("receipt encodings", Test_receipt.tests); - ("saturation arithmetic", Test_saturation.tests); - ("gas monad", Test_gas_monad.tests); - ("sc rollup storage", Test_sc_rollup_storage.tests); - ("sc rollup game", Test_sc_rollup_game.tests); - ("tx rollup l2", Test_tx_rollup_l2.tests); - ("tx rollup l2 apply", Test_tx_rollup_l2_apply.tests); - ("liquidity baking", Test_liquidity_baking_repr.tests); - ("sc rollup wasm", Test_sc_rollup_wasm.tests); - ("sc rollup arith", Test_sc_rollup_arith.tests); - ("merkle list", Test_merkle_list.tests); - ("sc rollup inbox", Test_sc_rollup_inbox.tests); - ("skip list", Test_skip_list_repr.tests); - ( Protocol.name ^ ": sc rollup management protocol", - Test_sc_rollup_management_protocol.tests ); - ("Bond_id_repr.ml", Test_bond_id_repr.tests); - ("zk rollup storage", Test_zk_rollup_storage.tests); - ("Delegate_consensus_key.ml", Test_consensus_key.tests); - ("local_contexts", Test_local_contexts.tests); - ("dal slot proof", Test_dal_slot_proof.tests); - ] - |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_merkle_list.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_merkle_list.ml index 246998c19d269084027ae9c888daabef1dd44801..c0c1f7b97ca738e7e2b04fd674fcca3bb4ca36f0 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_merkle_list.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_merkle_list.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Merkle list) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_merkle_list.ml Subject: test the ad-hoc merkle tree structure implemented to encode lists *) @@ -234,20 +235,19 @@ let test_path_encoding () = let valid_tests = [ - ("test_compute", test_compute); - ("test_snoc", test_snoc); - ("test_snoc_non_tr", test_snoc_non_tr); - ("test_compute_path", test_compute_path); - ("test_check_path", test_check_path); - ("test_path_encoding", test_path_encoding); - ("test_compute_path_negative_pos", test_compute_path_negative_pos); - ("test_compute_path_out_of_bounds", test_compute_path_out_of_bounds); - ("test_check_path_negative_pos", test_check_path_negative_pos); - ("test_check_path_out_of_bounds", test_check_path_out_of_bounds); - ( "test_compute_path_out_of_bounds_full", - test_compute_path_out_of_bounds_full ); - ("test_check_path_wrong_pos", test_check_path_wrong_pos); - ("test_check_invalidated_path", test_check_invalidated_path); + ("compute", test_compute); + ("snoc", test_snoc); + ("snoc_non_tr", test_snoc_non_tr); + ("compute_path", test_compute_path); + ("check_path", test_check_path); + ("path_encoding", test_path_encoding); + ("compute_path_negative_pos", test_compute_path_negative_pos); + ("compute_path_out_of_bounds", test_compute_path_out_of_bounds); + ("check_path_negative_pos", test_check_path_negative_pos); + ("check_path_out_of_bounds", test_check_path_out_of_bounds); + ("compute_path_out_of_bounds_full", test_compute_path_out_of_bounds_full); + ("check_path_wrong_pos", test_check_path_wrong_pos); + ("check_invalidated_path", test_check_invalidated_path); ] let wrap (n, f) = @@ -255,3 +255,7 @@ let wrap (n, f) = Lwt.return (f ()) >|= function Ok () -> () | Error _ -> assert false) let tests = List.map wrap valid_tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("merkle list", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_operation_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_operation_repr.ml index 6dd387fda9a3f3aee809395e368a453d7fd0e1ea..564e6f5c40e54d37691f953f1c4c011287045827 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_operation_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_operation_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Operation_repr - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_operation_repr.ml Dependencies: -- Subject: To test the modules (including the top-level) in operation_repr.ml as individual units, particularly @@ -187,3 +188,7 @@ let tests = `Quick Test_operation_repr.test_multiple_non_manager; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Operation_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_qty.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_qty.ml index cf87a90e266a837442095b2c40eb2ee57225c057..8dd0771421d6f123b5d4d92e61166e5f7aafd82a 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_qty.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_qty.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (quantities) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_qty.ml Subject: On tez quantities. *) @@ -157,3 +158,6 @@ let wrap (n, f) = Format.kasprintf Stdlib.failwith "%a" pp_print_trace error) let tests = List.map wrap tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("qty", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_raw_level_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_raw_level_repr.ml index 2a5de4139bcd9ad07f1840428fd13581cf70fa0d..195668eda1bb4e1a8a2d36b7050227fb61966c65 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_raw_level_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_raw_level_repr.ml @@ -29,7 +29,8 @@ open Tztest (** Testing ------- Component: Raw_level_repr - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_raw_level_repr.ml Dependencies: -- Subject: To test the modules (including the top-level) in raw_level_repr.ml as individual units, particularly @@ -173,3 +174,7 @@ let skipped_tests = `Quick Test_raw_level_repr.test_skip_succ; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("raw_level_repr", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_receipt.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_receipt.ml index 8525b57be7ac3db0a3008def38012e3abd9b2c8c..4ae9a47de3a21cfef44276d6f326672516e7e9a7 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_receipt.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_receipt.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (token) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_receipt.ml Subject: Test receipt endocings. *) @@ -99,3 +100,7 @@ let test_encodings () = test_encodings Sc_rollup_refutation_rewards let tests = Tztest.[tztest "receipt - encoding" `Quick test_encodings] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("receipt encodings", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_round_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_round_repr.ml index 346dec1a1188fad68b7a90906d748524b8d3c3bc..269485b416a58ed93f8be42a0c998a994a2bc5d6 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_round_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_round_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: protocol - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_round_repr.ml Subject: test the Round_repr module *) @@ -616,13 +617,13 @@ let test_round_and_offset_correction = let tests = Tztest. [ - tztest "test_level_offset_of_round" `Quick test_level_offset_of_round; - tztest "test Round_duration" `Quick test_round; + tztest "level_offset_of_round" `Quick test_level_offset_of_round; + tztest "Round_duration" `Quick test_round; tztest "round_of_timestamp" `Quick test_round_of_timestamp; tztest "round_of_timestamp_perf" `Quick test_round_of_timestamp_perf; tztest "timestamp_of_round_perf" `Quick test_timestamp_of_round_perf; tztest - "test level offset too high error is triggered" + "level offset too high error is triggered" `Quick test_error_is_triggered_for_too_high_timestamp; tztest "round_of_ts (ts_of_round r) = r" `Quick test_ts_of_round_inverse; @@ -632,3 +633,6 @@ let tests = test_round_of_ts_inverse; test_round_and_offset_correction; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("round", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_saturation.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_saturation.ml index 7eea6d69787dc06933cd231fa889c97f7d77ec2c..67e8e32f89a45e0a8a5fc0e51c6e59537f5413d5 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_saturation.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_saturation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (saturated arithmetic) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_saturation.ml Subject: The gas is represented using saturated arithmetic. These unit tests check that saturated arithmetic operations are correctly implemented. @@ -233,3 +234,7 @@ let tests = `Quick (encoding Saturation_repr.n_encoding); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("saturation arithmetic", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_arith.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_arith.ml index f5cfa5d17c319095dab4b970e03411b9381e7080..e21863793861032693f17cd9a8b17502f811b31c 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_arith.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_arith.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (saturated arithmetic) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_arith.ml Subject: Basic testing of the arithmetic rollup example *) @@ -545,3 +546,7 @@ let tests = test_initial_state_hash_arith_pvm; Tztest.tztest "Filter internal message" `Quick test_filter_internal_message; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup arith", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_game.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_game.ml index c4ca7ebc1dc35ef77bb089f058603d8eab27a66f..b73ad843061830d651d8cfd57d6e9945289b6f60 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_game.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_game.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol Sc_rollup_refutation_storage - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_game.ml Subject: Tests for the SCORU refutation game *) @@ -456,21 +457,23 @@ let tests = `Quick test_invalid_serialized_inbox_proof; Tztest.tztest - "Test to start a game with invalid commitment hash (swap commitment)." + "start a game with invalid commitment hash (swap commitment)." `Quick test_first_move_with_swapped_commitment; Tztest.tztest - "Test to start a game with invalid commitment hash (op from outsider)." + "start a game with invalid commitment hash (op from outsider)." `Quick test_first_move_from_invalid_player; Tztest.tztest - "Test to start a game with invalid commitment hash (opponent is not in \ - game)." + "start a game with invalid commitment hash (opponent is not in game)." `Quick test_first_move_with_invalid_opponent; Tztest.tztest - "Test to start a game with commitment hash that are not the first \ - conflict." + "start a game with commitment hash that are not the first conflict." `Quick test_first_move_with_invalid_ancestor; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup game", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_inbox.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_inbox.ml index df8f73a55bb3dbfdd6e06bfd379116193843101a..ae4a42bab0629574fa9994cfdb73c74708ca8266 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_inbox.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_inbox.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (smart contract rollup inbox) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_inbox.ml Subject: These unit tests check the off-line inbox implementation for smart contract rollups *) @@ -691,3 +692,7 @@ let inbox_tests = let tests = merkelized_payload_hashes_tests @ inbox_tests @ Test_sc_rollup_inbox_legacy.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup inbox", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_inbox_legacy.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_inbox_legacy.ml index 303df6dcaf03d985be8a84735bd46e677c1a6ecc..acc485f02c49a6982fde08369979b996a62fd09c 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_inbox_legacy.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_inbox_legacy.ml @@ -26,7 +26,7 @@ (** Testing ------- Component: Protocol (smart contract rollup inbox) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe Subject: These unit tests check the off-line inbox implementation for smart contract rollups *) diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml index 424bcd1c12e8fecc73640a33d6fb31b2073f687c..6711bd7c418d34f6ecf9114f48ccd9765a8da011 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Rollup Management Protocol) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_management_protocol.ml Subject: Sanity checks for the Rollup Management Protocol module. *) @@ -341,3 +342,10 @@ let tests = `Quick test_encode_decode_outbox_message; ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("sc rollup management protocol", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_storage.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_storage.ml index 303c86d3f86054f7add0b0cef77683206ad271d8..d1cb0c38ebe963f5ae313611a3f17c9cae8e1928 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_storage.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_storage.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol Sc_rollup_storage - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_storage.ml Subject: Tests for the SCORU storage module *) @@ -2871,7 +2872,7 @@ module Stake_storage_tests = struct `Quick test_unrelated_commitments; Tztest.tztest - "test fresh index is correcly incremented" + "fresh index is correcly incremented" `Quick test_fresh_index_correctly_increment; ] @@ -2925,3 +2926,7 @@ let tests = Stake_storage_tests.tests @ Rollup_storage_tests.tests (* FIXME: https://gitlab.com/tezos/tezos/-/issues/2460 Further tests to be added. *) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup storage", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_wasm.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_wasm.ml index 3dd715464ec9ed63424e3af802fe49fe1b349297..837e3a4fa938a3794c98130430778f49946268f7 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_wasm.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_sc_rollup_wasm.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Rollup layer 1 logic - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_wasm.ml Subject: Unit test for the Wasm PVM *) @@ -311,5 +312,9 @@ let tests = test_initial_state_hash_wasm_pvm; Tztest.tztest "size of a rollup metadata" `Quick test_metadata_size; Tztest.tztest "l1 input kind" `Quick test_l1_input_kind; - Tztest.tztest "test output proofs" `Quick test_output; + Tztest.tztest "output proofs" `Quick test_output; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup wasm", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_skip_list_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_skip_list_repr.ml index 9b6a18f946fb834071551ae4ed3057b6126ce41c..ab1bc76ff76f58a3b1a53d8aa5ff3fd23edb8c08 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_skip_list_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_skip_list_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (skip lists) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_skip_list_repr.ml Subject: Test skip list implementation *) @@ -674,3 +675,7 @@ let tests = `Quick test_skip_list_proof_size; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("skip list", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tez_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tez_repr.ml index a013acf4a5666cce033678488cb3129332aaa76c..3424a5fa72ccfbd342f06e91a3b2a6f2799bcc0f 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tez_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tez_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Tez_repr - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_tez_repr.ml Dependencies: -- Subject: To test the modules (including the top-level) in tez_repr.ml as individual units, particularly @@ -196,3 +197,7 @@ let tests = `Quick Test_tez_repr.test_data_encoding; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Tez_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_time_repr.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_time_repr.ml index a1cc50d3d0d9dcc676c9c384853613c30edc9d49..ac998637c86323087d777ae1fb9881ab549bc1a5 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_time_repr.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_time_repr.ml @@ -1,7 +1,8 @@ (** Testing ------- Component: Protocol (time repr) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_time_repr.ml Subject: Error handling of time operations *) @@ -42,3 +43,6 @@ let tests = Tztest.tztest "non-overflowing addition" `Quick test_nominal_add; Tztest.tztest "overflowing addition" `Quick test_overflow_add; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("time", tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2.ml index a76115613b59301fa19028cd085090fcdf3e62e5..91544172784d0978c08a5b2756595f5e274e10fb 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2.ml @@ -28,7 +28,8 @@ (** Testing ------- Component: Protocol (tx rollup l2) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_tx_rollup_l2.ml Subject: test the layer-2 implementation of transaction rollup *) @@ -560,12 +561,7 @@ module Test_batch_encodings = struct return_unit let tests = - [ - tztest - "test layer-2 transaction encoding size" - `Quick - test_l2_transaction_size; - ] + [tztest "layer-2 transaction encoding size" `Quick test_l2_transaction_size] end let tests = @@ -573,3 +569,7 @@ let tests = @ Test_Address_index.tests @ Test_Ticket_index.tests @ Test_Address_medata.tests @ Test_Ticket_ledger.tests @ Test_batch_encodings.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("tx rollup l2", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2_apply.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2_apply.ml index 528df6b0789c8f3dd1b17a16f9f2c788ae393403..24107b2d187b725bcc66f89d08ef03802c73634d 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2_apply.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_tx_rollup_l2_apply.ml @@ -28,7 +28,8 @@ (** Testing ------- Component: Protocol (tx rollup l2) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_tx_rollup_l2_apply.ml Subject: test the layer-2 apply implementation of transaction rollup *) @@ -1762,20 +1763,20 @@ let tests = ([ ("simple transaction", test_simple_deposit); ("returned transaction", test_returned_deposit); - ("test simple l1 transaction", test_simple_l1_transaction); - ( "test simple l1 transaction: inexistant ticket", + ("simple l1 transaction", test_simple_l1_transaction); + ( "simple l1 transaction: inexistant ticket", test_l1_transaction_inexistant_ticket ); - ( "test simple l1 transaction: inexistant signer", + ( "simple l1 transaction: inexistant signer", test_l1_transaction_inexistant_signer ); - ("test simple l1 transaction: overdraft", test_l1_transaction_overdraft); - ("test simple l1 transaction: zero", test_l1_transaction_zero); - ("test simple l1 transaction: partial", test_l1_transaction_partial); - ("test simple l2 transaction", test_simple_l2_transaction); - ( "test l2 transaction with l2 addr: good", + ("simple l1 transaction: overdraft", test_l1_transaction_overdraft); + ("simple l1 transaction: zero", test_l1_transaction_zero); + ("simple l1 transaction: partial", test_l1_transaction_partial); + ("simple l2 transaction", test_simple_l2_transaction); + ( "l2 transaction with l2 addr: good", test_l2_transaction_l2_addr_signer_good ); ( "test l2 transaction with l2 addr: bad", test_l2_transaction_l2_addr_signer_bad ); - ( "test simple transaction with indexes and values", + ( "simple transaction with indexes and values", test_transaction_with_unknown_indexable ); ("invalid transaction", test_invalid_transaction); ("invalid counter", test_invalid_counter); @@ -1786,7 +1787,7 @@ let tests = test_apply_message_batch_withdrawals ); ("apply deposit from message", test_apply_message_deposit); ("apply unparseable message", test_apply_message_unparsable); - ("test transfer to self fail", test_transfer_to_self); + ("transfer to self fail", test_transfer_to_self); ( "nb withdrawals per batch below limit", nb_withdrawals_per_batch_below_limit ); ( "nb withdrawals per batch equals limit", @@ -1795,3 +1796,7 @@ let tests = nb_withdrawals_per_batch_above_limit ); ] @ Indexes.tests) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("tx rollup l2 apply", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_zk_rollup_storage.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_zk_rollup_storage.ml index 98afba3634ab2a9d4f0ff1377441622e395ea829..8302047acef1c0ec0da264ba0e517ed4699ac676 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_zk_rollup_storage.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_zk_rollup_storage.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Zk_rollup) - Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_016_PtMumbai/lib_protocol/test/unit/main.exe \ + -- --file test_zk_rollup_storage.ml Subject: On ZK Rollup storage *) @@ -389,8 +390,9 @@ let tests = `Quick Raw_context_tests.pending_list_errors; Tztest.tztest "test_update" `Quick Raw_context_tests.test_update; - Tztest.tztest - "test_update errors" - `Quick - Raw_context_tests.test_update_errors; + Tztest.tztest "update errors" `Quick Raw_context_tests.test_update_errors; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("zk rollup storage", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/dune b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/dune index 02b4e560515f21bda251c1f090783389e960d25b..1b9883735dd8d038d2ab2e2304e35edc089a5d04 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/dune @@ -28,7 +28,6 @@ -open Tezos_protocol_017_PtNairob_parameters -open Tezos_protocol_plugin_017_PtNairob) (modules - test_main test_baking test_consensus_key test_deactivation diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_baking.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_baking.ml index 8dd765e5fcab0db11a9886ffce29448ca9011a7d..6d2ee39ec61b4be1cae7cf749f31f6478e9f5c80 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_baking.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_baking.ml @@ -28,9 +28,8 @@ (** Testing ------- Component: Protocol (baking) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^baking$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_baking.ml Subject: Rewards and bakers. Tests based on RPCs. *) @@ -430,27 +429,27 @@ let test_committee_sampling () = let tests = [ Tztest.tztest "cycle" `Quick test_cycle; - Tztest.tztest - "test_bake_n_cycles for 12 cycles" - `Quick - (test_bake_n_cycles 12); + Tztest.tztest "bake_n_cycles for 12 cycles" `Quick (test_bake_n_cycles 12); Tztest.tztest "voting_power" `Quick test_voting_power_cache; Tztest.tztest "the fixed baking reward is given after a bake" `Quick test_basic_baking_reward; Tztest.tztest - "test that the block producer gets the bonus while the payload producer \ - gets the baking reward " + "the block producer gets the bonus while the payload producer gets the \ + baking reward " `Quick test_rewards_block_and_payload_producer; Tztest.tztest - "test that a delegate with 8000 tez can bake" + "a delegate with 8000 tez can bake" `Quick (test_enough_active_stake_to_bake ~has_active_stake:true); Tztest.tztest - "test that a delegate with 7999 tez cannot bake" + "a delegate with 7999 tez cannot bake" `Quick (test_enough_active_stake_to_bake ~has_active_stake:false); - Tztest.tztest "test committee sampling" `Quick test_committee_sampling; + Tztest.tztest "committee sampling" `Quick test_committee_sampling; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("baking", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_consensus_key.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_consensus_key.ml index 912d7b5e758c558a2f442d02d235c8c8425726f7..b6a4e9ec6ab1ddecc3837443bb789970eeb43b81 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_consensus_key.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_consensus_key.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (delegate_storage) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^consensus key$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_consensus_key.ml Subject: consistency of the [Drain_delegate] operation *) @@ -233,72 +232,73 @@ let tests = Tztest. [ tztest - "test drain delegate high balance, excluding ck, ck delegates" + "drain delegate high balance, excluding ck, ck delegates" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:true ~ck_delegates:true); tztest - "test drain delegate high balance, excluding ck, ck does not delegate" + "drain delegate high balance, excluding ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:true ~ck_delegates:false); tztest - "test drain delegate high balance, with ck, ck delegates" + "drain delegate high balance, with ck, ck delegates" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:false ~ck_delegates:true); tztest - "test drain delegate high balance, with ck, ck does not delegate" + "drain delegate high balance, with ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:false ~ck_delegates:false); tztest - "test drain delegate low balance, excluding ck, ck delegates" + "drain delegate low balance, excluding ck, ck delegates" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:true ~ck_delegates:true); tztest - "test drain delegate low balance, excluding ck, ck does not delegate" + "drain delegate low balance, excluding ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:true ~ck_delegates:false); tztest - "test drain delegate low balance, with ck, ck delegates" + "drain delegate low balance, with ck, ck delegates" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:false ~ck_delegates:true); tztest - "test drain delegate low balance, with ck, ck does not delegate" + "drain delegate low balance, with ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:false ~ck_delegates:false); tztest - "test empty drain delegate excluding ck" + "empty drain delegate excluding ck" `Quick (test_drain_empty_delegate ~exclude_ck:true); tztest - "test empty drain delegate with ck" + "empty drain delegate with ck" `Quick (test_drain_empty_delegate ~exclude_ck:false); - tztest "test tz4 consensus key" `Quick test_tz4_consensus_key; - tztest - "test endorsement with ck" - `Quick - test_endorsement_with_consensus_key; + tztest "tz4 consensus key" `Quick test_tz4_consensus_key; + tztest "endorsement with ck" `Quick test_endorsement_with_consensus_key; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("consensus key", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_deactivation.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_deactivation.ml index 393330708fea05b8c7d259d47413258dfdc852f1..3686dbdb049f3672f154f2f93492211ddfdf9630 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_deactivation.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_deactivation.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^deactivation$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_deactivation.ml Subject: After a given number of cycles during which a delegate has not made use of its baking and endorsing rights, its account will be deactivated for validator selection. To bake/endorse @@ -356,3 +355,7 @@ let tests = `Quick test_a_really_deactivated_account_is_not_in_the_committee; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("deactivation", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_delegation.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_delegation.ml index 898aec642f723a3bcb8c0a67a70272c366eb8561..b8f3550093a3e92b3afead760a9c865418e07271 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_delegation.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_delegation.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (delegation) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^delegation$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_delegation.ml Subject: - Properties on bootstrap contracts (self-delegation, cannot delete/change their delegate (as opposed to contracts not-being-delegate which can do these), bootstrap manager @@ -1614,3 +1613,7 @@ let tests_delegate_registration = (******************************************************************************) let tests = tests_bootstrap_contracts @ tests_delegate_registration + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("delegation", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_baking.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_baking.ml index ce777f8cbf1774594f65796c8dff48a7a2cdec38..ba29f86bafa3ac2d98ef7a273f703e117561d9c1 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_baking.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_baking.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (double baking) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^double baking$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_double_baking.ml Subject: A double baking evidence operation may be injected when it has been observed that a baker baked two different blocks at the same level and same round. @@ -461,3 +460,7 @@ let tests = `Quick test_valid_double_endorsing_followed_by_double_baking; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("double baking", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_endorsement.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_endorsement.ml index b62fb4320b0a5b686615c9b364bdf5430986e94a..5cd36103bb10f56ac17e4ba96c4bb995b5530099 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_endorsement.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_endorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (double endorsement) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe -- --test "alpha: double endorsement" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_double_endorsement.ml Subject: Double endorsement evidence operation may happen when an endorser endorsed two different blocks on the same level. *) @@ -555,3 +556,7 @@ let tests = `Quick test_freeze_more_with_low_balance; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("double endorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_preendorsement.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_preendorsement.ml index f1c8be80ebb2a32d547d0a3c8e2b064663725988..22eab296fbafe68ea0308267bf9f21668ce6cdf2 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_preendorsement.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_double_preendorsement.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (double preendorsement) in Full_construction & Application modes - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^double preendorsement$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_double_preendorsement.ml Subject: These tests target different cases for double preendorsement *) open Protocol @@ -400,3 +399,7 @@ let tests = let baking_mode = Block.Baking end) in AppMode.tests @ ConstrMode.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("double preendorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_endorsement.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_endorsement.ml index ea39907d1ed44bb6d3351aa26751bf3c5da24def..247eab77e38758c3d6d2013bd0e6507718e07b6d 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_endorsement.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_endorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (endorsement) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe -- --test "alpha: endorsement" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_endorsement.ml Subject: Endorsing a block adds an extra layer of confidence to the Tezos' PoS algorithm. The block endorsing operation must be included in the following block. @@ -684,3 +685,7 @@ let tests = `Quick (test_endorsement_threshold ~sufficient_threshold:false); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("endorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_frozen_deposits.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_frozen_deposits.ml index 9ca124ba13765caea369c391284da5893ccb2547..7763c95d8b762b5e9fa561b9770fdf2ed6a9029b 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_frozen_deposits.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_frozen_deposits.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (frozen_deposits) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^frozen deposits$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_frozen_deposits.ml Subject: consistency of frozen deposits and the [set_deposits_limit] operation *) @@ -653,7 +652,7 @@ let test_error_is_thrown_when_smaller_upper_bound_for_frozen_window () = let tests = Tztest. [ - tztest "test invariants" `Quick test_invariants; + tztest "invariants" `Quick test_invariants; tztest "set deposits limit to 0%" `Quick (test_set_limit 0); tztest "set deposits limit to 5%" `Quick (test_set_limit 5); tztest "unset deposits limit" `Quick test_unset_limit; @@ -674,15 +673,19 @@ let tests = `Quick test_frozen_deposits_with_delegation; tztest - "test frozen deposits with overdelegation" + "frozen deposits with overdelegation" `Quick test_frozen_deposits_with_overdelegation; tztest - "test set limit with overdelegation" + "set limit with overdelegation" `Quick test_set_limit_with_overdelegation; tztest - "test error is thrown when the frozen window is smaller" + "error is thrown when the frozen window is smaller" `Quick test_error_is_thrown_when_smaller_upper_bound_for_frozen_window; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("frozen deposits", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml index 367aa44d4ecfcda314d71bc617e5e730cdfd3c48..0933bff5d6193099f233f20031c380533dca5930 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (Helpers RPCs) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^helpers rpcs$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_helpers_rpcs.ml Subject: On RPCs. *) @@ -63,3 +62,7 @@ let test_baking_rights () = return_unit let tests = [Tztest.tztest "baking_rights" `Quick test_baking_rights] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("helpers rpcs", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_main.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_main.ml deleted file mode 100644 index 9976e9dc511531dc30725e0a70e004d846a68193..0000000000000000000000000000000000000000 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_main.ml +++ /dev/null @@ -1,53 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune runtest src/proto_alpha/lib_protocol/test/integration/consensus - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > consensus" - [ - (Protocol.name ^ ": endorsement", Test_endorsement.tests); - (Protocol.name ^ ": preendorsement", Test_preendorsement.tests); - (Protocol.name ^ ": double endorsement", Test_double_endorsement.tests); - ( Protocol.name ^ ": double preendorsement", - Test_double_preendorsement.tests ); - (Protocol.name ^ ": double baking", Test_double_baking.tests); - (Protocol.name ^ ": seed", Test_seed.tests); - (Protocol.name ^ ": baking", Test_baking.tests); - (Protocol.name ^ ": delegation", Test_delegation.tests); - (Protocol.name ^ ": deactivation", Test_deactivation.tests); - (Protocol.name ^ ": helpers rpcs", Test_helpers_rpcs.tests); - (Protocol.name ^ ": participation monitoring", Test_participation.tests); - (Protocol.name ^ ": frozen deposits", Test_frozen_deposits.tests); - (Protocol.name ^ ": consensus key", Test_consensus_key.tests); - ] - |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_participation.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_participation.ml index d8e845126282b4dead96ea61b7143c5a801bdb1e..f6e8d5e9f46cbc9bd3c5eafaa22c3f484d879410 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_participation.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_participation.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (participation monitoring) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^participation" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_participation.ml Subject: Participation monitoring in Tenderbake *) @@ -194,12 +193,16 @@ let test_participation_rpc () = let tests = [ Tztest.tztest - "test insufficient participation" + "insufficient participation" `Quick (test_participation ~sufficient_participation:false); Tztest.tztest - "test minimal participation" + "minimal participation" `Quick (test_participation ~sufficient_participation:true); - Tztest.tztest "test participation RPC" `Quick test_participation_rpc; + Tztest.tztest "participation RPC" `Quick test_participation_rpc; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("participation monitoring", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_preendorsement.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_preendorsement.ml index 88a60cead11f5a13f141d302aa91aad3dd710ff2..f7d622387f23ffad2fc868395d284d3056dcde57 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_preendorsement.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_preendorsement.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (preendorsement) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^preendorsement$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_preendorsement.ml *) open Protocol @@ -236,3 +235,7 @@ let tests = `Quick test_preendorsement_for_next_round; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("preendorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_seed.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_seed.ml index b6e6f6cc21e244ace790872b465e56fc58b14e2e..93df78ac53a62d34a26bde2777ad3146e1fb4d1d 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_seed.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/test_seed.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (seed) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ - -- test "^seed$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_seed.ml Subject: - seed_nonce_hash included in some blocks - revelation operation of seed_nonce that should correspond to each seed_nonce_hash @@ -639,11 +638,14 @@ let tests = "revelation_missing_and_late" `Quick test_revelation_missing_and_late; - Tztest.tztest "test unrevealed" `Quick test_unrevealed; + Tztest.tztest "unrevealed" `Quick test_unrevealed; Tztest.tztest - "test_early_incorrect_unverified_correct_already_vdf" + "early_incorrect_unverified_correct_already_vdf" `Quick test_early_incorrect_unverified_correct_already_vdf; - Tztest.tztest "test VDF status" `Quick test_vdf_status; + Tztest.tztest "VDF status" `Quick test_vdf_status; Tztest.tztest "for_cycle cycle bounds" `Quick test_cycle_bounds; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("seed", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/dune b/src/proto_017_PtNairob/lib_protocol/test/integration/dune index b28585b764f8d1aa32d5f733271f546f0b98d23a..b693985a9757704af4cc592d23c062a26a62543f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/dune @@ -29,7 +29,6 @@ -open Tezos_017_PtNairob_test_helpers -open Tezos_base_test_helpers) (modules - test_main test_constants test_frozen_bonds test_liquidity_baking diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/gas/dune b/src/proto_017_PtNairob/lib_protocol/test/integration/gas/dune index 7ea3a1758fa166c9ca28a5d325ea6a94992ecf47..f672359723a1544e0aea4492373570614ec54393 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/gas/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/gas/dune @@ -22,7 +22,7 @@ -open Tezos_protocol_017_PtNairob -open Tezos_017_PtNairob_test_helpers -open Tezos_base_test_helpers) - (modules test_main test_gas_costs test_gas_levels)) + (modules test_gas_costs test_gas_levels)) (executable (name main) diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_gas_costs.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_gas_costs.ml index c7c7f2ed772953dddb8c0a5905db0168d3ca7bd8..e1d43424324ebb5deb5f5cf7e944e4cde4a6070e 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_gas_costs.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_gas_costs.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (gas costs) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/gas/main.exe \ - -- test "^gas cost functions$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/gas/main.exe \ + -- --file test_gas_costs.ml Subject: Gas costs Current limitations: for maps, sets & compare, we only test integer comparable keys. @@ -284,3 +283,7 @@ let tests = `Quick (test_cost_reprs_are_all_positive all_io_costs); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("gas cost functions", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_gas_levels.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_gas_levels.ml index 03e1aefca885ff03e282e88b358f7ddde3a2b16a..abaa01b81a1533ce582eeba03bfae446e44f5986 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_gas_levels.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_gas_levels.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (Gas levels) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/gas/main.exe \ - -- test "^gas levels$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/gas/main.exe \ + -- --file test_gas_levels.ml Subject: On gas consumption and exhaustion. *) @@ -399,10 +398,10 @@ let make_batch_test_block_one_origination name contract gas_sampler = let app_n = List.map (fun (x, y) -> (x ^ " with contract " ^ name, y)) in app_n [ - ("Test bake one operation", test_one_operation); - ("Test bake one operation list", test_one_operation_list); - ("Test multiple single operations", test_many_single_operations); - ("Test both lists and single operations", test_mixed_operations); + ("bake one operation", test_one_operation); + ("bake one operation list", test_one_operation_list); + ("multiple single operations", test_many_single_operations); + ("both lists and single operations", test_mixed_operations); ] (** Tests the consumption of all gas in a block, should pass *) @@ -555,9 +554,8 @@ let tests = ( "Detect when gas limit of operation list exceeds the hard gas limit \ per block", test_malformed_block_max_limit_reached' ); - ( "Test the gas consumption of various operations", - test_block_mixed_operations ); - ("Test that emptying an account costs gas", test_emptying_account_gas); + ("the gas consumption of various operations", test_block_mixed_operations); + ("emptying an account costs gas", test_emptying_account_gas); ] @ make_batch_test_block_one_origination "nil" nil_contract basic_gas_sampler @ make_batch_test_block_one_origination @@ -568,3 +566,7 @@ let tests = "infinite loop" loop_contract basic_gas_sampler) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("gas levels", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_main.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_main.ml deleted file mode 100644 index acf1b62cdcf4f4caf5347ee700011e83d5e9b3f8..0000000000000000000000000000000000000000 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/gas/test_main.ml +++ /dev/null @@ -1,41 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol > Gas - Invocation: dune runtest src/proto_alpha/lib_protocol/test/integration/gas - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > gas" - [ - (Protocol.name ^ ": gas levels", Test_gas_levels.tests); - (Protocol.name ^ ": gas cost functions", Test_gas_costs.tests); - ] - |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/dune b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/dune index c8c898cbd784b10cb318a475a5abf3afb4202d97..591d17699012a7c6577eba25998125d73ea069f2 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/dune @@ -36,7 +36,6 @@ -open Tezos_benchmark_type_inference_017_PtNairob -open Tezos_protocol_plugin_017_PtNairob) (modules - test_main test_annotations test_block_time_instructions test_contract_event diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_annotations.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_annotations.ml index 200d25431759913ca10fc2840a635255117cc1ba..1f930fea1470dd0aa49d53dcf1d918e9174b61b8 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_annotations.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_annotations.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (Michelson annotations) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^annotations$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_annotations.ml Subject: This module tests that Michelson annotations are properly handled. *) @@ -138,3 +138,7 @@ let tests = `Quick test_internal_origination; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("annotations", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_block_time_instructions.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_block_time_instructions.ml index ba287bb8b9da1f972d03d8fc0c95c8eb1bca543b..8480d7babfebe4b98e824a43d4979a4d686dc9e4 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_block_time_instructions.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_block_time_instructions.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (Michelson block-time instructions) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^block time instructions$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_block_time_instructions.ml Subject: This module tests that Michelson instructions related to block time are correct. *) @@ -78,3 +78,7 @@ let tests = `Quick test_min_block_time; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("block time instructions", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_contract_event.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_contract_event.ml index 39ac884df84ac0b99e015b83c9c4334ebfadfc86..16f82977311cf543cdacb94fa3205ba1144f92f6 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_contract_event.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_contract_event.ml @@ -29,8 +29,8 @@ open Alpha_context (** Testing ------- Component: Protocol (event logging) - Invocation: cd src/proto_alpha/lib_protocol/test/integration/michelson && \ - dune exec ./main.exe -- test '^event logging$' + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_contract_event.ml Subject: This module tests that the event logs can be written to the receipt in correct order and expected format. *) @@ -134,3 +134,7 @@ let tests = `Quick contract_test; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("event logging", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_global_constants_storage.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_global_constants_storage.ml index 7a031944fbedf715671d30f24d65fb4352aa31ac..3d986cd31af76544e1170af0f3d94b1972043f71 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_global_constants_storage.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_global_constants_storage.ml @@ -29,9 +29,8 @@ open Transfers (** Testing ------- Component: Protocol (global table of constants) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^global table of constants$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_global_constants_storage.ml Subject: This module tests that the global table of constants can be written to and read from across blocks. *) @@ -131,3 +130,10 @@ let tests = `Quick test_no_double_register; ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("global table of constants", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_interpretation.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_interpretation.ml index aae0da0ab17e6a0fcfe0a5881b9062a6987d78ef..01315969cd98ba7a6105d3250d6de7918e666187 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_interpretation.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_interpretation.ml @@ -27,8 +27,8 @@ ------- Component: Protocol (interpretation) Dependencies: src/proto_alpha/lib_protocol/script_interpreter.ml - Invocation: cd src/proto_alpha/lib_protocol/test/integration/michelson && \ - dune exec ./main.exe -- test "^interpretation$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_interpretation.ml Subject: Interpretation of Michelson scripts *) @@ -372,28 +372,28 @@ let path = project_root // Filename.dirname __FILE__ let tests = [ - Tztest.tztest "test bad contract error" `Quick test_bad_contract_parameter; + Tztest.tztest "bad contract error" `Quick test_bad_contract_parameter; Tztest.tztest "check robustness overflow error" `Slow test_stack_overflow; Tztest.tztest "check robustness overflow error in lwt" `Slow test_stack_overflow_in_lwt; Tztest.tztest - "test multiplication no illegitimate overflow" + "multiplication no illegitimate overflow" `Quick test_multiplication_close_to_overflow_passes; - Tztest.tztest "test stack overflow error" `Slow test_stack_overflow; + Tztest.tztest "stack overflow error" `Slow test_stack_overflow; Tztest.tztest_qcheck2 - ~name:"test map instr against options" + ~name:"map instr against options" QCheck2.Gen.( triple (opt small_signed_int) (opt small_signed_int) small_signed_int) Test_map_instr_on_options.test_mapping; Tztest.tztest - "test lambda_rec instruction" + "lambda_rec instruction" `Quick (test_contract_success (path // "contracts/rec_fact.tz") "0" "5" "120"); Tztest.tztest - "test lambda_rec instruction with apply" + "lambda_rec instruction with apply" `Quick (test_contract_success (path // "contracts/rec_fact_apply.tz") @@ -401,11 +401,11 @@ let tests = "5" "120"); Tztest.tztest - "test lambda_rec instruction with an infinite recursion" + "lambda_rec instruction with an infinite recursion" `Quick (test_contract_fail (path // "contracts/omega.tz") "Unit" "Unit"); Tztest.tztest - "test lambda_rec instruction storage" + "lambda_rec instruction storage" `Quick (test_store_and_reload (path // "contracts/rec_fact_store.tz") @@ -424,7 +424,7 @@ let tests = ~param_2:"5" ~expected_storage_str_2:"Left 120"); Tztest.tztest - "test lambda_rec instruction storage apply store" + "lambda_rec instruction storage apply store" `Quick (test_store_and_reload (path // "contracts/rec_fact_apply_store.tz") @@ -452,3 +452,7 @@ let tests = ~expected_storage_str_2:"Left 120"); ] @ error_encoding_tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("interpretation", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_lambda_normalization.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_lambda_normalization.ml index ab940088a9cf2239b0ef3bd115e79b040661b2ed..2bcd8f3eddb7628f2471485897bbdaa4be332380 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_lambda_normalization.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_lambda_normalization.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (Michelson) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^lambda normalization" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_lambda_normalization.ml Subject: Test that lambdas are normalized to optimized format at elaboration *) @@ -229,7 +228,11 @@ let test_lambda_normalization () = let tests = [ Tztest.tztest - "Test that lambdas are normalized to optimized format during elaboration" + "lambdas are normalized to optimized format during elaboration" `Quick test_lambda_normalization; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("lambda normalization", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml index 03a84159c6b24ab6a7c4446adfd30b9dd8b1338d..7cd63c37976b51670fc3e28aa1d16f6a9723b52c 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml @@ -23,6 +23,14 @@ (* *) (*****************************************************************************) +(** Testing + ------- + Component: Protocol (Michelson) + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_lazy_storage_diff.ml + Subject: Test lazy storage +*) + open Protocol (** Generation of input data *) @@ -138,3 +146,7 @@ let tests = Tztest.tztest "conversion roundtrip" `Slow (on_diffs conversion_roundtrip); Tztest.tztest "encoding roundtrip" `Slow (on_diffs encoding_roundtrip); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("lazy storage diff", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_main.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_main.ml deleted file mode 100644 index c15c04dd7d4d2c26cee14931bb6cad0460d657ff..0000000000000000000000000000000000000000 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_main.ml +++ /dev/null @@ -1,64 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune runtest src/proto_alpha/lib_protocol/test/integration/michelson - Subject: Integration > Michelson -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > michelson" - [ - ( Protocol.name ^ ": global table of constants", - Test_global_constants_storage.tests ); - (Protocol.name ^ ": interpretation", Test_interpretation.tests); - (Protocol.name ^ ": lazy storage diff", Test_lazy_storage_diff.tests); - (Protocol.name ^ ": sapling", Test_sapling.tests); - (Protocol.name ^ ": script typed ir size", Test_script_typed_ir_size.tests); - (Protocol.name ^ ": temp big maps", Test_temp_big_maps.tests); - (Protocol.name ^ ": ticket balance key", Test_ticket_balance_key.tests); - (Protocol.name ^ ": ticket scanner", Test_ticket_scanner.tests); - (Protocol.name ^ ": ticket storage", Test_ticket_storage.tests); - ( Protocol.name ^ ": ticket lazy storage diff", - Test_ticket_lazy_storage_diff.tests ); - ( Protocol.name ^ ": ticket operations diff", - Test_ticket_operations_diff.tests ); - (Protocol.name ^ ": ticket accounting", Test_ticket_accounting.tests); - (Protocol.name ^ ": ticket balance", Test_ticket_balance.tests); - (Protocol.name ^ ": ticket manager", Test_ticket_manager.tests); - (Protocol.name ^ ": typechecking", Test_typechecking.tests); - (Protocol.name ^ ": script cache", Test_script_cache.tests); - ( Protocol.name ^ ": block time instructions", - Test_block_time_instructions.tests ); - (Protocol.name ^ ": annotations", Test_annotations.tests); - (Protocol.name ^ ": event logging", Test_contract_event.tests); - (Protocol.name ^ ": patched contracts", Test_patched_contracts.tests); - (Protocol.name ^ ": lambda normalization", Test_lambda_normalization.tests); - ] - |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_patched_contracts.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_patched_contracts.ml index eb6873547f4f877763ec964aada5c8e57a573d33..98d194e53b9719c7b6c44b7ed4e3346591f32d9f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_patched_contracts.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_patched_contracts.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Migration (patched scripts) - Invocation: cd src/proto_alpha/lib_protocol/test/integration/michelson - dune exec ./main.exe -- test "^patched contracts$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_patched_contracts.ml Subject: Migration *) @@ -216,3 +216,7 @@ let tests = let module Test = Legacy_patch_test (Patches) in List.concat_map Test.tests Patches.patches) test_modules + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("patched contracts", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_sapling.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_sapling.ml index 549db4f0f3b347a99c0fb39f9abc94017e92e97b..f91fe3152cb03a001b9ccda0ff90ecb44088e98e 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_sapling.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_sapling.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (Sapling) - Invocation: cd src/proto_alpha/lib_protocol/test/integration/michelson && \ - dune exec ./main.exe -- test "^sapling$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_sapling.ml Subject: On the privacy-preserving library Sapling *) @@ -1181,38 +1181,32 @@ let tests = `Quick Raw_context_tests.list_insertion_test; Tztest.tztest "root" `Quick Raw_context_tests.root_test; + Tztest.tztest "get_memo_size" `Quick Raw_context_tests.test_get_memo_size; + Tztest.tztest "verify_memo" `Quick Alpha_context_tests.test_verify_memo; + Tztest.tztest "bench_phases" `Slow Alpha_context_tests.test_bench_phases; Tztest.tztest - "test_get_memo_size" - `Quick - Raw_context_tests.test_get_memo_size; - Tztest.tztest "test_verify_memo" `Quick Alpha_context_tests.test_verify_memo; - Tztest.tztest - "test_bench_phases" - `Slow - Alpha_context_tests.test_bench_phases; - Tztest.tztest - "test_bench_phases_legacy" + "bench_phases_legacy" `Quick Alpha_context_tests.test_bench_phases_legacy; Tztest.tztest - "test_bench_fold_over_same_token" + "bench_fold_over_same_token" `Slow Alpha_context_tests.test_bench_fold_over_same_token; Tztest.tztest - "test_double_spend_same_input" + "double_spend_same_input" `Quick Alpha_context_tests.test_double_spend_same_input; Tztest.tztest - "test_verifyupdate_one_transaction" + "verifyupdate_one_transaction" `Quick Alpha_context_tests.test_verifyupdate_one_transaction; Tztest.tztest - "test_verifyupdate_two_transactions" + "verifyupdate_two_transactions" `Quick Alpha_context_tests.test_verifyupdate_two_transactions; - Tztest.tztest "test_shielded_tez" `Quick Interpreter_tests.test_shielded_tez; + Tztest.tztest "shielded_tez" `Quick Interpreter_tests.test_shielded_tez; Tztest.tztest - "test use state from other contract and transact" + "use state from other contract and transact" `Quick Interpreter_tests.test_use_state_from_other_contract_and_transact; Tztest.tztest @@ -1220,10 +1214,13 @@ let tests = `Quick Interpreter_tests.test_push_sapling_state_should_be_forbidden; Tztest.tztest - "test_transac_and_block" + "transac_and_block" `Quick Interpreter_tests.test_transac_and_block; - Tztest.tztest "test_drop" `Quick Interpreter_tests.test_drop; - Tztest.tztest "test_double" `Quick Interpreter_tests.test_double; - Tztest.tztest "test_state_as_arg" `Quick Interpreter_tests.test_state_as_arg; + Tztest.tztest "drop" `Quick Interpreter_tests.test_drop; + Tztest.tztest "double" `Quick Interpreter_tests.test_double; + Tztest.tztest "state_as_arg" `Quick Interpreter_tests.test_state_as_arg; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sapling", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_script_cache.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_script_cache.ml index 1e7851e8ce631c789bc69ec99a2acda530d46b82..0c80d333454e966195a6630ae8cd4b34d6fb82fa 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_script_cache.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_script_cache.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (cache) - Invocation: cd src/proto_alpha/lib_protocol/test/integration/michelson && \ - dune exec ./main.exe -- test "^script cache$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_script_cache.ml Subject: These unit tests check basic behavior of script cache *) @@ -435,3 +435,7 @@ let tests = test_size_limit_is_in_constants_repr; tztest "entries show LRU behavior" `Quick test_entries_shows_lru; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("script cache", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml index 7c07edc87de8f2b81f0a302ca507676e17fd3558..2e437f1ee0df2c4774fa10a60a98d04229ca0f51 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (script typed IR size) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^script typed ir size$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_script_typed_ir_size.ml Subject: Script_typed_ir computes good approximation of values' sizes *) @@ -1042,9 +1041,13 @@ let check_micheline_sizes () = let tests = let open Tztest in [ - tztest "check value size" `Quick check_value_size; - tztest "check ty size" `Quick check_ty_size; - tztest "check kinstr size" `Quick check_kinstr_size; - tztest "check witness sizes" `Quick check_witness_sizes; - tztest "check micheline sizes" `Quick check_micheline_sizes; + tztest "value size" `Quick check_value_size; + tztest "ty size" `Quick check_ty_size; + tztest "kinstr size" `Quick check_kinstr_size; + tztest "witness sizes" `Quick check_witness_sizes; + tztest "micheline sizes" `Quick check_micheline_sizes; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("script typed ir size", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_temp_big_maps.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_temp_big_maps.ml index 8a073ce9bc63bbebfa9f2e230360bb96fd4046f5..fe2948beeecdd0bd3d7376f4d2c0c08b1e665d23 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_temp_big_maps.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_temp_big_maps.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (temporary big maps) - Invocation: cd src/proto_alpha/lib_protocol/test/integration/michelson \ - && dune exec ./main.exe -- test "^temp big maps$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_temp_big_maps.ml Subject: On temporary big maps. *) @@ -101,3 +101,7 @@ let tests = (test_temp_big_maps_contract param_left param_right)) param_right_values) param_left_values) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("temp big maps", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_accounting.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_accounting.ml index e81ecd23861be651ce0c9aa1206effc08c29ba5a..96c3e4b1299e371d3c1148531f81e4ba004d5d04 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_accounting.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_accounting.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^ticket accounting" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_accounting.ml Subject: Ticket scanner tests *) @@ -1436,7 +1435,11 @@ let tests = `Quick test_update_self_origination; Tztest.tztest - "Test ticket-token map with duplicate keys" + "ticket-token map with duplicate keys" `Quick test_ticket_token_map_of_list_with_duplicates; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket accounting", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_balance.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_balance.ml index d01b5833493cef096ee107f898aff92858b61021..1383c45f2dbf75b1fe8e2a1be06702b638a3d4f4 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_balance.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_balance.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_balance_key) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^ticket balance" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_balance.ml Subject: Ticket balance key hashing *) @@ -1758,34 +1757,35 @@ let test_storage_for_create_and_remove_tickets () = let tests = [ - Tztest.tztest "Test add strict" `Quick test_add_strict; - Tztest.tztest "Test add and remove" `Quick test_add_remove; - Tztest.tztest "Test add to big-map" `Quick test_add_to_big_map; - Tztest.tztest "Test swap big-map" `Quick test_swap_big_map; - Tztest.tztest "Test send ticket" `Quick test_send_tickets; + Tztest.tztest "add strict" `Quick test_add_strict; + Tztest.tztest "add and remove" `Quick test_add_remove; + Tztest.tztest "add to big-map" `Quick test_add_to_big_map; + Tztest.tztest "swap big-map" `Quick test_swap_big_map; + Tztest.tztest "send ticket" `Quick test_send_tickets; Tztest.tztest - "Test send ticket to implicit" + "send ticket to implicit" `Quick test_send_tickets_to_implicit_account; Tztest.tztest - "Test send and store tickets with amount 0" + "send and store tickets with amount 0" `Quick test_send_and_store_zero_amount_tickets; + Tztest.tztest "send tickets in big-map" `Quick test_send_tickets_in_big_map; + Tztest.tztest "modify big-map" `Quick test_modify_big_map; + Tztest.tztest "send drop" `Quick test_send_tickets_in_big_map_and_drop; Tztest.tztest - "Test send tickets in big-map" - `Quick - test_send_tickets_in_big_map; - Tztest.tztest "Test modify big-map" `Quick test_modify_big_map; - Tztest.tztest "Test send drop" `Quick test_send_tickets_in_big_map_and_drop; - Tztest.tztest - "Test create contract with ticket" + "create contract with ticket" `Quick test_create_contract_with_ticket; - Tztest.tztest "Test join" `Quick test_join_tickets; - Tztest.tztest "Test wallet" `Quick test_ticket_wallet; - Tztest.tztest "Test ticket storage" `Quick test_ticket_storage; + Tztest.tztest "join" `Quick test_join_tickets; + Tztest.tztest "wallet" `Quick test_ticket_wallet; + Tztest.tztest "ticket storage" `Quick test_ticket_storage; Tztest.tztest - "Test storage for create and remove tickets" + "storage for create and remove tickets" `Quick test_storage_for_create_and_remove_tickets; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket balance", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml index 02b23a232a120a92ed9a62bd0d169b4766834cc4..a9604351a557c57211401a1aaaea4443ee5ce13a 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_balance_key) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^ticket balance key" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_balance_key.ml Subject: Ticket balance key hashing *) @@ -427,30 +426,28 @@ let test_option_some () = let tests = [ - Tztest.tztest "Test different ticketers" `Quick test_different_ticketers; - Tztest.tztest "Test different owners" `Quick test_different_owners; - Tztest.tztest "Test different content" `Quick test_different_content; - Tztest.tztest "Test different amounts" `Quick test_different_amounts; - Tztest.tztest "Test nat int" `Quick test_nat_int; - Tztest.tztest "Test nat mutez" `Quick test_nat_mutez; - Tztest.tztest "Test not bool" `Quick test_bool_nat; - Tztest.tztest "Test nat bytes" `Quick test_nat_bytes; - Tztest.tztest "Test string chain_id" `Quick test_string_chain_id; - Tztest.tztest "Test string key_hash" `Quick test_string_key_hash; - Tztest.tztest "Test string timestamp" `Quick test_string_timestamp; - Tztest.tztest "Test string address" `Quick test_string_address; - Tztest.tztest "Test string key" `Quick test_string_key; - Tztest.tztest "Test string signature" `Quick test_string_signature; - Tztest.tztest "Test annotations for pair" `Quick test_annotation_pair; - Tztest.tztest "Test annotations for or" `Quick test_annotation_or; - Tztest.tztest - "Test annotations for type alias" - `Quick - test_annotation_type_alias; - Tztest.tztest - "Test annotations for paired ors" - `Quick - test_annotation_pair_or; - Tztest.tztest "Test option none" `Quick test_option_none; - Tztest.tztest "Test option some" `Quick test_option_some; + Tztest.tztest "different ticketers" `Quick test_different_ticketers; + Tztest.tztest "different owners" `Quick test_different_owners; + Tztest.tztest "different content" `Quick test_different_content; + Tztest.tztest "different amounts" `Quick test_different_amounts; + Tztest.tztest "nat int" `Quick test_nat_int; + Tztest.tztest "nat mutez" `Quick test_nat_mutez; + Tztest.tztest "not bool" `Quick test_bool_nat; + Tztest.tztest "nat bytes" `Quick test_nat_bytes; + Tztest.tztest "string chain_id" `Quick test_string_chain_id; + Tztest.tztest "string key_hash" `Quick test_string_key_hash; + Tztest.tztest "string timestamp" `Quick test_string_timestamp; + Tztest.tztest "string address" `Quick test_string_address; + Tztest.tztest "string key" `Quick test_string_key; + Tztest.tztest "string signature" `Quick test_string_signature; + Tztest.tztest "annotations for pair" `Quick test_annotation_pair; + Tztest.tztest "annotations for or" `Quick test_annotation_or; + Tztest.tztest "annotations for type alias" `Quick test_annotation_type_alias; + Tztest.tztest "annotations for paired ors" `Quick test_annotation_pair_or; + Tztest.tztest "option none" `Quick test_option_none; + Tztest.tztest "option some" `Quick test_option_some; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket balance key", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml index fbf5d8d6fc5ef8ef1a472f1a72ac78e2f9a6136b..efb7cc9d67b035797155ffb6c6220511ae6cf37c 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml @@ -27,9 +27,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^ticket lazy storage diff" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_lazy_storage_diff.ml Subject: Ticket scanner tests *) @@ -662,38 +661,36 @@ let test_mix_lazy_diffs () = let tests = [ - Tztest.tztest "Test allocate new empty" `Quick test_allocate_new_empty; - Tztest.tztest "Test allocate new" `Quick test_allocate_new; - Tztest.tztest - "Test allocate new no tickets" - `Quick - test_allocate_new_no_tickets; + Tztest.tztest "allocate new empty" `Quick test_allocate_new_empty; + Tztest.tztest "allocate new" `Quick test_allocate_new; + Tztest.tztest "allocate new no tickets" `Quick test_allocate_new_no_tickets; Tztest.tztest "Remove" `Quick test_remove_big_map; Tztest.tztest - "Test no updates to existing" + "no updates to existing" `Quick test_no_updates_to_existing_big_map; + Tztest.tztest "update existing big-map" `Quick test_update_existing_big_map; Tztest.tztest - "Test update existing big-map" - `Quick - test_update_existing_big_map; - Tztest.tztest - "Test update same key multiple times on existing big-map" + "update same key multiple times on existing big-map" `Quick test_update_same_key_multiple_times_existing_big_map; Tztest.tztest - "Test remove same key multiple times on existing big-map" + "remove same key multiple times on existing big-map" `Quick test_remove_same_key_multiple_times_existing_big_map; Tztest.tztest - "Test update and remove same key multiple times on existing big-map" + "update and remove same key multiple times on existing big-map" `Quick test_update_and_remove_same_key_multiple_times_existing_big_map; - Tztest.tztest "Test copy" `Quick test_copy_big_map; - Tztest.tztest "Test copy with updates" `Quick test_copy_big_map_with_updates; + Tztest.tztest "copy" `Quick test_copy_big_map; + Tztest.tztest "copy with updates" `Quick test_copy_big_map_with_updates; Tztest.tztest - "Test copy with multiple updates to same key" + "copy with multiple updates to same key" `Quick test_copy_big_map_with_updates_to_same_key; - Tztest.tztest "Test mix lazy diffs" `Quick test_mix_lazy_diffs; + Tztest.tztest "mix lazy diffs" `Quick test_mix_lazy_diffs; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket lazy storage diff", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_manager.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_manager.ml index c0edcbe1c86e921ce5c39536b05ee0ac5e80bb48..0cbe158dd967db996a9f94e3e323623c3cbeffcf 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_manager.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_manager.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_balance_key) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^ticket manager" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_manager.ml Subject: Tests that compare the ticket-balance table against tickets in the contract storages. The tests include a lot of operations that sends and store tickets. After each operation we check that the @@ -812,3 +811,7 @@ let tests = test_add_remove_from_lazy_storage; Tztest.tztest "Mix of operations" `Quick test_mixed_operations; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket manager", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml index 9feaa831753107f709cc6dbdec7bde94b8a8c125..bc68ab8577affcb89a5aa60e96a2c93884462153 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^ticket operations diff" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_operations_diff.ml Subject: Ticket scanner tests *) @@ -1271,72 +1270,73 @@ let test_fail_on_zero_amount_tickets () = let tests = [ Tztest.tztest - "Test operations that do not involve tickets" + "operations that do not involve tickets" `Quick test_non_ticket_operations; Tztest.tztest - "Test transfer to non-ticket contract" + "transfer to non-ticket contract" `Quick test_transfer_to_non_ticket_contract; Tztest.tztest - "Test transfer empty ticket list" + "transfer empty ticket list" `Quick test_transfer_empty_ticket_list; - Tztest.tztest "Test transfer one ticket" `Quick test_transfer_one_ticket; + Tztest.tztest "transfer one ticket" `Quick test_transfer_one_ticket; Tztest.tztest - "Test transfer multiple tickets" + "transfer multiple tickets" `Quick test_transfer_multiple_tickets; Tztest.tztest - "Test transfer different tickets" + "transfer different tickets" `Quick test_transfer_different_tickets; Tztest.tztest - "Test transfer to two contracts with different tickets" + "transfer to two contracts with different tickets" `Quick test_transfer_to_two_contracts_with_different_tickets; Tztest.tztest - "Test originate contract that does not contain tickets" + "originate contract that does not contain tickets" `Quick test_originate_non_ticket_contract; Tztest.tztest - "Test originate with empty ticket list" + "originate with empty ticket list" `Quick test_originate_with_empty_tickets_list; Tztest.tztest - "Test originate with one ticket" + "originate with one ticket" `Quick test_originate_with_one_ticket; Tztest.tztest - "Test originate with multiple tickets" + "originate with multiple tickets" `Quick test_originate_with_multiple_tickets; Tztest.tztest - "Test originate with different tickets" + "originate with different tickets" `Quick test_originate_with_different_tickets; Tztest.tztest - "Test originate two contracts with different tickets" + "originate two contracts with different tickets" `Quick test_originate_two_contracts_with_different_tickets; + Tztest.tztest "originate and transfer" `Quick test_originate_and_transfer; Tztest.tztest - "Test originate and transfer" - `Quick - test_originate_and_transfer; - Tztest.tztest - "Test originate big-map with tickets" + "originate big-map with tickets" `Quick test_originate_big_map_with_tickets; Tztest.tztest - "Test transfer big-map with tickets" + "transfer big-map with tickets" `Quick test_transfer_big_map_with_tickets; Tztest.tztest - "Test transfer fails on multiple zero tickets" + "transfer fails on multiple zero tickets" `Quick test_transfer_fails_on_multiple_zero_tickets; Tztest.tztest - "Test fail in zero-amount tickets" + "fail in zero-amount tickets" `Quick test_fail_on_zero_amount_tickets; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket operations diff", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_scanner.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_scanner.ml index 27cdf80d8478b3f2971d7ff569063e6e6da32e25..8397f187d9fd3d3cf9547f49a103f8e9d753ac20 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_scanner.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_scanner.ml @@ -27,9 +27,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^ticket scanner" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_scanner.ml Subject: Ticket scanner tests *) @@ -634,67 +633,67 @@ let test_tickets_remove_overlay_in_non_empty_in_big_map_ref () = let tests = [ + Tztest.tztest "tickets in unit ticket" `Quick test_tickets_in_unit_ticket; + Tztest.tztest "tickets in list" `Quick test_tickets_in_list; Tztest.tztest - "Test tickets in unit ticket" - `Quick - test_tickets_in_unit_ticket; - Tztest.tztest "Test tickets in list" `Quick test_tickets_in_list; - Tztest.tztest - "Test tickets in list with zero amount" + "tickets in list with zero amount" `Quick test_tickets_in_list_with_zero_amount; - Tztest.tztest "Test tickets in pair" `Quick test_tickets_in_pair; + Tztest.tztest "tickets in pair" `Quick test_tickets_in_pair; Tztest.tztest - "Test tickets in pair with zero amount" + "tickets in pair with zero amount" `Quick test_tickets_in_pair_with_zero_amount; - Tztest.tztest "Test tickets in map" `Quick test_tickets_in_map; + Tztest.tztest "tickets in map" `Quick test_tickets_in_map; Tztest.tztest - "Test tickets in map with zero amount" + "tickets in map with zero amount" `Quick test_tickets_in_map_with_zero_amount; - Tztest.tztest "Test tickets in big map" `Quick test_tickets_in_big_map; + Tztest.tztest "tickets in big map" `Quick test_tickets_in_big_map; Tztest.tztest - "Test tickets in big map with include lazy set to false" + "tickets in big map with include lazy set to false" `Quick test_tickets_in_big_map_strict_only; Tztest.tztest - "Test tickets in list in big map" + "tickets in list in big map" `Quick test_tickets_in_list_in_big_map; Tztest.tztest - "Test tickets in a pair of big-map and list with include lazy set to \ - false" + "tickets in a pair of big-map and list with include lazy set to false" `Quick test_tickets_in_pair_big_map_and_list_strict_only; - Tztest.tztest "Test tickets in or left" `Quick test_tickets_in_or_left; + Tztest.tztest "tickets in or left" `Quick test_tickets_in_or_left; Tztest.tztest - "Test tickets in or left with zero amount" + "tickets in or left with zero amount" `Quick test_tickets_in_or_left_with_zero_amount; - Tztest.tztest "Test tickets in or right" `Quick test_tickets_in_or_right; + Tztest.tztest "tickets in or right" `Quick test_tickets_in_or_right; Tztest.tztest - "Test tickets in empty big-map ref" + "tickets in empty big-map ref" `Quick test_tickets_overlay_in_empty_big_map_ref; Tztest.tztest - "Test tickets in big-map ref" + "tickets in big-map ref" `Quick test_tickets_in_empty_big_map_ref; Tztest.tztest - "Test tickets in non-empty big-map ref" + "tickets in non-empty big-map ref" `Quick test_tickets_in_non_empty_big_map_ref; Tztest.tztest - "Test tickets in non-empty big-map ref with overlay" + "tickets in non-empty big-map ref with overlay" `Quick test_tickets_overlay_in_non_empty_in_big_map_ref; Tztest.tztest - "Test tickets replace existing value from overlay" + "tickets replace existing value from overlay" `Quick test_tickets_replace_overlay_in_non_empty_in_big_map_ref; Tztest.tztest - "Test tickets remove existing value from overlay" + "tickets remove existing value from overlay" `Quick test_tickets_remove_overlay_in_non_empty_in_big_map_ref; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket scanner", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_storage.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_storage.ml index 4f1ab85ebed03fd08846bfdcc0522c8a13ec1438..72bc85e3b258267051b0b5fcef7b95d4d9e7e31f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_storage.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_ticket_storage.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (Alpha_context.Ticket_balance) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ - -- test "^ticket storage$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_storage.ml Subject: Ticket storage functions tested using the Ticket_balance module in Alpha_context. *) @@ -275,3 +274,7 @@ let tests = test_ticket_balance_different_owners; Tztest.tztest "ticket storage space" `Quick test_storage_space; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket storage", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_typechecking.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_typechecking.ml index 0373dca0b3e09ad87cc656cc76ef29671b03c938..1f7444fa7a7be0f1770f7e840733f30ff32b1a1e 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_typechecking.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/test_typechecking.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (type-checking) - Invocation: cd src/proto_alpha/lib_protocol/test/integration/michelson && \ - dune exec ./main.exe -- test "^typechecking$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_typechecking.ml Subject: Type-checking *) @@ -873,59 +873,63 @@ let test_contract_failure path = let tests = [ - Tztest.tztest "test unparse view" `Quick test_unparse_view; + Tztest.tztest "unparse view" `Quick test_unparse_view; Tztest.tztest - "test typecheck stack overflow error" + "typecheck stack overflow error" `Quick test_typecheck_stack_overflow; - Tztest.tztest "test comb type parsing" `Quick test_parse_comb_type; - Tztest.tztest "test comb type unparsing" `Quick test_unparse_comb_type; + Tztest.tztest "comb type parsing" `Quick test_parse_comb_type; + Tztest.tztest "comb type unparsing" `Quick test_unparse_comb_type; Tztest.tztest - "test comb comparable type unparsing" + "comb comparable type unparsing" `Quick test_unparse_comb_comparable_type; - Tztest.tztest "test comb data parsing" `Quick test_parse_comb_data; - Tztest.tztest "test comb data unparsing" `Quick test_unparse_comb_data; - Tztest.tztest "test optimal comb data unparsing" `Quick test_optimal_comb; - Tztest.tztest "test parse address" `Quick test_parse_address; + Tztest.tztest "comb data parsing" `Quick test_parse_comb_data; + Tztest.tztest "comb data unparsing" `Quick test_unparse_comb_data; + Tztest.tztest "optimal comb data unparsing" `Quick test_optimal_comb; + Tztest.tztest "parse address" `Quick test_parse_address; Tztest.tztest "test unpackability of the contract type" `Quick test_contract_not_packable; Tztest.tztest - "test forbidden SELF in view" + "forbidden SELF in view" `Quick (test_forbidden_op_in_view "SELF"); Tztest.tztest - "test forbidden SET_DELEGATE in view" + "forbidden SET_DELEGATE in view" `Quick (test_forbidden_op_in_view "SET_DELEGATE"); Tztest.tztest - "test forbidden TRANSFER_TOKENS in view" + "forbidden TRANSFER_TOKENS in view" `Quick (test_forbidden_op_in_view "TRANSFER_TOKENS"); Tztest.tztest - "test forbidden CREATE_CONTRACT in view" + "forbidden CREATE_CONTRACT in view" `Quick (test_forbidden_op_in_view "CREATE_CONTRACT"); Tztest.tztest - "test parse contract data for rollup" + "parse contract data for rollup" `Quick test_parse_contract_data_for_unit_rollup; Tztest.tztest - "test parse contract data for rollup with entrypoint invalid type" + "parse contract data for rollup with entrypoint invalid type" `Quick test_parse_contract_data_for_rollup_with_invalid_type; Tztest.tztest - "test lambda_rec instruction" + "lambda_rec instruction" `Quick (test_contract_success (path // "contracts/rec_fact.tz")); Tztest.tztest - "test lambda_rec instruction with apply" + "lambda_rec instruction with apply" `Quick (test_contract_success (path // "contracts/rec_fact_apply.tz")); Tztest.tztest - "test lambda_rec with type error" + "lambda_rec with type error" `Quick (test_contract_failure (path // "contracts/fail_rec.tz")); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("typechecking", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/dune b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/dune index a0d3ffd577a39081c98ab41be0ce260a2b9fce16..1fb2146fd6a062b744ca831b6f0136cbcd758424 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/dune @@ -28,7 +28,6 @@ -open Tezos_base_test_helpers -open Tezos_protocol_plugin_017_PtNairob) (modules - test_main test_activation test_combined_operations test_failing_noop diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_activation.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_activation.ml index 5f6e34a3046ef35519022764154b9e391336ba9d..0e415f400cfb052a528acc7633404687c34840a7 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_activation.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_activation.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (activation) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^activation$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_activation.ml Subject: The activation operation creates an implicit contract from a registered commitment present in the context. It is parametrized by a public key hash (pkh) and a secret. @@ -573,3 +572,7 @@ let tests = `Quick test_invalid_transfer_from_unactivated_account; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("activation", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_combined_operations.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_combined_operations.ml index 8fc28644d5da08b44feda6dd38b4ceb073a4dcd7..7a60229cf5fce30ba86fc83088edc69926c2e120 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_combined_operations.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_combined_operations.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (combined operations) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^combined$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_combined_operations.ml Subject: Multiple operations can be grouped in one ensuring their deterministic application. @@ -409,3 +408,6 @@ let tests = `Quick test_inconsistent_counters; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("combined", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_failing_noop.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_failing_noop.ml index 917fe3dec5f429d2ce65d8d48b7278aad45bf027..9a254c2f55fc24b70f04d6126e0880d29a869fd4 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_failing_noop.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_failing_noop.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^failing_noop operation$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_failing_noop.ml Subject: The Failing_noop operation was added bearing in mind the possibility for the end user to sign arbitrary bytes, encapsulate in the operation, with the absolute garanty that @@ -49,3 +48,7 @@ let failing_noop_must_fail_when_injected () = let tests = [Tztest.tztest "injection fails" `Quick failing_noop_must_fail_when_injected] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("failling_noop operation", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_main.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_main.ml deleted file mode 100644 index d0723c88dd7fa2f4ebf9f3f0a8f7ca504f611fe1..0000000000000000000000000000000000000000 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_main.ml +++ /dev/null @@ -1,52 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune runtest src/proto_alpha/lib_protocol/test/integration/operations - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > operations" - [ - (Protocol.name ^ ": voting", Test_voting.tests); - (Protocol.name ^ ": origination", Test_origination.tests); - (Protocol.name ^ ": revelation", Test_reveal.tests); - (Protocol.name ^ ": transfer", Test_transfer.tests); - (Protocol.name ^ ": activation", Test_activation.tests); - ( Protocol.name ^ ": paid storage increase", - Test_paid_storage_increase.tests ); - (Protocol.name ^ ": combined", Test_combined_operations.tests); - (Protocol.name ^ ": failing_noop operation", Test_failing_noop.tests); - (Protocol.name ^ ": sc rollup", Test_sc_rollup.tests); - (Protocol.name ^ ": sc rollup transfer", Test_sc_rollup_transfer.tests); - (Protocol.name ^ ": zk rollup", Test_zk_rollup.tests); - (Protocol.name ^ ": transfer ticket", Test_transfer_ticket.tests); - ] - |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_origination.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_origination.ml index 8531dfe0b5d62fb17b6953261f957458b3ca80fb..f236fafb1fd75e9269d9070cd2930c8884ff93eb 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_origination.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_origination.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (origination) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^origination$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_origination.ml Subject: On originating contracts. *) @@ -326,3 +325,7 @@ let tests = Tztest.tztest "counter" `Quick test_counter; Tztest.tztest "unparsable script" `Quick test_unparsable_script; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("origination", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_paid_storage_increase.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_paid_storage_increase.ml index f233834607ebff63d2fe98d6d1434a332ff656c3..73401e05237faf3c781b111669b7475dcab312bc 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_paid_storage_increase.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_paid_storage_increase.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (increase_paid_storage) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^paid storage increase$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_paid_storage_increase.ml Subject: On increasing a paid amount of contract storage. *) @@ -245,3 +244,7 @@ let tests = Tztest.tztest "no contract to bump its paid storage" `Quick test_no_contract; Tztest.tztest "effectiveness" `Quick test_effectiveness; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("paid storage increase", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_reveal.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_reveal.ml index c4179f275bda7848ef65ed3152bd2275145a8c17..71c61091d4c6fd8771a89f38cadd5f539d5498c8 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_reveal.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_reveal.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (revelation) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^revelation$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_reveal.ml Subject: On the reveal operation. *) @@ -747,3 +746,7 @@ let tests = `Quick test_valid_reveal_after_emptying_balance; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("revelation", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_sc_rollup.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_sc_rollup.ml index 4dafa2e1d73926f6ed8ef9c71185e89d584a72b9..cd0d4d50cd3d0aaeaf581b0417095eaca0f3ec6f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_sc_rollup.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_sc_rollup.ml @@ -27,9 +27,8 @@ (** Testing ------- Component: Rollup layer 1 logic - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^sc rollup$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_sc_rollup.ml Subject: Test smart contract rollup *) @@ -3488,13 +3487,13 @@ let tests = `Quick test_inbox_max_number_of_messages_per_level; Tztest.tztest - "Test that a player can't timeout another player before timeout period \ - and related timeout value." + "a player can't timeout another player before timeout period and related \ + timeout value." `Quick test_timeout; Tztest.tztest - "Test that a player cannot play more than max_number_of_parallel_games \ - games in parallel." + "a player cannot play more than max_number_of_parallel_games games in \ + parallel." `Quick test_number_of_parallel_games_bounded; Tztest.tztest @@ -3518,17 +3517,17 @@ let tests = `Quick test_refute_invalid_reveal; Tztest.tztest - "Test that SOL/Info_per_level/EOL are added in the inbox" + "SOL/Info_per_level/EOL are added in the inbox" `Quick test_automatically_added_internal_messages; Tztest.tztest "0-tick commitments are forbidden" `Quick test_zero_tick_commitment_fails; - Tztest.tztest "check the curfew functionality" `Quick test_curfew; + Tztest.tztest "the curfew functionality" `Quick test_curfew; Tztest.tztest - "check that a commitment can be published after the inbox_level + \ - challenge window is passed." + "a commitment can be published after the inbox_level + challenge window \ + is passed." `Quick test_curfew_period_is_started_only_after_first_publication; Tztest.tztest @@ -3553,3 +3552,7 @@ let tests = `Quick test_start_game_on_cemented_commitment; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml index 2c9e888f206363a10773aa7be3bd56fb28631bb8..c9bf05adf368a15d281bd1bed79b11552d415c2f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Sc rollup L1/L2 communication - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^sc rollup transfer$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_sc_rollup_transfer.ml Subject: Test transfers from Michelson to smart contract rollups *) @@ -428,3 +427,7 @@ let tests = `Quick test_transfer_non_zero_amount_ticket; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup transfer", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_transfer.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_transfer.ml index 7e593a27adefa8969c658a0e75046b7a193c5065..b734e3b1fa43e7cbdaf23c5435e2ba8a4f746aa3 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_transfer.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_transfer.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (transfer) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^transfer$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_transfer.ml Subject: Quantities transfer between contracts. *) @@ -906,3 +905,6 @@ let tests = `Quick test_storage_fees_and_internal_operation; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("transfer", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_transfer_ticket.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_transfer_ticket.ml index 0da857bb355f065664a3740341b7ba50d64d7d14..954248ef96e2e20b34dd15181c939a5db4b6c8cd 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_transfer_ticket.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_transfer_ticket.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Transfer_ticket logic - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^transfer ticket$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_transfer_ticket.ml Subject: Test ticket transfers *) @@ -318,11 +317,15 @@ let test_contract_as_ticket_transfer_destination () = let tests = [ Tztest.tztest - "Test ticket transfer operations" + "ticket transfer operations" `Quick test_mint_deposit_withdraw_implicit_transfer; Tztest.tztest - "Test 'contract (ticket cty)' as transfer destination" + "'contract (ticket cty)' as transfer destination" `Quick test_contract_as_ticket_transfer_destination; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("transfer ticket", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_voting.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_voting.ml index 46f377155405b6449a0885d1018cc909313f8651..426292840eab7c66611b6508ce91012a852f6de4 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_voting.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_voting.ml @@ -27,9 +27,8 @@ (** Testing ------- Component: Protocol (voting) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^voting$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_voting.ml Subject: On the voting process. *) @@ -2098,3 +2097,6 @@ let tests = test_conflicting_ballot; Tztest.tztest "Valid Ballot operations" `Quick test_valid_ballot; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("voting", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_zk_rollup.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_zk_rollup.ml index 87c9deb1be180623f485d9c6738f79b81b2e6fb0..7d15a2ec15ee08dda70f3888f582e6fe3bfc1c13 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_zk_rollup.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/test_zk_rollup.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Rollup layer 1 logic - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ - -- test "^zk rollup$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/operations/main.exe \ + -- --file test_zk_rollup.ml Subject: Test zk rollup *) @@ -1280,3 +1279,7 @@ let tests = `Quick test_valid_deposit_and_external_withdrawal; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("zk rollup", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/test_constants.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/test_constants.ml index 02169955d6e6f26180dd65815c13d174f04123ae..0a2a2e4e0b9ba627109f785276d8d66a701c7b0b 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/test_constants.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/test_constants.ml @@ -28,8 +28,8 @@ ------- Component: Protocol (baking) Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/main.exe \ - -- test "^constants$" + src/proto_017_PtNairob/lib_protocol/test/integration/main.exe \ + -- --file test_constants.ml Subject: the consistency of parametric constants *) @@ -210,8 +210,11 @@ let tests = `Quick test_sc_rollup_max_commitment_storage_size; Tztest.tztest - "test liquidity_baking_subsidy parameter is 1/16th of total baking \ - rewards" + "liquidity_baking_subsidy parameter is 1/16th of total baking rewards" `Quick liquidity_baking_subsidy_param; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("constants", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/test_frozen_bonds.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/test_frozen_bonds.ml index e094d2e082a6c2535d4a05de4c7508446e6d663e..bd07edfd342e43dabd95d57b4ec3fe707da7acbb 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/test_frozen_bonds.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/test_frozen_bonds.ml @@ -27,8 +27,8 @@ ------- Component: Protocol (token) Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/main.exe \ - -- test "^frozen bonds" + src/proto_017_PtNairob/lib_protocol/test/integration/main.exe \ + -- --file test_frozen_bonds.ml Subject: Frozen bonds applicable to contracts and part of their stake. *) @@ -673,27 +673,31 @@ let tests = tztest "frozen bonds - delegated balance" `Quick test_delegated_balance; tztest "frozen bonds - test rpcs" `Quick test_rpcs; tztest - "test: delegate, freeze, unfreeze, undelegate" + "delegate, freeze, unfreeze, undelegate" `Quick test_delegate_freeze_unfreeze_undelegate; tztest - "test: delegate, freeze, undelegate, unfreeze" + "delegate, freeze, undelegate, unfreeze" `Quick test_delegate_freeze_undelegate_unfreeze; tztest - "test: delegate, double freeze, undelegate, unfreeze" + "delegate, double freeze, undelegate, unfreeze" `Quick test_delegate_double_freeze_undelegate_unfreeze; tztest - "test: delegate, freeze, redelegate, unfreeze" + "delegate, freeze, redelegate, unfreeze" `Quick test_delegate_freeze_redelegate_unfreeze; tztest - "test: delegate, freeze, unfreeze, freeze, redelegate" + "delegate, freeze, unfreeze, freeze, redelegate" `Quick test_delegate_freeze_unfreeze_freeze_redelegate; tztest - "test: delegate, freeze, slash, undelegate" + "delegate, freeze, slash, undelegate" `Quick test_delegate_freeze_slash_undelegate; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("frozen bonds", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/test_liquidity_baking.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/test_liquidity_baking.ml index 44a37f8fdc50ea38ec9108ac63802259737872d1..8775217e279b2e1275d114c85441d79986e6404f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/test_liquidity_baking.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/test_liquidity_baking.ml @@ -27,8 +27,8 @@ ------- Component: liquidity baking Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/main.exe \ - -- test "^liquidity baking$" + src/proto_017_PtNairob/lib_protocol/test/integration/main.exe \ + -- --file test_liquidity_baking.ml Subject: Test liquidity baking subsidies, CPMM storage updates, and toggle vote. *) @@ -430,116 +430,120 @@ let liquidity_baking_origination_no_tzBTC_mainnet_migration () = let tests = [ Tztest.tztest - "test liquidity baking script hashes" + "liquidity baking script hashes" `Quick liquidity_baking_origination; Tztest.tztest - "test liquidity baking cpmm is originated at the expected address" + "liquidity baking cpmm is originated at the expected address" `Quick liquidity_baking_cpmm_address; Tztest.tztest "Init Context" `Quick generate_init_state; Tztest.tztest - "test liquidity baking subsidy is correct" + "liquidity baking subsidy is correct" `Quick (liquidity_baking_subsidies 64); Tztest.tztest - "test liquidity baking toggle vote with 100% of bakers voting LB_off \ - baking one block longer" + "liquidity baking toggle vote with 100% of bakers voting LB_off baking \ + one block longer" `Quick (liquidity_baking_toggle_100 1); Tztest.tztest - "test liquidity baking toggle vote with 100% of bakers voting LB_off \ - baking two blocks longer" + "liquidity baking toggle vote with 100% of bakers voting LB_off baking \ + two blocks longer" `Quick (liquidity_baking_toggle_100 2); Tztest.tztest - "test liquidity baking toggle vote with 100% of bakers voting LB_off \ - baking 100 blocks longer" + "liquidity baking toggle vote with 100% of bakers voting LB_off baking \ + 100 blocks longer" `Quick (liquidity_baking_toggle_100 100); Tztest.tztest - "test liquidity baking toggle vote with 80% of bakers voting LB_off \ - baking one block longer" + "liquidity baking toggle vote with 80% of bakers voting LB_off baking \ + one block longer" `Quick (liquidity_baking_toggle_80 1); Tztest.tztest - "test liquidity baking toggle vote with 80% of bakers voting LB_off \ - baking two blocks longer" + "liquidity baking toggle vote with 80% of bakers voting LB_off baking \ + two blocks longer" `Quick (liquidity_baking_toggle_80 2); Tztest.tztest - "test liquidity baking toggle vote with 80% of bakers voting LB_off \ - baking 100 blocks longer" + "liquidity baking toggle vote with 80% of bakers voting LB_off baking \ + 100 blocks longer" `Quick (liquidity_baking_toggle_80 100); Tztest.tztest - "test liquidity baking toggle vote with 60% of bakers voting LB_off \ - baking one block longer" + "liquidity baking toggle vote with 60% of bakers voting LB_off baking \ + one block longer" `Quick (liquidity_baking_toggle_60 1); Tztest.tztest - "test liquidity baking toggle vote with 60% of bakers voting LB_off \ - baking two blocks longer" + "liquidity baking toggle vote with 60% of bakers voting LB_off baking \ + two blocks longer" `Quick (liquidity_baking_toggle_60 2); Tztest.tztest - "test liquidity baking toggle vote with 60% of bakers voting LB_off \ - baking 100 blocks longer" + "liquidity baking toggle vote with 60% of bakers voting LB_off baking \ + 100 blocks longer" `Quick (liquidity_baking_toggle_60 100); Tztest.tztest - "test liquidity baking does not shut off with toggle vote at 50% and \ - baking 100 blocks longer than sunset level in previous protocols" + "liquidity baking does not shut off with toggle vote at 50% and baking \ + 100 blocks longer than sunset level in previous protocols" `Quick liquidity_baking_toggle_50; Tztest.tztest - "test a liquidity baking restart with 100% of bakers voting off, then \ - pass, then on" + "liquidity baking restart with 100% of bakers voting off, then pass, \ + then on" `Quick (liquidity_baking_restart 2000 1); Tztest.tztest - "test liquidity baking toggle ema in block metadata is zero with no \ - bakers voting LB_off." + "liquidity baking toggle ema in block metadata is zero with no bakers \ + voting LB_off." `Quick liquidity_baking_toggle_ema_zero; Tztest.tztest - "test liquidity baking toggle ema is equal to the threshold after the \ - subsidy has been stopped by a toggle vote" + "liquidity baking toggle ema is equal to the threshold after the subsidy \ + has been stopped by a toggle vote" `Quick liquidity_baking_toggle_ema_threshold; Tztest.tztest - "test liquidity baking storage is updated" + "liquidity baking storage is updated" `Quick (liquidity_baking_storage 64); Tztest.tztest - "test liquidity baking balance updates" + "liquidity baking balance updates" `Quick liquidity_baking_balance_update; Tztest.tztest - "test liquidity baking CPMM address in storage matches address in the \ + "liquidity baking CPMM address in storage matches address in the \ origination result" `Quick liquidity_baking_origination_result_cpmm_address; Tztest.tztest - "test liquidity baking CPMM balance in origination result is 100 mutez" + "liquidity baking CPMM balance in origination result is 100 mutez" `Quick liquidity_baking_origination_result_cpmm_balance; Tztest.tztest - "test liquidity baking LQT contract is originated at expected address" + "liquidity baking LQT contract is originated at expected address" `Quick liquidity_baking_origination_result_lqt_address; Tztest.tztest - "test liquidity baking LQT balance in origination result is 0 mutez" + "liquidity baking LQT balance in origination result is 0 mutez" `Quick liquidity_baking_origination_result_lqt_balance; Tztest.tztest - "test liquidity baking originates three contracts when tzBTC does not \ - exist and level indicates we are not on mainnet" + "liquidity baking originates three contracts when tzBTC does not exist \ + and level indicates we are not on mainnet" `Quick liquidity_baking_origination_test_migration; Tztest.tztest - "test liquidity baking originates three contracts when tzBTC does not \ - exist and level indicates we might be on mainnet" + "liquidity baking originates three contracts when tzBTC does not exist \ + and level indicates we might be on mainnet" `Quick liquidity_baking_origination_no_tzBTC_mainnet_migration; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("liquidity baking", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/test_main.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/test_main.ml deleted file mode 100644 index 6472da6e3c0abc0aad6f3763af1ebf938adae0e3..0000000000000000000000000000000000000000 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/test_main.ml +++ /dev/null @@ -1,45 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune build @@src/proto_alpha/lib_protocol/test/integration/runtest - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration" - [ - (Protocol.name ^ ": constants", Test_constants.tests); - (Protocol.name ^ ": liquidity baking", Test_liquidity_baking.tests); - (Protocol.name ^ ": storage description", Test_storage.tests); - (Protocol.name ^ ": storage tests", Test_storage_functions.tests); - (Protocol.name ^ ": token movements", Test_token.tests); - (Protocol.name ^ ": frozen bonds", Test_frozen_bonds.tests); - ] - |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/test_storage.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/test_storage.ml index 03485707c3ef3eb2c078f4f36e3aa618a8ec01e0..ff25e3fb86785f403be8dae7cd5c9c3de67b386b 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/test_storage.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/test_storage.ml @@ -27,8 +27,8 @@ ------- Component: Context Storage Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/main.exe \ - -- test storage + src/proto_017_PtNairob/lib_protocol/test/integration/main.exe \ + -- --file test_storage.ml Subject: Test the correctnesss of debug message from storage_functor *) @@ -237,3 +237,7 @@ let tests = `Quick (fun _ -> test_register_indexed_subcontext_2); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("storage description", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/test_storage_functions.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/test_storage_functions.ml index ddec42a5ded70b6e53bebea882bf75d0b741f337..a6cebdc4f7258767eb53dc96f707e9aed96a5068 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/test_storage_functions.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/test_storage_functions.ml @@ -27,8 +27,8 @@ ------- Component: Context Storage Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/main.exe \ - -- test "storage tests" + src/proto_017_PtNairob/lib_protocol/test/integration/main.exe \ + -- --file test_storage_functions.ml Subject: Test storage functions. *) @@ -175,3 +175,7 @@ let tests = test_fold_keys_unaccounted; Tztest.tztest "length test" `Quick test_length; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("storage tests", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/test_token.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/test_token.ml index edf122f6c9575aa9c1f7f146dde5030aea4bcd43..cb84b16f0ca4376ead2238f4f500e47c25a548a5 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/test_token.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/test_token.ml @@ -27,8 +27,8 @@ ------- Component: Protocol (token) Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/main.exe \ - -- test "^token" + src/proto_017_PtNairob/lib_protocol/test/integration/main.exe \ + -- --file test_token.ml Subject: Token movements in the protocol. *) @@ -777,3 +777,7 @@ let tests = `Quick test_transfer_n_with_several_givers; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("token movements", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/dune b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/dune index 69f7236c7b9a47401762bb91f0445196639d4970..7583e561a113f1fa968892fb42bb74a7644c5471 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/dune @@ -30,7 +30,6 @@ -open Tezos_base_test_helpers -open Tezos_protocol_plugin_017_PtNairob) (modules - test_main generator_descriptors generators manager_operation_helpers diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_1m_restriction.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_1m_restriction.ml index cd1590d1d39d0857a87f9f2cd65bdcc0c6524e72..96d3bbbd977d43f227edc412f0f9a61ddba4da45 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_1m_restriction.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_1m_restriction.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ - -- test "^one-manager" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/validate/main.exe \ + -- --file test_1m_restriction.ml Subject: 1M restriction in validation of manager operation. *) @@ -226,3 +225,7 @@ let tests : (string * [`Quick | `Slow] * (unit -> unit Lwt.t)) trace = batch_is_not_singles_tests; conflict_free_tests; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("one-manager restriction", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_covalidity.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_covalidity.ml index 9752975129d3cc23b7a689e230bfe45966a77c70..2cda742b4ee7439a659e1817f3a350f62fedf578 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_covalidity.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_covalidity.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ - -- test "^covalidity" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/validate/main.exe \ + -- --file test_covalidity.ml Subject: Validation of operation. *) open Validate_helpers @@ -155,3 +154,7 @@ let tests = [] voting_periods |> Qcheck2_helpers.qcheck_wrap_lwt + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("covalidity", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_main.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_main.ml deleted file mode 100644 index dcb0d3d1e6b80a5859fb5c1e08f58f05087a003e..0000000000000000000000000000000000000000 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_main.ml +++ /dev/null @@ -1,47 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2022 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune runtest src/proto_alpha/lib_protocol/test/integration/validate - Subject: Integration > Validate -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > validate" - [ - (Protocol.name ^ ": sanity checks", Test_sanity.tests); - (Protocol.name ^ ": mempool", Test_mempool.tests); - ( Protocol.name ^ ": single manager validation", - Test_manager_operation_validation.tests ); - ( Protocol.name ^ ": batched managers validation", - Test_validation_batch.tests ); - (Protocol.name ^ ": one-manager restriction", Test_1m_restriction.tests); - (Protocol.name ^ ": covalidity", Test_covalidity.tests); - ] - |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_manager_operation_validation.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_manager_operation_validation.ml index 75af381ae66fd580acf2e41764a56510401fe134..3a35c446bae0719a7c8f0fee230a2386f560e798 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_manager_operation_validation.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_manager_operation_validation.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ - -- test "^single" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/validate/main.exe \ + -- --file test_manager_operation_validation.ml Subject: Validation of manager operation. *) @@ -613,8 +612,15 @@ let tests = test_low_gas_limit_no_consumer, not_gas_consum, mk_default ); - ("check dal disabled", test_feature_flags, all, mk_flags disabled_dal); - ("check toru disabled", test_feature_flags, all, mk_flags disabled_toru); - ("check scoru disabled", test_feature_flags, all, mk_flags disabled_scoru); - ("check zkru disabled", test_feature_flags, all, mk_flags disabled_zkru); + ("dal disabled", test_feature_flags, all, mk_flags disabled_dal); + ("toru disabled", test_feature_flags, all, mk_flags disabled_toru); + ("scoru disabled", test_feature_flags, all, mk_flags disabled_scoru); + ("zkru disabled", test_feature_flags, all, mk_flags disabled_zkru); ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("single manager validation", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_mempool.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_mempool.ml index b4a3ca83dd5f82bb0898dd1b2b831894bf0cb5d3..180f7cbbc9dbbc616d374c83a93bc844ecef590c 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_mempool.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_mempool.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ - -- test "^Mempool" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/validate/main.exe \ + -- --file test_mempool.ml Subject: Integration > Validate > Mempool mode *) @@ -391,3 +390,6 @@ let tests = test_add_and_replace; Tztest.tztest "remove operations" `Quick test_remove_operation; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("mempool", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_sanity.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_sanity.ml index e0b900b8c10555e464b2c2fb351f5922c3a848b0..356a68c3d4a6054311fb21cca62ca70bba6ebd45 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_sanity.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_sanity.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ - -- test "sanity checks" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/validate/main.exe \ + -- --file test_sanity.ml Subject: Validation of operation. *) @@ -162,3 +161,7 @@ let tests = ("manager operation coverage", ensure_manager_operation_coverage); ("covalidation coverage", covalidation_sanity); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sanity checks", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_validation_batch.ml b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_validation_batch.ml index 6632e3a421b7c2c12690e83fb81d355ff6359ba6..c84a8e59f1f99ea2ca758cec0ddf771e2ce1d96e 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_validation_batch.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/test_validation_batch.ml @@ -26,9 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ - -- test "^batched" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/integration/validate/main.exe \ + -- --file test_validation_batch.ml Subject: Validation of batched manager operation. *) @@ -622,3 +621,10 @@ let tests = revealed, mk_high_gas_limit ); ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("batched managers validation", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/liquidity_baking_pbt.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/liquidity_baking_pbt.ml index 8e1a74c0d75508bc02c2c2238dee3440b5ce21a3..5da5752cd547f92b5c7c329e21f6fb17f576697d 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/liquidity_baking_pbt.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/liquidity_baking_pbt.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: pbt for liquidity baking - Invocation: [QCHECK_SEED=] dune exec \ - src/proto_alpha/lib_protocol/test/pbt/liquidity_baking_pbt.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file liquidity_baking_pbt.ml Subject: Test liquidity baking contracts using randomly generated inputs. *) @@ -320,9 +320,8 @@ let () = let open Qcheck2_helpers in Alcotest.run ~__FILE__ - "protocol > pbt > liquidity baking" + Protocol.name [ - ( Protocol.name ^ ": Machines Cross-Validation", - qcheck_wrap machine_validation_tests ); - (Protocol.name ^ ": Economic Properties", qcheck_wrap economic_tests); + ("Machines Cross-Validation", qcheck_wrap machine_validation_tests); + ("Economic Properties", qcheck_wrap economic_tests); ] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/saturation_fuzzing.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/saturation_fuzzing.ml index 88783970686d33a22149d404ac508ea730aeb3e5..535dc427ff61b14bc4aa6a202c261ccb9f7791e6 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/saturation_fuzzing.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/saturation_fuzzing.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/saturation_fuzzing.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file saturation_fuzzing.ml Subject: Operations in Saturation_repr *) @@ -191,12 +191,12 @@ let tests_sqrt = [test_sqrt_squared; test_squared_sqrt] let () = Alcotest.run ~__FILE__ - "protocol > pbt > saturation" + Protocol.name [ - (Protocol.name ^ ": add", qcheck_wrap tests_add); - (Protocol.name ^ ": mul", qcheck_wrap tests_mul); - (Protocol.name ^ ": sub", qcheck_wrap tests_sub); - (Protocol.name ^ ": add and sub", qcheck_wrap tests_add_sub); - (Protocol.name ^ ": sqrt", qcheck_wrap tests_sqrt); - (Protocol.name ^ ": <= and >=", qcheck_wrap tests_boundaries); + ("add", qcheck_wrap tests_add); + ("mul", qcheck_wrap tests_mul); + ("sub", qcheck_wrap tests_sub); + ("add and sub", qcheck_wrap tests_add_sub); + ("sqrt", qcheck_wrap tests_sqrt); + ("<= and >=", qcheck_wrap tests_boundaries); ] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_bitset.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_bitset.ml index ee7c3cdeaec3f8285495d1937575e85a63a0b526..f7a58ba52e563d7b3be3282573a82ab78b451ac0 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_bitset.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_bitset.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/test_bitset.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_bitset.ml Subject: Bitset structure *) @@ -95,9 +96,9 @@ let test_fill = let () = Alcotest.run ~__FILE__ - "bits" + Protocol.name [ - ( Protocol.name ^ ": quantity", + ( "quantity", qcheck_wrap [ QCheck2.Test.make diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_bytes_conversion.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_bytes_conversion.ml index da52abe39208b8590f8907574d14167f1b882fa2..3e0c3762fca1ad2d7ab25a22499cc06ec6cf550b 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_bytes_conversion.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_bytes_conversion.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: pbt for bytes <=> nat/int conversions - Invocation: [QCHECK_SEED=] dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_bytes_conversion.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_bytes_conversion.ml Subject: Test the conversions between bytes and int/nat *) @@ -211,6 +211,5 @@ let tests = let () = Alcotest.run ~__FILE__ - ("protocol > script_bytes > " ^ Protocol.name - ^ ": bytes and int/nat conversion ") + (Protocol.name ^ ": bytes and int/nat conversion ") tests diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_carbonated_map.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_carbonated_map.ml index 7e89d99381d97d3201ecf40e2ce3f6595ec6128a..568ec816747d3788145a5c744210c439338dcdf9 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_carbonated_map.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_carbonated_map.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_carbonated_map.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_carbonated_map.ml Subject: Operations in Carbonated_map *) @@ -545,7 +545,4 @@ let tests ~rand = qcheck_wrap ~rand qcheck_tests @ unit_tests let () = (* Ensure deterministic results. *) let rand = Random.State.make [|0x1337533D; 71287309; 397060904|] in - Alcotest.run - ~__FILE__ - "protocol > pbt > carbonated map" - [(Protocol.name ^ ": Carbonated map", tests ~rand)] + Alcotest.run ~__FILE__ Protocol.name [("Carbonated map", tests ~rand)] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_compare_operations.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_compare_operations.ml index 78498a7a4201e46be02b0214b0469ebddcbc754f..456cc6d9255537711446c65c46a3359a41aeefd0 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_compare_operations.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_compare_operations.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (Operation compare) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_compare_operations.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_compare_operations.ml Subject: Valid operations Comparison *) @@ -98,7 +98,5 @@ let tests = [test_compare_is_strorder] let () = Alcotest.run ~__FILE__ - "Compare operations" - [ - (Protocol.name ^ ": Compare_operations", Qcheck2_helpers.qcheck_wrap tests); - ] + Protocol.name + [("Compare_operations", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_dal_slot_proof.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_dal_slot_proof.ml index 7025ae79006f967d263dd40a0615a6107837a84e..398a6735105f751880b2f7a504f089d82896a3f3 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_dal_slot_proof.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_dal_slot_proof.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: PBT for refutation proofs of Dal - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_dal_slot_proof.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_dal_slot_proof.ml Subject: Refutation proof-related functions of Dal *) diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_gas_properties.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_gas_properties.ml index eeae15b630560c9bc48a4eddd4c4e98892c38d04..cfa59556041ff88f4bf0b4578ee42e23b688e299 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_gas_properties.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_gas_properties.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (gas properties) - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_gas_properties.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_gas_properties.ml Subject: Arithmetic properties around gas. *) @@ -141,7 +141,4 @@ let tests = ] let () = - Alcotest.run - ~__FILE__ - "protocol > pbt > gas" - [(Protocol.name ^ ": gas properties", qcheck_wrap tests)] + Alcotest.run ~__FILE__ Protocol.name [("gas properties", qcheck_wrap tests)] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_merkle_list.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_merkle_list.ml index 89d1a690ad6b421e67bb7b0d9f2a81804673f523..ec0acc9039a65d8da47b89a684725456c117cf57 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_merkle_list.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_merkle_list.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_merkle_list.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_merkle_list.ml Subject: Tx rollup l2 encoding *) @@ -112,15 +112,15 @@ let () = let qcheck_wrap = qcheck_wrap ~rand:(Random.State.make_self_init ()) in Alcotest.run ~__FILE__ - "Merkle list" + Protocol.name [ - ( Protocol.name ^ ": scons_equiv", + ( "scons_equiv", qcheck_wrap [ test_scons_scons_tr_equiv ~count:1000; test_scons_compute_equiv ~count:1000; ] ); - ( Protocol.name ^ ": check_path", + ( "check_path", qcheck_wrap [test_check_path ~count:1000; test_check_path_wrong ~count:1000] ); ] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_operation_encoding.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_operation_encoding.ml index 3ebebfc687a2fb26126493ed50276a0a8c1b339c..0fac8a9e36660d61a158f5efb323f4062a68d10a 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_operation_encoding.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_operation_encoding.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_operation_encoding.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_operation_encoding.ml Subject: Encoding for operations *) @@ -63,5 +63,5 @@ let () = let qcheck_wrap = qcheck_wrap ~rand:(Random.State.make_self_init ()) in Alcotest.run ~__FILE__ - "Operation_encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap [test_operation])] + (Protocol.name ^ ": Operation_encoding") + [(": roundtrip", qcheck_wrap [test_operation])] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_refutation_game.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_refutation_game.ml index 100a001375e8f27a4380da5c5e18ac2b0e69ff81..a7ddfeeb23336a78f84f5684da50270678346dba 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_refutation_game.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_refutation_game.ml @@ -27,8 +27,8 @@ (** Testing ------- Component: PBT for the SCORU refutation game - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_refutation_game.ml Subject: SCORU refutation game *) open Protocol diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sampler.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sampler.ml index 86c4d5410f8a994494002dfb5b33b241a53f4eac..e33e7d9746c70f7c712c279e0e6535604455d7f0 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sampler.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sampler.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_sampler.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_sampler.ml Subject: Operations in Saturation_repr *) @@ -267,8 +267,5 @@ let alias_z_test = let () = Alcotest.run ~__FILE__ - "protocol > pbt > sampling" - [ - ( Protocol.name ^ ": sampling", - qcheck_wrap [alias_float_test; alias_z_test] ); - ] + Protocol.name + [("sampling", qcheck_wrap [alias_float_test; alias_z_test])] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_encoding.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_encoding.ml index ec4def22ec5115885f6b463b8c0397abae1ac126..be7d755a9c35d732eb7f39884f8c883e48bae3d5 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_encoding.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_encoding.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ - -- -f 'SC rollup encoding' + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_sc_rollup_encoding.ml Subject: SC rollup encoding *) @@ -293,5 +293,5 @@ let tests = let () = Alcotest.run ~__FILE__ - "SC rollup encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap tests)] + (Protocol.name ^ ": SC rollup encoding") + [(": roundtrip", qcheck_wrap tests)] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_inbox.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_inbox.ml index 3bcfae8f37e38aa29a8d3e9d4663dce5b5978109..b14dc29d449c2c8ef63d761725b1a3a7f660b4b7 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_inbox.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_inbox.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ - -- -f 'Smart rollup inbox' + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_sc_rollup_inbox.ml Subject: Smart rollup inbox *) @@ -74,8 +74,4 @@ let test_add_info_per_level = let tests = [test_add_info_per_level] -let () = - Alcotest.run - ~__FILE__ - "Smart rollup inbox" - [(Protocol.name ^ ": safety", qcheck_wrap tests)] +let () = Alcotest.run ~__FILE__ Protocol.name [("safety", qcheck_wrap tests)] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml index 7b26b7b5e9150867bd191b14e709f05449e06504..65196293dc47aef4cc76a737fcbce07b266b994e 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_tick_repr.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_sc_rollup_tick_repr.ml Subject: Operations in Tick_repr *) @@ -106,5 +106,5 @@ let tests = let () = Alcotest.run ~__FILE__ - "Tick_repr" - [(Protocol.name ^ ": Tick_repr", Qcheck2_helpers.qcheck_wrap tests)] + Protocol.name + [("Tick_repr", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_script_comparison.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_script_comparison.ml index a9a533021d9e2ad1d07f39fcafbede8bc5f57624..e8c9c3266913e2085217034839689cee2de24d97 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_script_comparison.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_script_comparison.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Script_comparison - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_script_comparison.ml Subject: PBT of the Script_comparable.compare_comparable function. *) @@ -344,14 +344,12 @@ let test_pack_unpack = let () = Alcotest.run ~__FILE__ - "protocol > pbt > script_comparison" + Protocol.name [ - ( Protocol.name ^ ": compatible_with_reference", - qcheck_wrap [test_compatible_with_reference] ); - ( Protocol.name ^ ": compatible_with_packing", - qcheck_wrap [test_compatible_with_packing] ); - (Protocol.name ^ ": reflexivity", qcheck_wrap [test_reflexivity]); - (Protocol.name ^ ": symmetry", qcheck_wrap [test_symmetry]); - (Protocol.name ^ ": transitivity", qcheck_wrap [test_transitivity]); - (Protocol.name ^ ": pack_unpack", qcheck_wrap [test_pack_unpack]); + ("compatible_with_reference", qcheck_wrap [test_compatible_with_reference]); + ("compatible_with_packing", qcheck_wrap [test_compatible_with_packing]); + ("reflexivity", qcheck_wrap [test_reflexivity]); + ("symmetry", qcheck_wrap [test_symmetry]); + ("transitivity", qcheck_wrap [test_transitivity]); + ("pack_unpack", qcheck_wrap [test_pack_unpack]); ] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_tez_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_tez_repr.ml index 14078be4c1d3ded6a5ad6d6220dae87a2dc6a29d..c02de8b0313ef1d93fe75db6b9e780c038dc1155 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_tez_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_tez_repr.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_tez_repr.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_tez_repr.ml Subject: Operations in Tez_repr *) @@ -133,5 +133,5 @@ let tests = let () = Alcotest.run ~__FILE__ - "protocol > pbt > tez_repr" - [(Protocol.name ^ ": Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] + Protocol.name + [("Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_zk_rollup_encoding.ml b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_zk_rollup_encoding.ml index 586822aea6d5ad69833ce9cd53bdf93a8895c5a6..564eb08eba7f811bfc103e33e1d4786b3be63716 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/test_zk_rollup_encoding.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/test_zk_rollup_encoding.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/pbt/test_zk_rollup_encoding.exe + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/pbt/main.exe \ + -- --file test_zk_rollup_encoding.ml Subject: Zk rollup encodings *) @@ -223,8 +223,8 @@ let tests_to_scalar = [test_address_to_scalar; test_operation_to_scalar] let () = Alcotest.run ~__FILE__ - "ZK rollup encoding" + (Protocol.name ^ ": ZK rollup encoding") [ - (Protocol.name ^ ": roundtrip", qcheck_wrap tests_roundtrip); - (Protocol.name ^ ": to_scalar", qcheck_wrap tests_to_scalar); + (": roundtrip", qcheck_wrap tests_roundtrip); + (": to_scalar", qcheck_wrap tests_to_scalar); ] diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/dune b/src/proto_017_PtNairob/lib_protocol/test/unit/dune index 738d17f237a740d06dd6a173187d1d7035dba4df..b509ba76ebf69c9e2d7b472e42168b258d38a45f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/dune @@ -43,7 +43,6 @@ -open Tezos_crypto_dal -open Tezos_webassembly_interpreter_extra) (modules - test_main test_bond_id_repr test_consensus_key test_contract_repr diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_alpha_context.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_alpha_context.ml index 77cda1e31232ffc04f3431891dab8d44bd2e72c8..16e5f15b5432e9e55d3e6d0f1decb844d09ad81c 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_alpha_context.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_alpha_context.ml @@ -29,8 +29,8 @@ open Alpha_context (** Testing ------- Component: Alpha_context - Invocation: dune exec ./src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test Alpha_context + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_alpha_context.ml Dependencies: helpers/block.ml Subject: To test the modules (including the top-level) in alpha_context.ml as individual units, particularly @@ -285,3 +285,7 @@ let tests = `Quick Test_Big_map.test_list_key_values_parameters; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("alpha context", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_bond_id_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_bond_id_repr.ml index e1dc6aa50e4b3939edbf1faf90b569cd3daf684c..cf0d549c71b5e466bffc0e7d38b89fe83df18109 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_bond_id_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_bond_id_repr.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Bond_id_repr - Invocation: dune exec ./src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test Bond_id_repr + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_bond_id_repr.ml Dependencies: -- Subject: Test bond id representations for RPC definitions. *) @@ -112,3 +112,7 @@ let tests = test_destruct_invalid_bond_id_repr; Tztest.tztest "Deserialize/serialize roundtrip" `Quick test_roundtrip; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Bond_id_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_consensus_key.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_consensus_key.ml index 1b3c2b7cdbbcb5a036150b2dc5292fe9d3e6b5fd..e5035303e5433ef5bba900b7688391b81a9d5f21 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_consensus_key.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_consensus_key.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (delegate_consensus_key) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] Delegate_consensus_key.ml" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_consensus_key.ml Subject: Functions from the module `Delegate_consensus_key` *) @@ -238,3 +238,7 @@ let test_consensus_key_storage () = let tests = [Tztest.tztest "consensus_key_storage" `Quick test_consensus_key_storage] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Delegate consensus key", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_contract_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_contract_repr.ml index 1f7f33a7cfa609e5be2ec9b038457fc4d51d4398..accd616ea54d2ffa3e23a477bf132f5f01360d7c 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_contract_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_contract_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Contract_repr - Invocation: dune exec ./src/proto_alpha/lib_protocol/test/unit/main.exe -- test Contract_repr + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_contract_repr.ml Dependencies: contract_hash.ml Subject: To test the modules (including the top-level) in contract_repr.ml as individual units, particularly @@ -117,3 +118,7 @@ let tests = `Quick Test_contract_repr.test_to_b58check_originated; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Contract_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_dal_slot_proof.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_dal_slot_proof.ml index a59b08c02d091410c29c48d824ecda634dbc3ea9..0a600135144aeed2d73b9d1bbc35693875b81be6 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_dal_slot_proof.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_dal_slot_proof.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (dal slot proof) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] dal slot proof$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_dal_slot_proof.ml Subject: These unit tests check proof-related functions of Dal slots. *) @@ -439,3 +439,7 @@ let tests = let dal_parameters = constants_test.dal end) in Test.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("dal slot proof", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_destination_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_destination_repr.ml index b2cd843ba0d3d3466586037738703f1e2e0c6722..121d47df24956fc543c475f13ebd39219bd162c3 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_destination_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_destination_repr.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Destination_repr - Invocation: dune exec -- ./src/proto_alpha/lib_protocol/test/unit/main.exe \ - test Destination_repr + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_destination_repr.ml Subject: To test the encoding of [Destination_repr] and assert it is compatible with [Contract_repr.encoding]. *) @@ -223,3 +223,7 @@ let tests = @@ test_encoding_json_compat; tztest "Comparison of destinations" `Quick test_compare_destination; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Destination_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_fitness.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_fitness.ml index 3afa3421d65671ca26bd12df121a6bfb6b88db86..7254762a8aadfeb984167d01d2f52ccea1b1b7ef 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_fitness.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_fitness.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (committee selection) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] fitness$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_fitness.ml Subject: test the fitness module *) @@ -156,3 +156,6 @@ let tests = `Quick test_compare_all; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("fitness", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_fixed_point.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_fixed_point.ml index bd6c11d88fcb7917bba1a5bb906a7ed5bd882fcb..2389060e3b97a6bd0237c8de37d57d7baf895c35 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_fixed_point.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_fixed_point.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (fixed-point decimals) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] fixed point computation$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_fixed_point.ml Subject: On fixed-point decimal numbers. *) @@ -173,3 +173,7 @@ let tests = Tztest.tztest "FP tests (3 decimals)" `Quick fp_nonzero; Tztest.tztest "FP pp tests (3 decimals)" `Quick fp_pp; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("fixed point computation", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_gas_monad.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_gas_monad.ml index 33b47e66c4fbc9ec179109b51edb23fab1a224fb..6e4b8a287469f748f46cb27593823ed57008f3fc 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_gas_monad.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_gas_monad.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Gas_monad - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] gas monad$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_gas_monad.ml Subject: Tests for the gas monad module *) @@ -196,20 +196,24 @@ let test_syntax_module () = let tests = [ - Tztest.tztest "Test exhaustion" `Quick test_gas_exhaustion; + Tztest.tztest "exhaustion" `Quick test_gas_exhaustion; Tztest.tztest - "Test exhaustion before error" + "exhaustion before error" `Quick test_gas_exhaustion_before_error; Tztest.tztest - "Test successful result with remaining gas" + "successful result with remaining gas" `Quick test_successful_with_remaining_gas; Tztest.tztest - "Test successful result with spare gas" + "successful result with spare gas" `Quick test_successful_with_spare_gas; - Tztest.tztest "Test inner error" `Quick test_inner_error; - Tztest.tztest "Test unlimited" `Quick test_unlimited; - Tztest.tztest "Test syntax module" `Quick test_syntax_module; + Tztest.tztest "inner error" `Quick test_inner_error; + Tztest.tztest "unlimited" `Quick test_unlimited; + Tztest.tztest "syntax module" `Quick test_syntax_module; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("gas monad", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_global_constants_storage.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_global_constants_storage.ml index 8b340b229194ce13fab71fc3bc5e0d3749a09106..df77573030cb880c0108c1696ff9070ed57bf0ff 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_global_constants_storage.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_global_constants_storage.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Global table of constants - Invocation: dune exec ./src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test Global_constants_storage + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_global_constants_storage.ml Dependencies: contract_hash.ml Subject: Test the global table of constants *) @@ -411,3 +411,10 @@ let tests = test_expand_is_idempotent; test_fold_does_not_stack_overflow; ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("Global_constants_storage.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_level_module.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_level_module.ml index 26493e6726867b4e956fed0174f3ae0ddf6c38ab..656e3e5eac8c288c14ab028c2bea148626c8c5c5 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_level_module.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_level_module.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (baking) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] level module$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_level_module.ml Subject: some functions in the Level module *) @@ -277,3 +277,7 @@ let tests = Tztest.tztest "level_from_raw" `Quick test_level_from_raw; Tztest.tztest "first_level_in_cycle" `Quick test_first_level_in_cycle; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("level module", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_liquidity_baking_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_liquidity_baking_repr.ml index ac40fa0600e82fdf3ab3901f92072ae4deb7f80b..28d300e90ba2a70411935a4511d6f7ef5598e8d2 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_liquidity_baking_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_liquidity_baking_repr.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol Liquidity_baking_repr module - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] liquidity baking$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_liquidity_baking_repr.ml Subject: Tests for the Liquidity_baking_repr module *) @@ -217,44 +217,39 @@ let test_ema_symmetry () = let tests = [ + Tztest.tztest "EMA does not change when vote is Pass" `Quick test_ema_pass; Tztest.tztest - "Test EMA does not change when vote is Pass" - `Quick - test_ema_pass; - Tztest.tztest - "Test EMA remains in bounds when vote is Off" + "EMA remains in bounds when vote is Off" `Quick test_ema_in_bound_off; + Tztest.tztest "EMA increases when vote is Off" `Quick test_ema_increases_off; Tztest.tztest - "Test EMA increases when vote is Off" - `Quick - test_ema_increases_off; - Tztest.tztest - "Test EMA does not increase too much when vote is Off" + "EMA does not increase too much when vote is Off" `Quick test_ema_increases_off_bound; Tztest.tztest - "Test EMA remains in bounds when vote is On" + "EMA remains in bounds when vote is On" `Quick test_ema_in_bound_on; + Tztest.tztest "EMA decreases when vote is On" `Quick test_ema_decreases_on; Tztest.tztest - "Test EMA decreases when vote is On" - `Quick - test_ema_decreases_on; - Tztest.tztest - "Test EMA does not decrease too much when vote is On" + "EMA does not decrease too much when vote is On" `Quick test_ema_decreases_on_bound; Tztest.tztest - "Test EMA goes from 0 to one billion in 1386 Off votes" + "EMA goes from 0 to one billion in 1386 Off votes" `Quick test_ema_many_off; Tztest.tztest - "Test EMA goes from two billions to one billion in 1386 On votes" + "EMA goes from two billions to one billion in 1386 On votes" `Quick test_ema_many_on; Tztest.tztest - "Test that voting On and Off have symmetric effects on the EMA" + "voting On and Off have symmetric effects on the EMA" `Quick test_ema_symmetry; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("liquidity baking", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_local_contexts.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_local_contexts.ml index d620a1618398ba7ddc1d550843327e01632bb25d..031ac22d61f0bc99c21713be233b58d953208470 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_local_contexts.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_local_contexts.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Local context storages by functors - Invocation: dune exec ./src/proto_alpha/lib_protocol/test/unit/main.exe -- test local_contexts + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_local_contexts.ml Dependencies: helpers/block.ml Subject: Tests for local contexts @@ -132,3 +133,7 @@ let tests = `Quick test_local_remove_existing; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("local contexts", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_main.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_main.ml deleted file mode 100644 index da90172f15c347617d10c775dfec6add0df30589..0000000000000000000000000000000000000000 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_main.ml +++ /dev/null @@ -1,62 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2022 Marigold *) -(* Copyright (c) 2022 Nomadic Labs *) -(* Copyright (c) 2022 Oxhead Alpha *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -let () = - Alcotest_lwt.run - ~__FILE__ - (Protocol.name ^ " > unit") - [ - ("Tez_repr.ml", Test_tez_repr.tests); - ("Contract_repr.ml", Test_contract_repr.tests); - ("Destination_repr.ml", Test_destination_repr.tests); - ("Operation_repr.ml", Test_operation_repr.tests); - ("Global_constants_storage.ml", Test_global_constants_storage.tests); - ("fitness", Test_fitness.tests); - ("fixed point computation", Test_fixed_point.tests); - ("level module", Test_level_module.tests); - ("qty", Test_qty.tests); - ("round", Test_round_repr.tests); - ("time", Test_time_repr.tests); - ("receipt encodings", Test_receipt.tests); - ("saturation arithmetic", Test_saturation.tests); - ("gas monad", Test_gas_monad.tests); - ("sc rollup storage", Test_sc_rollup_storage.tests); - ("sc rollup game", Test_sc_rollup_game.tests); - ("liquidity baking", Test_liquidity_baking_repr.tests); - ("sc rollup wasm", Test_sc_rollup_wasm.tests); - ("sc rollup arith", Test_sc_rollup_arith.tests); - ("merkle list", Test_merkle_list.tests); - ("sc rollup inbox", Test_sc_rollup_inbox.tests); - ("skip list", Test_skip_list_repr.tests); - ("sc rollup management protocol", Test_sc_rollup_management_protocol.tests); - ("Bond_id_repr.ml", Test_bond_id_repr.tests); - ("zk rollup storage", Test_zk_rollup_storage.tests); - ("Delegate_consensus_key.ml", Test_consensus_key.tests); - ("local_contexts", Test_local_contexts.tests); - ("dal slot proof", Test_dal_slot_proof.tests); - ] - |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_merkle_list.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_merkle_list.ml index e7aa2cabd3983b0a82a20ff61270fd562ddd539e..231845907c9f420607123b86fde3b6f618310e2e 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_merkle_list.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_merkle_list.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (Merkle list) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "\[Unit\] merkle list" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_merkle_list.ml Subject: test the ad-hoc merkle tree structure implemented to encode lists *) @@ -235,20 +235,19 @@ let test_path_encoding () = let valid_tests = [ - ("test_compute", test_compute); - ("test_snoc", test_snoc); - ("test_snoc_non_tr", test_snoc_non_tr); - ("test_compute_path", test_compute_path); - ("test_check_path", test_check_path); - ("test_path_encoding", test_path_encoding); - ("test_compute_path_negative_pos", test_compute_path_negative_pos); - ("test_compute_path_out_of_bounds", test_compute_path_out_of_bounds); - ("test_check_path_negative_pos", test_check_path_negative_pos); - ("test_check_path_out_of_bounds", test_check_path_out_of_bounds); - ( "test_compute_path_out_of_bounds_full", - test_compute_path_out_of_bounds_full ); - ("test_check_path_wrong_pos", test_check_path_wrong_pos); - ("test_check_invalidated_path", test_check_invalidated_path); + ("compute", test_compute); + ("snoc", test_snoc); + ("snoc_non_tr", test_snoc_non_tr); + ("compute_path", test_compute_path); + ("check_path", test_check_path); + ("path_encoding", test_path_encoding); + ("compute_path_negative_pos", test_compute_path_negative_pos); + ("compute_path_out_of_bounds", test_compute_path_out_of_bounds); + ("check_path_negative_pos", test_check_path_negative_pos); + ("check_path_out_of_bounds", test_check_path_out_of_bounds); + ("compute_path_out_of_bounds_full", test_compute_path_out_of_bounds_full); + ("check_path_wrong_pos", test_check_path_wrong_pos); + ("check_invalidated_path", test_check_invalidated_path); ] let wrap (n, f) = @@ -256,3 +255,7 @@ let wrap (n, f) = Lwt.return (f ()) >|= function Ok () -> () | Error _ -> assert false) let tests = List.map wrap valid_tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("merkle list", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_operation_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_operation_repr.ml index 6d24160ecf3a2e8ff0fccdb45945a1f8c0d624ae..e3dd0f23227ec336e0e899825d209d1533f762e0 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_operation_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_operation_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Operation_repr - Invocation: dune exec ./src/proto_alpha/lib_protocol/test/unit/main.exe -- test Operation_repr + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_operation_repr.ml Dependencies: -- Subject: To test the modules (including the top-level) in operation_repr.ml as individual units, particularly @@ -182,3 +183,7 @@ let tests = `Quick Test_operation_repr.test_multiple_non_manager; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Operation_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_qty.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_qty.ml index 847686adcef6c18128b470316352ea9acb91a0e9..03381b187f85bcee22a5f7184e8bdf454add5295 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_qty.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_qty.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (quantities) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] qty$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_qty.ml Subject: On tez quantities. *) @@ -158,3 +158,6 @@ let wrap (n, f) = Format.kasprintf Stdlib.failwith "%a" pp_print_trace error) let tests = List.map wrap tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("qty", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_raw_level_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_raw_level_repr.ml index 4f12f21eba1d2357c2f495c2add57935de44cf10..881e45628f70f3a79114fdad2e1d45f2f49abf6f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_raw_level_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_raw_level_repr.ml @@ -29,8 +29,8 @@ open Tztest (** Testing ------- Component: Raw_level_repr - Invocation: dune exec ./src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test '^\[Unit\] Raw_level_repr.ml$' + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_raw_level_repr.ml Dependencies: -- Subject: To test the modules (including the top-level) in raw_level_repr.ml as individual units, particularly @@ -174,3 +174,7 @@ let skipped_tests = `Quick Test_raw_level_repr.test_skip_succ; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("raw level repr", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_receipt.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_receipt.ml index 77290a3fd080919848c0db20268575d7a74998b7..92ee499eac9386bf9bfbaeb8e104e85ab0fd4b0d 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_receipt.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_receipt.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (token) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] receipt" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_receipt.ml Subject: Test receipt endocings. *) @@ -92,3 +92,6 @@ let test_encodings () = test_encodings Sc_rollup_refutation_rewards let tests = Tztest.[tztest "receipt - encoding" `Quick test_encodings] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("receipt", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_round_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_round_repr.ml index 35f734798689761cdd326f143b6a029c704655ef..8e51b909422ed1b983e603fdbb5b1cb305d2fb96 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_round_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_round_repr.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] round$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_round_repr.ml Subject: test the Round_repr module *) @@ -617,13 +617,13 @@ let test_round_and_offset_correction = let tests = Tztest. [ - tztest "test_level_offset_of_round" `Quick test_level_offset_of_round; - tztest "test Round_duration" `Quick test_round; + tztest "level_offset_of_round" `Quick test_level_offset_of_round; + tztest "Round_duration" `Quick test_round; tztest "round_of_timestamp" `Quick test_round_of_timestamp; tztest "round_of_timestamp_perf" `Quick test_round_of_timestamp_perf; tztest "timestamp_of_round_perf" `Quick test_timestamp_of_round_perf; tztest - "test level offset too high error is triggered" + "level offset too high error is triggered" `Quick test_error_is_triggered_for_too_high_timestamp; tztest "round_of_ts (ts_of_round r) = r" `Quick test_ts_of_round_inverse; @@ -633,3 +633,6 @@ let tests = test_round_of_ts_inverse; test_round_and_offset_correction; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("round", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_saturation.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_saturation.ml index 0cf2633314ca37c9a3339bedbbfded3cfe7324a5..485ae471ff2efdf41542617bbeb5a125e26c6170 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_saturation.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_saturation.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (saturated arithmetic) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] saturation arithmetic$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_saturation.ml Subject: The gas is represented using saturated arithmetic. These unit tests check that saturated arithmetic operations are correctly implemented. @@ -234,3 +234,7 @@ let tests = `Quick (encoding Saturation_repr.n_encoding); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("saturation arithmetic", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_arith.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_arith.ml index 228f0cbd9c5174d8208878a989295cda56cec707..c127044ed5b7074ebdf8c9829c463421757bd3f0 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_arith.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_arith.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (saturated arithmetic) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] sc rollup arith$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_arith.ml Subject: Basic testing of the arithmetic rollup example *) @@ -546,3 +546,7 @@ let tests = test_initial_state_hash_arith_pvm; Tztest.tztest "Filter internal message" `Quick test_filter_internal_message; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup arith", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_game.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_game.ml index 60a47101379bfa6a5f5edcf1998988ce9879120a..3ea7bfca50bb19bb400142ced391327a6e7fb3bb 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_game.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_game.ml @@ -27,8 +27,8 @@ (** Testing ------- Component: Protocol Sc_rollup_refutation_storage - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] sc rollup game$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_game.ml Subject: Tests for the SCORU refutation game *) @@ -460,21 +460,23 @@ let tests = `Quick test_invalid_serialized_inbox_proof; Tztest.tztest - "Test to start a game with invalid commitment hash (swap commitment)." + "start a game with invalid commitment hash (swap commitment)." `Quick test_first_move_with_swapped_commitment; Tztest.tztest - "Test to start a game with invalid commitment hash (op from outsider)." + "start a game with invalid commitment hash (op from outsider)." `Quick test_first_move_from_invalid_player; Tztest.tztest - "Test to start a game with invalid commitment hash (opponent is not in \ - game)." + "start a game with invalid commitment hash (opponent is not in game)." `Quick test_first_move_with_invalid_opponent; Tztest.tztest - "Test to start a game with commitment hash that are not the first \ - conflict." + "start a game with commitment hash that are not the first conflict." `Quick test_first_move_with_invalid_ancestor; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup game", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_inbox.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_inbox.ml index 9070a2b6cfe1455c1174aebcb3ba182c25430c1d..67f76b89e6337bce855abc956398745527a9729a 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_inbox.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_inbox.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (smart contract rollup inbox) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] sc rollup inbox$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_inbox.ml Subject: These unit tests check the off-line inbox implementation for smart contract rollups *) @@ -941,3 +941,7 @@ let inbox_tests = let tests = merkelized_payload_hashes_tests @ inbox_tests @ Test_sc_rollup_inbox_legacy.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup inbox", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_inbox_legacy.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_inbox_legacy.ml index 806254e263528575a0ff1e2e932d706d3d4152c5..8cd4854e0d398c5b5a7d2faf27819ef9108632c6 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_inbox_legacy.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_inbox_legacy.ml @@ -26,8 +26,7 @@ (** Testing ------- Component: Protocol (smart contract rollup inbox) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] sc rollup inbox legacy$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe Subject: These unit tests check the off-line inbox implementation for smart contract rollups *) diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml index 8ee5c014a80329ccc79df725b996e95eb6310a30..bc859e1506d6528ae425f44d2d63d8150f420eb4 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (Rollup Management Protocol) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] sc rollup management protocol$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_management_protocol.ml Subject: Sanity checks for the Rollup Management Protocol module. *) @@ -356,3 +356,10 @@ let tests = `Quick test_encode_decode_outbox_message; ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("sc rollup management protocol", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_storage.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_storage.ml index be63aae8907affbc1a6d223b10c365533896f7a8..eacf4255ec4bb72449aa011e6ab132b901454f9d 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_storage.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_storage.ml @@ -27,8 +27,8 @@ (** Testing ------- Component: Protocol Sc_rollup_storage - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] sc rollup storage$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_storage.ml Subject: Tests for the SCORU storage module *) @@ -2744,7 +2744,7 @@ module Stake_storage_tests = struct `Quick test_unrelated_commitments; Tztest.tztest - "test fresh index is correcly incremented" + "fresh index is correcly incremented" `Quick test_fresh_index_correctly_increment; ] @@ -2798,3 +2798,7 @@ let tests = Stake_storage_tests.tests @ Rollup_storage_tests.tests (* FIXME: https://gitlab.com/tezos/tezos/-/issues/2460 Further tests to be added. *) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup storage", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_wasm.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_wasm.ml index 6c9e40c2283077b9473a31122f5da90c25ccea65..6696e2e5b4549787baebaff3f8d8cda93f6a92b9 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_wasm.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_sc_rollup_wasm.ml @@ -27,9 +27,8 @@ (** Testing ------- Component: Rollup layer 1 logic - Invocation: dune exec \ - src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] sc rollup wasm$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_wasm.ml Subject: Unit test for the Wasm PVM *) @@ -347,6 +346,10 @@ let tests = test_initial_state_hash_wasm_pvm; Tztest.tztest "size of a rollup metadata" `Quick test_metadata_size; Tztest.tztest "l1 input kind" `Quick test_l1_input_kind; - Tztest.tztest "test output proofs" `Quick test_output; - Tztest.tztest "test protocol names consistency" `Quick test_protocol_names; + Tztest.tztest "output proofs" `Quick test_output; + Tztest.tztest "protocol names consistency" `Quick test_protocol_names; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup wasm", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_skip_list_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_skip_list_repr.ml index 17f77ead34e47955528356dad424c1de2a661e26..b024b4b0b815c41008feef3871ed06e1ca73056a 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_skip_list_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_skip_list_repr.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (skip lists) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] skip list$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_skip_list_repr.ml Subject: Test skip list implementation *) @@ -675,3 +675,7 @@ let tests = `Quick test_skip_list_proof_size; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("skip list", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_tez_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_tez_repr.ml index 8a9f65d675d316af9f9c007f5673f888f9ca0f70..c2de2f3a08d2476e76a3f48ade406cbfcd30d0bb 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_tez_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_tez_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Tez_repr - Invocation: dune exec ./src/proto_alpha/lib_protocol/test/unit/main.exe -- test Tez_repr + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_tez_repr.ml Dependencies: -- Subject: To test the modules (including the top-level) in tez_repr.ml as individual units, particularly @@ -196,3 +197,7 @@ let tests = `Quick Test_tez_repr.test_data_encoding; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Tez_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_time_repr.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_time_repr.ml index 3eb21525727cb41df1647b2f5343718e12fcb83c..a8e48e3065433cbdb688721eaf344d56196428a4 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_time_repr.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_time_repr.ml @@ -1,8 +1,8 @@ (** Testing ------- Component: Protocol (time repr) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ - -- test "^\[Unit\] time$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_time_repr.ml Subject: Error handling of time operations *) @@ -43,3 +43,6 @@ let tests = Tztest.tztest "non-overflowing addition" `Quick test_nominal_add; Tztest.tztest "overflowing addition" `Quick test_overflow_add; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("time", tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/test_zk_rollup_storage.ml b/src/proto_017_PtNairob/lib_protocol/test/unit/test_zk_rollup_storage.ml index 0e0b1ea4ebcf6162edda241ea75ba7c523cda31b..a1ff8d4c4b849703ebfca043517beaa6d6ecb37f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/test_zk_rollup_storage.ml +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/test_zk_rollup_storage.ml @@ -26,8 +26,8 @@ (** Testing ------- Component: Protocol (Zk_rollup) - Invocation: cd src/proto_alpha/lib_protocol/test/unit && \ - dune exec ./main.exe -- test "^\[Unit\] zk rollup storage$" + Invocation: dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe \ + -- --file test_zk_rollup_storage.ml Subject: On ZK Rollup storage *) @@ -389,9 +389,10 @@ let tests = "pending_list_get errors" `Quick Raw_context_tests.pending_list_errors; - Tztest.tztest "test_update" `Quick Raw_context_tests.test_update; - Tztest.tztest - "test_update errors" - `Quick - Raw_context_tests.test_update_errors; + Tztest.tztest "update" `Quick Raw_context_tests.test_update; + Tztest.tztest "update errors" `Quick Raw_context_tests.test_update_errors; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("zk rollup storage", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/dune b/src/proto_alpha/lib_protocol/test/integration/consensus/dune index da75d5a3f0b5a8c766509abd4e627240c1a98f8f..92fe3e3fbd1a936d9958d4130a83b226f6d2c7af 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/dune +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/dune @@ -27,7 +27,6 @@ -open Tezos_protocol_alpha_parameters -open Tezos_protocol_plugin_alpha) (modules - test_main test_baking test_consensus_key test_deactivation diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_baking.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_baking.ml index 4cad6fc77b994ec9a6d6c1f11ae0c00be83a1bf9..02a41c865a12bb26c7d32b1b7505243e994e0e1e 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_baking.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_baking.ml @@ -28,7 +28,8 @@ (** Testing ------- Component: Protocol (baking) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_baking.ml Subject: Rewards and bakers. Tests based on RPCs. *) @@ -428,27 +429,27 @@ let test_committee_sampling () = let tests = [ Tztest.tztest "cycle" `Quick test_cycle; - Tztest.tztest - "test_bake_n_cycles for 12 cycles" - `Quick - (test_bake_n_cycles 12); + Tztest.tztest "bake_n_cycles for 12 cycles" `Quick (test_bake_n_cycles 12); Tztest.tztest "voting_power" `Quick test_voting_power_cache; Tztest.tztest "the fixed baking reward is given after a bake" `Quick test_basic_baking_reward; Tztest.tztest - "test that the block producer gets the bonus while the payload producer \ - gets the baking reward " + "the block producer gets the bonus while the payload producer gets the \ + baking reward " `Quick test_rewards_block_and_payload_producer; Tztest.tztest - "test that a delegate with 8000 tez can bake" + "a delegate with 8000 tez can bake" `Quick (test_enough_active_stake_to_bake ~has_active_stake:true); Tztest.tztest - "test that a delegate with 7999 tez cannot bake" + "a delegate with 7999 tez cannot bake" `Quick (test_enough_active_stake_to_bake ~has_active_stake:false); - Tztest.tztest "test committee sampling" `Quick test_committee_sampling; + Tztest.tztest "committee sampling" `Quick test_committee_sampling; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("baking", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_consensus_key.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_consensus_key.ml index 138b8c6f36d9011f12f1fe938de8eff999809c5d..0c89d84b30be6ef186925d2e00112503260ca680 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_consensus_key.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_consensus_key.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (delegate_storage) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_consensus_key.ml Subject: consistency of the [Drain_delegate] operation *) @@ -231,72 +232,73 @@ let tests = Tztest. [ tztest - "test drain delegate high balance, excluding ck, ck delegates" + "drain delegate high balance, excluding ck, ck delegates" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:true ~ck_delegates:true); tztest - "test drain delegate high balance, excluding ck, ck does not delegate" + "drain delegate high balance, excluding ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:true ~ck_delegates:false); tztest - "test drain delegate high balance, with ck, ck delegates" + "drain delegate high balance, with ck, ck delegates" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:false ~ck_delegates:true); tztest - "test drain delegate high balance, with ck, ck does not delegate" + "drain delegate high balance, with ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:false ~exclude_ck:false ~ck_delegates:false); tztest - "test drain delegate low balance, excluding ck, ck delegates" + "drain delegate low balance, excluding ck, ck delegates" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:true ~ck_delegates:true); tztest - "test drain delegate low balance, excluding ck, ck does not delegate" + "drain delegate low balance, excluding ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:true ~ck_delegates:false); tztest - "test drain delegate low balance, with ck, ck delegates" + "drain delegate low balance, with ck, ck delegates" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:false ~ck_delegates:true); tztest - "test drain delegate low balance, with ck, ck does not delegate" + "drain delegate low balance, with ck, ck does not delegate" `Quick (test_drain_delegate ~low_balance:true ~exclude_ck:false ~ck_delegates:false); tztest - "test empty drain delegate excluding ck" + "empty drain delegate excluding ck" `Quick (test_drain_empty_delegate ~exclude_ck:true); tztest - "test empty drain delegate with ck" + "empty drain delegate with ck" `Quick (test_drain_empty_delegate ~exclude_ck:false); - tztest "test tz4 consensus key" `Quick test_tz4_consensus_key; - tztest - "test endorsement with ck" - `Quick - test_endorsement_with_consensus_key; + tztest "tz4 consensus key" `Quick test_tz4_consensus_key; + tztest "endorsement with ck" `Quick test_endorsement_with_consensus_key; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("consensus key", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml index c9a10f20ae2b76f1fb175767bbd17599b6fcd71a..387d8337413ffa593556f883dd76ab942b8fe2fe 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_deactivation.ml Subject: After a given number of cycles during which a delegate has not made use of its baking and endorsing rights, its account will be deactivated for validator selection. To bake/endorse @@ -354,3 +355,7 @@ let tests = `Quick test_a_really_deactivated_account_is_not_in_the_committee; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("deactivation", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml index 1a79b105989182bf2fecf217dae04516c1a53aed..c8cbfdea636fb7295e7e7f5138e6ca3da5e1b570 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_delegation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (delegation) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_delegation.ml Subject: - Properties on bootstrap contracts (self-delegation, cannot delete/change their delegate (as opposed to contracts not-being-delegate which can do these), bootstrap manager @@ -1612,3 +1613,7 @@ let tests_delegate_registration = (******************************************************************************) let tests = tests_bootstrap_contracts @ tests_delegate_registration + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("delegation", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_baking.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_baking.ml index ef55679db504cc8dc261b8d871875aa91f5a6615..83222fafe1d609159f46339aea23a1661f26997c 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_baking.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_baking.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (double baking) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_double_baking.ml Subject: A double baking evidence operation may be injected when it has been observed that a baker baked two different blocks at the same level and same round. @@ -459,3 +460,7 @@ let tests = `Quick test_valid_double_endorsing_followed_by_double_baking; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("double baking", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_endorsement.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_endorsement.ml index b9afa66747390594066b140717fb0fe4283dbf5f..5bad9e140bece651fb67052a88ad9cb61e23ee4f 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_endorsement.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_endorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (double endorsement) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_double_endorsement.ml Subject: Double endorsement evidence operation may happen when an endorser endorsed two different blocks on the same level. *) @@ -555,3 +556,7 @@ let tests = `Quick test_freeze_more_with_low_balance; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("double endorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_preendorsement.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_preendorsement.ml index b4fe816037fbe3fe5988e6fb34d236940e52ed75..eeeff16940ceb4237981b20826d6ba5c65bf2b5e 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_preendorsement.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_preendorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (double preendorsement) in Full_construction & Application modes - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_double_preendorsement.ml Subject: These tests target different cases for double preendorsement *) open Protocol @@ -398,3 +399,7 @@ let tests = let baking_mode = Block.Baking end) in AppMode.tests @ ConstrMode.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("double preendorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_endorsement.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_endorsement.ml index 78e2ba88c2b5d6277134db7baafc379daadd0cc5..bd832aa286f875b281b3cd099c0c490af943592d 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_endorsement.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_endorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (endorsement) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_endorsement.ml Subject: Endorsing a block adds an extra layer of confidence to the Tezos' PoS algorithm. The block endorsing operation must be included in the following block. @@ -684,3 +685,7 @@ let tests = `Quick (test_endorsement_threshold ~sufficient_threshold:false); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("endorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml index 94a3822c88f14554ef267d557577ed63104c59be..302e2398530d83a5b2a20f004ad9a0638fe706c4 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (frozen_deposits) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_frozen_deposits.ml Subject: consistency of frozen deposits and the [set_deposits_limit] operation *) @@ -651,7 +652,7 @@ let test_error_is_thrown_when_smaller_upper_bound_for_frozen_window () = let tests = Tztest. [ - tztest "test invariants" `Quick test_invariants; + tztest "invariants" `Quick test_invariants; tztest "set deposits limit to 0%" `Quick (test_set_limit 0); tztest "set deposits limit to 5%" `Quick (test_set_limit 5); tztest "unset deposits limit" `Quick test_unset_limit; @@ -672,15 +673,19 @@ let tests = `Quick test_frozen_deposits_with_delegation; tztest - "test frozen deposits with overdelegation" + "frozen deposits with overdelegation" `Quick test_frozen_deposits_with_overdelegation; tztest - "test set limit with overdelegation" + "set limit with overdelegation" `Quick test_set_limit_with_overdelegation; tztest - "test error is thrown when the frozen window is smaller" + "error is thrown when the frozen window is smaller" `Quick test_error_is_thrown_when_smaller_upper_bound_for_frozen_window; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("frozen deposits", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml index c4f592c553d127ab7c4fa87ca4a6b952de799fb3..b2110081e2d7bc3cc3c28afd03c40544139dc786 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_helpers_rpcs.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Helpers RPCs) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_helpers_rpcs.ml Subject: On RPCs. *) @@ -61,3 +62,7 @@ let test_baking_rights () = return_unit let tests = [Tztest.tztest "baking_rights" `Quick test_baking_rights] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("helpers rpcs", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_main.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_main.ml deleted file mode 100644 index 7e4523930be76abb89bc2c12ad4aae73341f35aa..0000000000000000000000000000000000000000 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_main.ml +++ /dev/null @@ -1,53 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > consensus" - [ - (Protocol.name ^ ": endorsement", Test_endorsement.tests); - (Protocol.name ^ ": preendorsement", Test_preendorsement.tests); - (Protocol.name ^ ": double endorsement", Test_double_endorsement.tests); - ( Protocol.name ^ ": double preendorsement", - Test_double_preendorsement.tests ); - (Protocol.name ^ ": double baking", Test_double_baking.tests); - (Protocol.name ^ ": seed", Test_seed.tests); - (Protocol.name ^ ": baking", Test_baking.tests); - (Protocol.name ^ ": delegation", Test_delegation.tests); - (Protocol.name ^ ": deactivation", Test_deactivation.tests); - (Protocol.name ^ ": helpers rpcs", Test_helpers_rpcs.tests); - (Protocol.name ^ ": participation monitoring", Test_participation.tests); - (Protocol.name ^ ": frozen deposits", Test_frozen_deposits.tests); - (Protocol.name ^ ": consensus key", Test_consensus_key.tests); - ] - |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_participation.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_participation.ml index 6f7014e75e510b89c26815ad80d7b2e2b8587e35..b01e0c0d3b210d8d8f383ccb2b22e41ac50221f2 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_participation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_participation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (participation monitoring) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_participation.ml Subject: Participation monitoring in Tenderbake *) @@ -192,12 +193,16 @@ let test_participation_rpc () = let tests = [ Tztest.tztest - "test insufficient participation" + "insufficient participation" `Quick (test_participation ~sufficient_participation:false); Tztest.tztest - "test minimal participation" + "minimal participation" `Quick (test_participation ~sufficient_participation:true); - Tztest.tztest "test participation RPC" `Quick test_participation_rpc; + Tztest.tztest "participation RPC" `Quick test_participation_rpc; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("participation monitoring", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_preendorsement.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_preendorsement.ml index f453b7f34bc870a0c8bc10e5b7e9f806482d2690..6c76c6c4cbc339bd4b1e1c256abc8c0f4d77a57b 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_preendorsement.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_preendorsement.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (preendorsement) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_preendorsement.ml *) open Protocol @@ -234,3 +235,7 @@ let tests = `Quick test_preendorsement_for_next_round; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("preendorsement", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_seed.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_seed.ml index ccd0a6af169a342169e0a11bddcbf48250e4360b..37c428c24dc53be12cfe61bdc0650fb39a48a5b6 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_seed.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_seed.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (seed) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ + -- --file test_seed.ml Subject: - seed_nonce_hash included in some blocks - revelation operation of seed_nonce that should correspond to each seed_nonce_hash @@ -636,11 +637,14 @@ let tests = "revelation_missing_and_late" `Quick test_revelation_missing_and_late; - Tztest.tztest "test unrevealed" `Quick test_unrevealed; + Tztest.tztest "unrevealed" `Quick test_unrevealed; Tztest.tztest - "test_early_incorrect_unverified_correct_already_vdf" + "early_incorrect_unverified_correct_already_vdf" `Quick test_early_incorrect_unverified_correct_already_vdf; - Tztest.tztest "test VDF status" `Quick test_vdf_status; + Tztest.tztest "VDF status" `Quick test_vdf_status; Tztest.tztest "for_cycle cycle bounds" `Quick test_cycle_bounds; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("seed", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/dune b/src/proto_alpha/lib_protocol/test/integration/dune index 0954df49cb7acfa7f0d325cd27f71ec69a440faa..ce2cc809c2d40901e4b7f21d2a63561bdb27fe54 100644 --- a/src/proto_alpha/lib_protocol/test/integration/dune +++ b/src/proto_alpha/lib_protocol/test/integration/dune @@ -29,7 +29,6 @@ -open Tezos_alpha_test_helpers -open Tezos_base_test_helpers) (modules - test_main test_constants test_frozen_bonds test_liquidity_baking diff --git a/src/proto_alpha/lib_protocol/test/integration/gas/dune b/src/proto_alpha/lib_protocol/test/integration/gas/dune index 8af85ef19f2ca55835bef016f9e7d9f45e2310df..0dec55471c64b959d991a965bc66ab948c312763 100644 --- a/src/proto_alpha/lib_protocol/test/integration/gas/dune +++ b/src/proto_alpha/lib_protocol/test/integration/gas/dune @@ -22,7 +22,7 @@ -open Tezos_protocol_alpha -open Tezos_alpha_test_helpers -open Tezos_base_test_helpers) - (modules test_main test_gas_costs test_gas_levels)) + (modules test_gas_costs test_gas_levels)) (executable (name main) diff --git a/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_costs.ml b/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_costs.ml index bd6d0afb3ae901960bb2b6c1149bd55a78501dfc..928902289dbd810072935b4ea81d4e3a272196d9 100644 --- a/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_costs.ml +++ b/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_costs.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (gas costs) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/gas/main.exe \ + -- --file test_gas_costs.ml Subject: Gas costs Current limitations: for maps, sets & compare, we only test integer comparable keys. @@ -282,3 +283,7 @@ let tests = `Quick (test_cost_reprs_are_all_positive all_io_costs); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("gas cost functions", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_levels.ml b/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_levels.ml index 77f266fc4d30684fcb551221f452e42750332603..8127a9f0ec878e1d451d53407af48dd8747bf269 100644 --- a/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_levels.ml +++ b/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_levels.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Gas levels) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/gas/main.exe \ + -- --file test_gas_levels.ml Subject: On gas consumption and exhaustion. *) @@ -397,10 +398,10 @@ let make_batch_test_block_one_origination name contract gas_sampler = let app_n = List.map (fun (x, y) -> (x ^ " with contract " ^ name, y)) in app_n [ - ("Test bake one operation", test_one_operation); - ("Test bake one operation list", test_one_operation_list); - ("Test multiple single operations", test_many_single_operations); - ("Test both lists and single operations", test_mixed_operations); + ("bake one operation", test_one_operation); + ("bake one operation list", test_one_operation_list); + ("multiple single operations", test_many_single_operations); + ("both lists and single operations", test_mixed_operations); ] (** Tests the consumption of all gas in a block, should pass *) @@ -553,9 +554,8 @@ let tests = ( "Detect when gas limit of operation list exceeds the hard gas limit \ per block", test_malformed_block_max_limit_reached' ); - ( "Test the gas consumption of various operations", - test_block_mixed_operations ); - ("Test that emptying an account costs gas", test_emptying_account_gas); + ("the gas consumption of various operations", test_block_mixed_operations); + ("emptying an account costs gas", test_emptying_account_gas); ] @ make_batch_test_block_one_origination "nil" nil_contract basic_gas_sampler @ make_batch_test_block_one_origination @@ -566,3 +566,7 @@ let tests = "infinite loop" loop_contract basic_gas_sampler) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("gas levels", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/gas/test_main.ml b/src/proto_alpha/lib_protocol/test/integration/gas/test_main.ml deleted file mode 100644 index c5bb194a141618c1179c38ed7cc88dbd4de2f8ee..0000000000000000000000000000000000000000 --- a/src/proto_alpha/lib_protocol/test/integration/gas/test_main.ml +++ /dev/null @@ -1,41 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol > Gas - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > gas" - [ - (Protocol.name ^ ": gas levels", Test_gas_levels.tests); - (Protocol.name ^ ": gas cost functions", Test_gas_costs.tests); - ] - |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/dune b/src/proto_alpha/lib_protocol/test/integration/michelson/dune index 5c2630b076eb8fffbfae3e22d846e1910a79cb35..2d1bdf43125dba69cd3b22a3e6db36f39170838f 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/dune +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/dune @@ -35,7 +35,6 @@ -open Tezos_benchmark_type_inference_alpha -open Tezos_protocol_plugin_alpha) (modules - test_main test_annotations test_block_time_instructions test_contract_event diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_annotations.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_annotations.ml index fea6f2894bfac441868532230fd75c1321b404f6..ae922dacf11aafce4bdd248a355d9c65b6a068c3 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_annotations.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_annotations.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Michelson annotations) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_annotations.ml Subject: This module tests that Michelson annotations are properly handled. *) @@ -135,3 +136,7 @@ let tests = `Quick test_internal_origination; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("annotations", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_block_time_instructions.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_block_time_instructions.ml index 128ad6b3684002b8ae39074865c964d4aa494f10..047086044bb2f55b7f4bc7de57440f6d437fcb37 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_block_time_instructions.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_block_time_instructions.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Michelson block-time instructions) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_block_time_instructions.ml Subject: This module tests that Michelson instructions related to block time are correct. *) @@ -77,3 +78,7 @@ let tests = `Quick test_min_block_time; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("block time instructions", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_contract_event.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_contract_event.ml index 7919cee4f28ca1c2a8c54c7f813d3d6f0f067da6..b0bbb74931836162b95a24b0e3dbde2b1ae869d7 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_contract_event.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_contract_event.ml @@ -29,7 +29,8 @@ open Alpha_context (** Testing ------- Component: Protocol (event logging) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_contract_event.ml Subject: This module tests that the event logs can be written to the receipt in correct order and expected format. *) @@ -133,3 +134,7 @@ let tests = `Quick contract_test; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("event logging", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_global_constants_storage.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_global_constants_storage.ml index 53cdbd060db7771f43ab3bf7bafb721fe22eed59..9cc3325e0b03a8984b5c6d481d1a8f360001dcff 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_global_constants_storage.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_global_constants_storage.ml @@ -29,7 +29,8 @@ open Transfers (** Testing ------- Component: Protocol (global table of constants) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_global_constants_storage.ml Subject: This module tests that the global table of constants can be written to and read from across blocks. *) @@ -129,3 +130,10 @@ let tests = `Quick test_no_double_register; ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("global table of constants", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_interpretation.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_interpretation.ml index 82110bd3afdd6abac40ff676917394346e116cd3..5c4738abd5a8dd88f4ed31ce3c251a19fd7a8573 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_interpretation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_interpretation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (interpretation) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_interpretation.ml Subject: Interpretation of Michelson scripts *) @@ -370,28 +371,28 @@ let path = project_root // Filename.dirname __FILE__ let tests = [ - Tztest.tztest "test bad contract error" `Quick test_bad_contract_parameter; + Tztest.tztest "bad contract error" `Quick test_bad_contract_parameter; Tztest.tztest "check robustness overflow error" `Slow test_stack_overflow; Tztest.tztest "check robustness overflow error in lwt" `Slow test_stack_overflow_in_lwt; Tztest.tztest - "test multiplication no illegitimate overflow" + "multiplication no illegitimate overflow" `Quick test_multiplication_close_to_overflow_passes; - Tztest.tztest "test stack overflow error" `Slow test_stack_overflow; + Tztest.tztest "stack overflow error" `Slow test_stack_overflow; Tztest.tztest_qcheck2 - ~name:"test map instr against options" + ~name:"map instr against options" QCheck2.Gen.( triple (opt small_signed_int) (opt small_signed_int) small_signed_int) Test_map_instr_on_options.test_mapping; Tztest.tztest - "test lambda_rec instruction" + "lambda_rec instruction" `Quick (test_contract_success (path // "contracts/rec_fact.tz") "0" "5" "120"); Tztest.tztest - "test lambda_rec instruction with apply" + "lambda_rec instruction with apply" `Quick (test_contract_success (path // "contracts/rec_fact_apply.tz") @@ -399,11 +400,11 @@ let tests = "5" "120"); Tztest.tztest - "test lambda_rec instruction with an infinite recursion" + "lambda_rec instruction with an infinite recursion" `Quick (test_contract_fail (path // "contracts/omega.tz") "Unit" "Unit"); Tztest.tztest - "test lambda_rec instruction storage" + "lambda_rec instruction storage" `Quick (test_store_and_reload (path // "contracts/rec_fact_store.tz") @@ -422,7 +423,7 @@ let tests = ~param_2:"5" ~expected_storage_str_2:"Left 120"); Tztest.tztest - "test lambda_rec instruction storage apply store" + "lambda_rec instruction storage apply store" `Quick (test_store_and_reload (path // "contracts/rec_fact_apply_store.tz") @@ -450,3 +451,7 @@ let tests = ~expected_storage_str_2:"Left 120"); ] @ error_encoding_tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("interpretation", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_lambda_normalization.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_lambda_normalization.ml index 8f074b7934a61de52c0494a6ec097c7b98c11c4c..7c4f246a968673d2d66aec8852185ff2044483d6 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_lambda_normalization.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_lambda_normalization.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Michelson) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_lambda_normalization.ml Subject: Test that lambdas are normalized to optimized format at elaboration *) @@ -227,7 +228,11 @@ let test_lambda_normalization () = let tests = [ Tztest.tztest - "Test that lambdas are normalized to optimized format during elaboration" + "lambdas are normalized to optimized format during elaboration" `Quick test_lambda_normalization; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("lambda normalization", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml index 03a84159c6b24ab6a7c4446adfd30b9dd8b1338d..e69de0e27f249036cb0ddaf8abdb391de14fe36e 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_lazy_storage_diff.ml @@ -23,6 +23,14 @@ (* *) (*****************************************************************************) +(** Testing + ------- + Component: Protocol (Michelson) + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_lazy_storage_diff.ml + Subject: Test lazy storage +*) + open Protocol (** Generation of input data *) @@ -138,3 +146,7 @@ let tests = Tztest.tztest "conversion roundtrip" `Slow (on_diffs conversion_roundtrip); Tztest.tztest "encoding roundtrip" `Slow (on_diffs encoding_roundtrip); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("lazy storage diff", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_main.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_main.ml deleted file mode 100644 index b218726bc9ff19406f13bce39f05acc21faf6215..0000000000000000000000000000000000000000 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_main.ml +++ /dev/null @@ -1,64 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe - Subject: Integration > Michelson -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > michelson" - [ - ( Protocol.name ^ ": global table of constants", - Test_global_constants_storage.tests ); - (Protocol.name ^ ": interpretation", Test_interpretation.tests); - (Protocol.name ^ ": lazy storage diff", Test_lazy_storage_diff.tests); - (Protocol.name ^ ": sapling", Test_sapling.tests); - (Protocol.name ^ ": script typed ir size", Test_script_typed_ir_size.tests); - (Protocol.name ^ ": temp big maps", Test_temp_big_maps.tests); - (Protocol.name ^ ": ticket balance key", Test_ticket_balance_key.tests); - (Protocol.name ^ ": ticket scanner", Test_ticket_scanner.tests); - (Protocol.name ^ ": ticket storage", Test_ticket_storage.tests); - ( Protocol.name ^ ": ticket lazy storage diff", - Test_ticket_lazy_storage_diff.tests ); - ( Protocol.name ^ ": ticket operations diff", - Test_ticket_operations_diff.tests ); - (Protocol.name ^ ": ticket accounting", Test_ticket_accounting.tests); - (Protocol.name ^ ": ticket balance", Test_ticket_balance.tests); - (Protocol.name ^ ": ticket manager", Test_ticket_manager.tests); - (Protocol.name ^ ": typechecking", Test_typechecking.tests); - (Protocol.name ^ ": script cache", Test_script_cache.tests); - ( Protocol.name ^ ": block time instructions", - Test_block_time_instructions.tests ); - (Protocol.name ^ ": annotations", Test_annotations.tests); - (Protocol.name ^ ": event logging", Test_contract_event.tests); - (Protocol.name ^ ": patched contracts", Test_patched_contracts.tests); - (Protocol.name ^ ": lambda normalization", Test_lambda_normalization.tests); - ] - |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_patched_contracts.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_patched_contracts.ml index 60b76797557c999e19a1f326c62802f442a94bfe..0f6be435917d6f941c7808f4a51e4ee2e4098df4 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_patched_contracts.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_patched_contracts.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Migration (patched scripts) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_patched_contracts.ml Subject: Migration *) @@ -215,3 +216,7 @@ let tests = let module Test = Legacy_patch_test (Patches) in List.concat_map Test.tests Patches.patches) test_modules + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("patched contracts", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml index 8cf026bfb9c00810436bd982585c204645d3814c..a5c6a9e1b706431f4c151dad1788a989f3e3c8e9 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Sapling) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_sapling.ml Subject: On the privacy-preserving library Sapling *) @@ -1180,38 +1181,32 @@ let tests = `Quick Raw_context_tests.list_insertion_test; Tztest.tztest "root" `Quick Raw_context_tests.root_test; + Tztest.tztest "get_memo_size" `Quick Raw_context_tests.test_get_memo_size; + Tztest.tztest "verify_memo" `Quick Alpha_context_tests.test_verify_memo; + Tztest.tztest "bench_phases" `Slow Alpha_context_tests.test_bench_phases; Tztest.tztest - "test_get_memo_size" - `Quick - Raw_context_tests.test_get_memo_size; - Tztest.tztest "test_verify_memo" `Quick Alpha_context_tests.test_verify_memo; - Tztest.tztest - "test_bench_phases" - `Slow - Alpha_context_tests.test_bench_phases; - Tztest.tztest - "test_bench_phases_legacy" + "bench_phases_legacy" `Quick Alpha_context_tests.test_bench_phases_legacy; Tztest.tztest - "test_bench_fold_over_same_token" + "bench_fold_over_same_token" `Slow Alpha_context_tests.test_bench_fold_over_same_token; Tztest.tztest - "test_double_spend_same_input" + "double_spend_same_input" `Quick Alpha_context_tests.test_double_spend_same_input; Tztest.tztest - "test_verifyupdate_one_transaction" + "verifyupdate_one_transaction" `Quick Alpha_context_tests.test_verifyupdate_one_transaction; Tztest.tztest - "test_verifyupdate_two_transactions" + "verifyupdate_two_transactions" `Quick Alpha_context_tests.test_verifyupdate_two_transactions; - Tztest.tztest "test_shielded_tez" `Quick Interpreter_tests.test_shielded_tez; + Tztest.tztest "shielded_tez" `Quick Interpreter_tests.test_shielded_tez; Tztest.tztest - "test use state from other contract and transact" + "use state from other contract and transact" `Quick Interpreter_tests.test_use_state_from_other_contract_and_transact; Tztest.tztest @@ -1219,10 +1214,13 @@ let tests = `Quick Interpreter_tests.test_push_sapling_state_should_be_forbidden; Tztest.tztest - "test_transac_and_block" + "transac_and_block" `Quick Interpreter_tests.test_transac_and_block; - Tztest.tztest "test_drop" `Quick Interpreter_tests.test_drop; - Tztest.tztest "test_double" `Quick Interpreter_tests.test_double; - Tztest.tztest "test_state_as_arg" `Quick Interpreter_tests.test_state_as_arg; + Tztest.tztest "drop" `Quick Interpreter_tests.test_drop; + Tztest.tztest "double" `Quick Interpreter_tests.test_double; + Tztest.tztest "state_as_arg" `Quick Interpreter_tests.test_state_as_arg; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sapling", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml index 8d64159bd8d6fbd00e5bbe9913b4ac63d2cfc0a0..0177c074c20e195bd42df2771d4c1db52ab1351b 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (cache) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_script_cache.ml Subject: These unit tests check basic behavior of script cache *) @@ -434,3 +435,7 @@ let tests = test_size_limit_is_in_constants_repr; tztest "entries show LRU behavior" `Quick test_entries_shows_lru; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("script cache", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml index 5652969b2fc5bc9a5967e16fe15a1aacdea852c8..6422c891e5d9471a7d33f80edd42ce19e92515c2 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_typed_ir_size.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (script typed IR size) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_script_typed_ir_size.ml Subject: Script_typed_ir computes good approximation of values' sizes *) @@ -1040,9 +1041,13 @@ let check_micheline_sizes () = let tests = let open Tztest in [ - tztest "check value size" `Quick check_value_size; - tztest "check ty size" `Quick check_ty_size; - tztest "check kinstr size" `Quick check_kinstr_size; - tztest "check witness sizes" `Quick check_witness_sizes; - tztest "check micheline sizes" `Quick check_micheline_sizes; + tztest "value size" `Quick check_value_size; + tztest "ty size" `Quick check_ty_size; + tztest "kinstr size" `Quick check_kinstr_size; + tztest "witness sizes" `Quick check_witness_sizes; + tztest "micheline sizes" `Quick check_micheline_sizes; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("script typed ir size", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_temp_big_maps.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_temp_big_maps.ml index 1b971500280ce82f3057c8c85f30dfd0b215e1c5..4206b836b05fb8fceaafd5b7e37cab0b4c5066ea 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_temp_big_maps.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_temp_big_maps.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (temporary big maps) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_temp_big_maps.ml Subject: On temporary big maps. *) @@ -100,3 +101,7 @@ let tests = (test_temp_big_maps_contract param_left param_right)) param_right_values) param_left_values) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("temp big maps", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_accounting.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_accounting.ml index 4a4abd260a96509000cedb6f184c75d266b2549a..f7b3e4bcbc350362da702a434602d8eade2882e8 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_accounting.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_accounting.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_accounting.ml Subject: Ticket scanner tests *) @@ -1434,7 +1435,11 @@ let tests = `Quick test_update_self_origination; Tztest.tztest - "Test ticket-token map with duplicate keys" + "ticket-token map with duplicate keys" `Quick test_ticket_token_map_of_list_with_duplicates; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket accounting", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance.ml index c8a342b0fa7102690376c7b76b692da03fabebd3..909f6b0bb1ff55f4bb958524cc04b74eff4c9707 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_balance_key) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_balance.ml Subject: Ticket balance key hashing *) @@ -1756,34 +1757,35 @@ let test_storage_for_create_and_remove_tickets () = let tests = [ - Tztest.tztest "Test add strict" `Quick test_add_strict; - Tztest.tztest "Test add and remove" `Quick test_add_remove; - Tztest.tztest "Test add to big-map" `Quick test_add_to_big_map; - Tztest.tztest "Test swap big-map" `Quick test_swap_big_map; - Tztest.tztest "Test send ticket" `Quick test_send_tickets; + Tztest.tztest "add strict" `Quick test_add_strict; + Tztest.tztest "add and remove" `Quick test_add_remove; + Tztest.tztest "add to big-map" `Quick test_add_to_big_map; + Tztest.tztest "swap big-map" `Quick test_swap_big_map; + Tztest.tztest "send ticket" `Quick test_send_tickets; Tztest.tztest - "Test send ticket to implicit" + "send ticket to implicit" `Quick test_send_tickets_to_implicit_account; Tztest.tztest - "Test send and store tickets with amount 0" + "send and store tickets with amount 0" `Quick test_send_and_store_zero_amount_tickets; + Tztest.tztest "send tickets in big-map" `Quick test_send_tickets_in_big_map; + Tztest.tztest "modify big-map" `Quick test_modify_big_map; + Tztest.tztest "send drop" `Quick test_send_tickets_in_big_map_and_drop; Tztest.tztest - "Test send tickets in big-map" - `Quick - test_send_tickets_in_big_map; - Tztest.tztest "Test modify big-map" `Quick test_modify_big_map; - Tztest.tztest "Test send drop" `Quick test_send_tickets_in_big_map_and_drop; - Tztest.tztest - "Test create contract with ticket" + "create contract with ticket" `Quick test_create_contract_with_ticket; - Tztest.tztest "Test join" `Quick test_join_tickets; - Tztest.tztest "Test wallet" `Quick test_ticket_wallet; - Tztest.tztest "Test ticket storage" `Quick test_ticket_storage; + Tztest.tztest "join" `Quick test_join_tickets; + Tztest.tztest "wallet" `Quick test_ticket_wallet; + Tztest.tztest "ticket storage" `Quick test_ticket_storage; Tztest.tztest - "Test storage for create and remove tickets" + "storage for create and remove tickets" `Quick test_storage_for_create_and_remove_tickets; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket balance", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml index 6207afdb8a1a20c2d7d2d961a21a8fbbabbb0eca..419642d47780dbef18b319e423dbbc5edb432ee5 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_balance_key) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_balance_key.ml Subject: Ticket balance key hashing *) @@ -425,30 +426,28 @@ let test_option_some () = let tests = [ - Tztest.tztest "Test different ticketers" `Quick test_different_ticketers; - Tztest.tztest "Test different owners" `Quick test_different_owners; - Tztest.tztest "Test different content" `Quick test_different_content; - Tztest.tztest "Test different amounts" `Quick test_different_amounts; - Tztest.tztest "Test nat int" `Quick test_nat_int; - Tztest.tztest "Test nat mutez" `Quick test_nat_mutez; - Tztest.tztest "Test not bool" `Quick test_bool_nat; - Tztest.tztest "Test nat bytes" `Quick test_nat_bytes; - Tztest.tztest "Test string chain_id" `Quick test_string_chain_id; - Tztest.tztest "Test string key_hash" `Quick test_string_key_hash; - Tztest.tztest "Test string timestamp" `Quick test_string_timestamp; - Tztest.tztest "Test string address" `Quick test_string_address; - Tztest.tztest "Test string key" `Quick test_string_key; - Tztest.tztest "Test string signature" `Quick test_string_signature; - Tztest.tztest "Test annotations for pair" `Quick test_annotation_pair; - Tztest.tztest "Test annotations for or" `Quick test_annotation_or; - Tztest.tztest - "Test annotations for type alias" - `Quick - test_annotation_type_alias; - Tztest.tztest - "Test annotations for paired ors" - `Quick - test_annotation_pair_or; - Tztest.tztest "Test option none" `Quick test_option_none; - Tztest.tztest "Test option some" `Quick test_option_some; + Tztest.tztest "different ticketers" `Quick test_different_ticketers; + Tztest.tztest "different owners" `Quick test_different_owners; + Tztest.tztest "different content" `Quick test_different_content; + Tztest.tztest "different amounts" `Quick test_different_amounts; + Tztest.tztest "nat int" `Quick test_nat_int; + Tztest.tztest "nat mutez" `Quick test_nat_mutez; + Tztest.tztest "not bool" `Quick test_bool_nat; + Tztest.tztest "nat bytes" `Quick test_nat_bytes; + Tztest.tztest "string chain_id" `Quick test_string_chain_id; + Tztest.tztest "string key_hash" `Quick test_string_key_hash; + Tztest.tztest "string timestamp" `Quick test_string_timestamp; + Tztest.tztest "string address" `Quick test_string_address; + Tztest.tztest "string key" `Quick test_string_key; + Tztest.tztest "string signature" `Quick test_string_signature; + Tztest.tztest "annotations for pair" `Quick test_annotation_pair; + Tztest.tztest "annotations for or" `Quick test_annotation_or; + Tztest.tztest "annotations for type alias" `Quick test_annotation_type_alias; + Tztest.tztest "annotations for paired ors" `Quick test_annotation_pair_or; + Tztest.tztest "option none" `Quick test_option_none; + Tztest.tztest "option some" `Quick test_option_some; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket balance key", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml index b15596bd6bafd7216017016759878889d0f826bb..4e6cfd96380c0717febce3d68021c94e4cb8e845 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_lazy_storage_diff.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_lazy_storage_diff.ml Subject: Ticket scanner tests *) @@ -660,38 +661,36 @@ let test_mix_lazy_diffs () = let tests = [ - Tztest.tztest "Test allocate new empty" `Quick test_allocate_new_empty; - Tztest.tztest "Test allocate new" `Quick test_allocate_new; - Tztest.tztest - "Test allocate new no tickets" - `Quick - test_allocate_new_no_tickets; + Tztest.tztest "allocate new empty" `Quick test_allocate_new_empty; + Tztest.tztest "allocate new" `Quick test_allocate_new; + Tztest.tztest "allocate new no tickets" `Quick test_allocate_new_no_tickets; Tztest.tztest "Remove" `Quick test_remove_big_map; Tztest.tztest - "Test no updates to existing" + "no updates to existing" `Quick test_no_updates_to_existing_big_map; + Tztest.tztest "update existing big-map" `Quick test_update_existing_big_map; Tztest.tztest - "Test update existing big-map" - `Quick - test_update_existing_big_map; - Tztest.tztest - "Test update same key multiple times on existing big-map" + "update same key multiple times on existing big-map" `Quick test_update_same_key_multiple_times_existing_big_map; Tztest.tztest - "Test remove same key multiple times on existing big-map" + "remove same key multiple times on existing big-map" `Quick test_remove_same_key_multiple_times_existing_big_map; Tztest.tztest - "Test update and remove same key multiple times on existing big-map" + "update and remove same key multiple times on existing big-map" `Quick test_update_and_remove_same_key_multiple_times_existing_big_map; - Tztest.tztest "Test copy" `Quick test_copy_big_map; - Tztest.tztest "Test copy with updates" `Quick test_copy_big_map_with_updates; + Tztest.tztest "copy" `Quick test_copy_big_map; + Tztest.tztest "copy with updates" `Quick test_copy_big_map_with_updates; Tztest.tztest - "Test copy with multiple updates to same key" + "copy with multiple updates to same key" `Quick test_copy_big_map_with_updates_to_same_key; - Tztest.tztest "Test mix lazy diffs" `Quick test_mix_lazy_diffs; + Tztest.tztest "mix lazy diffs" `Quick test_mix_lazy_diffs; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket lazy storage diff", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_manager.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_manager.ml index 7c7d7fbd2e71d56845391d19b0fb4bc49a30e400..1d24fa931e23ee5fa3aed87dafdc300b46404f5b 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_manager.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_manager.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_balance_key) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_manager.ml Subject: Tests that compare the ticket-balance table against tickets in the contract storages. The tests include a lot of operations that sends and store tickets. After each operation we check that the @@ -810,3 +811,7 @@ let tests = test_add_remove_from_lazy_storage; Tztest.tztest "Mix of operations" `Quick test_mixed_operations; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket manager", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml index d82c926632fbb6a36853f9846493a70d41b99c30..b2da9d99fb58f013ef41a7f1cd9c6a75c4248b48 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_operations_diff.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_operations_diff.ml Subject: Ticket scanner tests *) @@ -1241,72 +1242,73 @@ let test_fail_on_zero_amount_tickets () = let tests = [ Tztest.tztest - "Test operations that do not involve tickets" + "operations that do not involve tickets" `Quick test_non_ticket_operations; Tztest.tztest - "Test transfer to non-ticket contract" + "transfer to non-ticket contract" `Quick test_transfer_to_non_ticket_contract; Tztest.tztest - "Test transfer empty ticket list" + "transfer empty ticket list" `Quick test_transfer_empty_ticket_list; - Tztest.tztest "Test transfer one ticket" `Quick test_transfer_one_ticket; + Tztest.tztest "transfer one ticket" `Quick test_transfer_one_ticket; Tztest.tztest - "Test transfer multiple tickets" + "transfer multiple tickets" `Quick test_transfer_multiple_tickets; Tztest.tztest - "Test transfer different tickets" + "transfer different tickets" `Quick test_transfer_different_tickets; Tztest.tztest - "Test transfer to two contracts with different tickets" + "transfer to two contracts with different tickets" `Quick test_transfer_to_two_contracts_with_different_tickets; Tztest.tztest - "Test originate contract that does not contain tickets" + "originate contract that does not contain tickets" `Quick test_originate_non_ticket_contract; Tztest.tztest - "Test originate with empty ticket list" + "originate with empty ticket list" `Quick test_originate_with_empty_tickets_list; Tztest.tztest - "Test originate with one ticket" + "originate with one ticket" `Quick test_originate_with_one_ticket; Tztest.tztest - "Test originate with multiple tickets" + "originate with multiple tickets" `Quick test_originate_with_multiple_tickets; Tztest.tztest - "Test originate with different tickets" + "originate with different tickets" `Quick test_originate_with_different_tickets; Tztest.tztest - "Test originate two contracts with different tickets" + "originate two contracts with different tickets" `Quick test_originate_two_contracts_with_different_tickets; + Tztest.tztest "originate and transfer" `Quick test_originate_and_transfer; Tztest.tztest - "Test originate and transfer" - `Quick - test_originate_and_transfer; - Tztest.tztest - "Test originate big-map with tickets" + "originate big-map with tickets" `Quick test_originate_big_map_with_tickets; Tztest.tztest - "Test transfer big-map with tickets" + "transfer big-map with tickets" `Quick test_transfer_big_map_with_tickets; Tztest.tztest - "Test transfer fails on multiple zero tickets" + "transfer fails on multiple zero tickets" `Quick test_transfer_fails_on_multiple_zero_tickets; Tztest.tztest - "Test fail in zero-amount tickets" + "fail in zero-amount tickets" `Quick test_fail_on_zero_amount_tickets; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket operations diff", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_scanner.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_scanner.ml index a93daf390818ce7451fe96f9d4935ec7781effe7..4d96d28e019a8bcaf7f2c5bbbdafba40219d51bd 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_scanner.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_scanner.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol (Ticket_scanner) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_scanner.ml Subject: Ticket scanner tests *) @@ -632,67 +633,67 @@ let test_tickets_remove_overlay_in_non_empty_in_big_map_ref () = let tests = [ + Tztest.tztest "tickets in unit ticket" `Quick test_tickets_in_unit_ticket; + Tztest.tztest "tickets in list" `Quick test_tickets_in_list; Tztest.tztest - "Test tickets in unit ticket" - `Quick - test_tickets_in_unit_ticket; - Tztest.tztest "Test tickets in list" `Quick test_tickets_in_list; - Tztest.tztest - "Test tickets in list with zero amount" + "tickets in list with zero amount" `Quick test_tickets_in_list_with_zero_amount; - Tztest.tztest "Test tickets in pair" `Quick test_tickets_in_pair; + Tztest.tztest "tickets in pair" `Quick test_tickets_in_pair; Tztest.tztest - "Test tickets in pair with zero amount" + "tickets in pair with zero amount" `Quick test_tickets_in_pair_with_zero_amount; - Tztest.tztest "Test tickets in map" `Quick test_tickets_in_map; + Tztest.tztest "tickets in map" `Quick test_tickets_in_map; Tztest.tztest - "Test tickets in map with zero amount" + "tickets in map with zero amount" `Quick test_tickets_in_map_with_zero_amount; - Tztest.tztest "Test tickets in big map" `Quick test_tickets_in_big_map; + Tztest.tztest "tickets in big map" `Quick test_tickets_in_big_map; Tztest.tztest - "Test tickets in big map with include lazy set to false" + "tickets in big map with include lazy set to false" `Quick test_tickets_in_big_map_strict_only; Tztest.tztest - "Test tickets in list in big map" + "tickets in list in big map" `Quick test_tickets_in_list_in_big_map; Tztest.tztest - "Test tickets in a pair of big-map and list with include lazy set to \ - false" + "tickets in a pair of big-map and list with include lazy set to false" `Quick test_tickets_in_pair_big_map_and_list_strict_only; - Tztest.tztest "Test tickets in or left" `Quick test_tickets_in_or_left; + Tztest.tztest "tickets in or left" `Quick test_tickets_in_or_left; Tztest.tztest - "Test tickets in or left with zero amount" + "tickets in or left with zero amount" `Quick test_tickets_in_or_left_with_zero_amount; - Tztest.tztest "Test tickets in or right" `Quick test_tickets_in_or_right; + Tztest.tztest "tickets in or right" `Quick test_tickets_in_or_right; Tztest.tztest - "Test tickets in empty big-map ref" + "tickets in empty big-map ref" `Quick test_tickets_overlay_in_empty_big_map_ref; Tztest.tztest - "Test tickets in big-map ref" + "tickets in big-map ref" `Quick test_tickets_in_empty_big_map_ref; Tztest.tztest - "Test tickets in non-empty big-map ref" + "tickets in non-empty big-map ref" `Quick test_tickets_in_non_empty_big_map_ref; Tztest.tztest - "Test tickets in non-empty big-map ref with overlay" + "tickets in non-empty big-map ref with overlay" `Quick test_tickets_overlay_in_non_empty_in_big_map_ref; Tztest.tztest - "Test tickets replace existing value from overlay" + "tickets replace existing value from overlay" `Quick test_tickets_replace_overlay_in_non_empty_in_big_map_ref; Tztest.tztest - "Test tickets remove existing value from overlay" + "tickets remove existing value from overlay" `Quick test_tickets_remove_overlay_in_non_empty_in_big_map_ref; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket scanner", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_storage.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_storage.ml index 543238917093927c6c12d50a4b3fd78287915d58..9ad05b1745d469cfa9cdced1c230e2398aec6080 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_storage.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_storage.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Alpha_context.Ticket_balance) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_ticket_storage.ml Subject: Ticket storage functions tested using the Ticket_balance module in Alpha_context. *) @@ -273,3 +274,7 @@ let tests = test_ticket_balance_different_owners; Tztest.tztest "ticket storage space" `Quick test_storage_space; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("ticket storage", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml index 6e342d99edafb70f15d953c9258a4a3b25af633a..e8dcc3b533e9f84da9fb37054e3e75e65a8b4117 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (type-checking) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/michelson/main.exe \ + -- --file test_typechecking.ml Subject: Type-checking *) @@ -872,59 +873,63 @@ let test_contract_failure path = let tests = [ - Tztest.tztest "test unparse view" `Quick test_unparse_view; + Tztest.tztest "unparse view" `Quick test_unparse_view; Tztest.tztest - "test typecheck stack overflow error" + "typecheck stack overflow error" `Quick test_typecheck_stack_overflow; - Tztest.tztest "test comb type parsing" `Quick test_parse_comb_type; - Tztest.tztest "test comb type unparsing" `Quick test_unparse_comb_type; + Tztest.tztest "comb type parsing" `Quick test_parse_comb_type; + Tztest.tztest "comb type unparsing" `Quick test_unparse_comb_type; Tztest.tztest - "test comb comparable type unparsing" + "comb comparable type unparsing" `Quick test_unparse_comb_comparable_type; - Tztest.tztest "test comb data parsing" `Quick test_parse_comb_data; - Tztest.tztest "test comb data unparsing" `Quick test_unparse_comb_data; - Tztest.tztest "test optimal comb data unparsing" `Quick test_optimal_comb; - Tztest.tztest "test parse address" `Quick test_parse_address; + Tztest.tztest "comb data parsing" `Quick test_parse_comb_data; + Tztest.tztest "comb data unparsing" `Quick test_unparse_comb_data; + Tztest.tztest "optimal comb data unparsing" `Quick test_optimal_comb; + Tztest.tztest "parse address" `Quick test_parse_address; Tztest.tztest - "test unpackability of the contract type" + "unpackability of the contract type" `Quick test_contract_not_packable; Tztest.tztest - "test forbidden SELF in view" + "forbidden SELF in view" `Quick (test_forbidden_op_in_view "SELF"); Tztest.tztest - "test forbidden SET_DELEGATE in view" + "forbidden SET_DELEGATE in view" `Quick (test_forbidden_op_in_view "SET_DELEGATE"); Tztest.tztest - "test forbidden TRANSFER_TOKENS in view" + "forbidden TRANSFER_TOKENS in view" `Quick (test_forbidden_op_in_view "TRANSFER_TOKENS"); Tztest.tztest - "test forbidden CREATE_CONTRACT in view" + "forbidden CREATE_CONTRACT in view" `Quick (test_forbidden_op_in_view "CREATE_CONTRACT"); Tztest.tztest - "test parse contract data for rollup" + "parse contract data for rollup" `Quick test_parse_contract_data_for_unit_rollup; Tztest.tztest - "test parse contract data for rollup with entrypoint invalid type" + "parse contract data for rollup with entrypoint invalid type" `Quick test_parse_contract_data_for_rollup_with_invalid_type; Tztest.tztest - "test lambda_rec instruction" + "lambda_rec instruction" `Quick (test_contract_success (path // "contracts/rec_fact.tz")); Tztest.tztest - "test lambda_rec instruction with apply" + "lambda_rec instruction with apply" `Quick (test_contract_success (path // "contracts/rec_fact_apply.tz")); Tztest.tztest - "test lambda_rec with type error" + "lambda_rec with type error" `Quick (test_contract_failure (path // "contracts/fail_rec.tz")); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("typechecking", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/dune b/src/proto_alpha/lib_protocol/test/integration/operations/dune index 3a1f9cd62dc213a029cc6831d90b9ad969c15753..e5271ad452ed64dde0dd326a5d431c4f0dea3de0 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/dune +++ b/src/proto_alpha/lib_protocol/test/integration/operations/dune @@ -27,7 +27,6 @@ -open Tezos_base_test_helpers -open Tezos_protocol_plugin_alpha) (modules - test_main test_activation test_combined_operations test_failing_noop diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_activation.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_activation.ml index 01ee9324b576891ec5e4e611d98fb676f779c3cd..126a4030233ceb258ab8afcbc9fbc2cfe7d78225 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_activation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_activation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (activation) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_activation.ml Subject: The activation operation creates an implicit contract from a registered commitment present in the context. It is parametrized by a public key hash (pkh) and a secret. @@ -571,3 +572,7 @@ let tests = `Quick test_invalid_transfer_from_unactivated_account; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("activation", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_combined_operations.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_combined_operations.ml index 9d6cfab43f1f1dbfcbfeee27ac8c35f374536683..3fd3dcb5bea036a6941793f4586788cad18d7f11 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_combined_operations.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_combined_operations.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (combined operations) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_combined_operations.ml Subject: Multiple operations can be grouped in one ensuring their deterministic application. @@ -407,3 +408,6 @@ let tests = `Quick test_inconsistent_counters; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("combined", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_failing_noop.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_failing_noop.ml index dc6ee310abac6d82fd351884cdb71b00c653b827..a005ddc3442857088d373ad50740a672518a9440 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_failing_noop.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_failing_noop.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_failing_noop.ml Subject: The Failing_noop operation was added bearing in mind the possibility for the end user to sign arbitrary bytes, encapsulate in the operation, with the absolute garanty that @@ -47,3 +48,7 @@ let failing_noop_must_fail_when_injected () = let tests = [Tztest.tztest "injection fails" `Quick failing_noop_must_fail_when_injected] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("failing_noop operation", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_main.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_main.ml deleted file mode 100644 index d63ba82de880afe9fe5184d5cc7118654aa3d80a..0000000000000000000000000000000000000000 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_main.ml +++ /dev/null @@ -1,52 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > operations" - [ - (Protocol.name ^ ": voting", Test_voting.tests); - (Protocol.name ^ ": origination", Test_origination.tests); - (Protocol.name ^ ": revelation", Test_reveal.tests); - (Protocol.name ^ ": transfer", Test_transfer.tests); - (Protocol.name ^ ": activation", Test_activation.tests); - ( Protocol.name ^ ": paid storage increase", - Test_paid_storage_increase.tests ); - (Protocol.name ^ ": combined", Test_combined_operations.tests); - (Protocol.name ^ ": failing_noop operation", Test_failing_noop.tests); - (Protocol.name ^ ": sc rollup", Test_sc_rollup.tests); - (Protocol.name ^ ": sc rollup transfer", Test_sc_rollup_transfer.tests); - (Protocol.name ^ ": zk rollup", Test_zk_rollup.tests); - (Protocol.name ^ ": transfer ticket", Test_transfer_ticket.tests); - ] - |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_origination.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_origination.ml index 1d607ccc1dc06112e6d1a8ba7f6ea4581d709ff6..6a74f8becd953e7696196a7facad14ea896c8fba 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_origination.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_origination.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (origination) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_origination.ml Subject: On originating contracts. *) @@ -324,3 +325,7 @@ let tests = Tztest.tztest "counter" `Quick test_counter; Tztest.tztest "unparsable script" `Quick test_unparsable_script; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("orgination", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_paid_storage_increase.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_paid_storage_increase.ml index 21a88c83501913560210625d3f8d2960d32456b6..275a4fe4e853fc4d929e1a6423402462fcd9c24a 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_paid_storage_increase.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_paid_storage_increase.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (increase_paid_storage) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_paid_storage_increase.ml Subject: On increasing a paid amount of contract storage. *) @@ -243,3 +244,7 @@ let tests = Tztest.tztest "no contract to bump its paid storage" `Quick test_no_contract; Tztest.tztest "effectiveness" `Quick test_effectiveness; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("paid storage increase", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_reveal.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_reveal.ml index 0f0ef651226b43a815357b822b6096a1cbd5d2c4..9784bf9dff177095bbdd4b75015165837cf60696 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_reveal.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_reveal.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (revelation) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_reveal.ml Subject: On the reveal operation. *) @@ -745,3 +746,7 @@ let tests = `Quick test_valid_reveal_after_emptying_balance; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("revelation", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup.ml index aff5add12b52ea5be97ca12d947be6ad28edbdb0..5526a5e4048770e6c3d06298ce4600ae25b01119 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Rollup layer 1 logic - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_sc_rollup.ml Subject: Test smart contract rollup *) @@ -3486,13 +3487,13 @@ let tests = `Quick test_inbox_max_number_of_messages_per_level; Tztest.tztest - "Test that a player can't timeout another player before timeout period \ - and related timeout value." + "a player can't timeout another player before timeout period and related \ + timeout value." `Quick test_timeout; Tztest.tztest - "Test that a player cannot play more than max_number_of_parallel_games \ - games in parallel." + "a player cannot play more than max_number_of_parallel_games games in \ + parallel." `Quick test_number_of_parallel_games_bounded; Tztest.tztest @@ -3516,17 +3517,17 @@ let tests = `Quick test_refute_invalid_reveal; Tztest.tztest - "Test that SOL/Info_per_level/EOL are added in the inbox" + "SOL/Info_per_level/EOL are added in the inbox" `Quick test_automatically_added_internal_messages; Tztest.tztest "0-tick commitments are forbidden" `Quick test_zero_tick_commitment_fails; - Tztest.tztest "check the curfew functionality" `Quick test_curfew; + Tztest.tztest "the curfew functionality" `Quick test_curfew; Tztest.tztest - "check that a commitment can be published after the inbox_level + \ - challenge window is passed." + "a commitment can be published after the inbox_level + challenge window \ + is passed." `Quick test_curfew_period_is_started_only_after_first_publication; Tztest.tztest @@ -3551,3 +3552,7 @@ let tests = `Quick test_start_game_on_cemented_commitment; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml index 8ffb938a8eba23681b060ca8962f733f5b01a655..e4d83f86ea56507e4df7d2f41f5a6ca16de55e87 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_sc_rollup_transfer.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Sc rollup L1/L2 communication - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_sc_rollup_transfer.ml Subject: Test transfers from Michelson to smart contract rollups *) @@ -426,3 +427,7 @@ let tests = `Quick test_transfer_non_zero_amount_ticket; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup transfer", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_transfer.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_transfer.ml index 7416a7eba0c1b0ef633331ea0cb39be988b8b4ee..1a163b6ab7431179697e4883b2083b0705d02c70 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_transfer.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_transfer.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (transfer) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_transfer.ml Subject: Quantities transfer between contracts. *) @@ -904,3 +905,6 @@ let tests = `Quick test_storage_fees_and_internal_operation; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("transfer", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_transfer_ticket.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_transfer_ticket.ml index 2a54374ba67b6076665b75bc53f13a63195e6894..eac038572a3e0b5edb5e1753e5d26150f9b52bc7 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_transfer_ticket.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_transfer_ticket.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Transfer_ticket logic - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_transfer_ticket.ml Subject: Test ticket transfers *) @@ -316,11 +317,15 @@ let test_contract_as_ticket_transfer_destination () = let tests = [ Tztest.tztest - "Test ticket transfer operations" + "ticket transfer operations" `Quick test_mint_deposit_withdraw_implicit_transfer; Tztest.tztest - "Test 'contract (ticket cty)' as transfer destination" + "'contract (ticket cty)' as transfer destination" `Quick test_contract_as_ticket_transfer_destination; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("transfer ticket", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_voting.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_voting.ml index b08ae525bc2044f3e4c975ef09fe40e178c471cd..91ff5d0be2df7996b214207b55c7b9da8d6db7ee 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_voting.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_voting.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol (voting) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_voting.ml Subject: On the voting process. *) @@ -2096,3 +2097,6 @@ let tests = test_conflicting_ballot; Tztest.tztest "Valid Ballot operations" `Quick test_valid_ballot; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("voting", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_zk_rollup.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_zk_rollup.ml index 6d62f1e69de1628b751856f315db1e481baeae14..3d30baa327f25f7e3b55140046adf48939ff4c5f 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_zk_rollup.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_zk_rollup.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Rollup layer 1 logic - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe \ + -- --file test_zk_rollup.ml Subject: Test zk rollup *) @@ -1278,3 +1279,7 @@ let tests = `Quick test_valid_deposit_and_external_withdrawal; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("zk rollup", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/test_constants.ml b/src/proto_alpha/lib_protocol/test/integration/test_constants.ml index 21e3c8cd7eda87f7864cea5237799910129cf1e9..994de8af62df53779ba31ea651b6c09ba7c4b66d 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_constants.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_constants.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol (baking) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe \ + -- --file test_constants.ml Subject: the consistency of parametric constants *) @@ -213,3 +214,7 @@ let tests = `Quick liquidity_baking_subsidy_param; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("test constants", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/test_frozen_bonds.ml b/src/proto_alpha/lib_protocol/test/integration/test_frozen_bonds.ml index 2cfe0d13958855268826fa60acc8b1c458101518..8aeeee5514e090abd26683c80c94fbb6e40b011c 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_frozen_bonds.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_frozen_bonds.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (token) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe \ + -- --file test_frozen_bonds.ml Subject: Frozen bonds applicable to contracts and part of their stake. *) @@ -671,27 +672,31 @@ let tests = tztest "frozen bonds - delegated balance" `Quick test_delegated_balance; tztest "frozen bonds - test rpcs" `Quick test_rpcs; tztest - "test: delegate, freeze, unfreeze, undelegate" + "delegate, freeze, unfreeze, undelegate" `Quick test_delegate_freeze_unfreeze_undelegate; tztest - "test: delegate, freeze, undelegate, unfreeze" + "delegate, freeze, undelegate, unfreeze" `Quick test_delegate_freeze_undelegate_unfreeze; tztest - "test: delegate, double freeze, undelegate, unfreeze" + "delegate, double freeze, undelegate, unfreeze" `Quick test_delegate_double_freeze_undelegate_unfreeze; tztest - "test: delegate, freeze, redelegate, unfreeze" + "delegate, freeze, redelegate, unfreeze" `Quick test_delegate_freeze_redelegate_unfreeze; tztest - "test: delegate, freeze, unfreeze, freeze, redelegate" + "delegate, freeze, unfreeze, freeze, redelegate" `Quick test_delegate_freeze_unfreeze_freeze_redelegate; tztest - "test: delegate, freeze, slash, undelegate" + "delegate, freeze, slash, undelegate" `Quick test_delegate_freeze_slash_undelegate; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("frozen bonds", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/test_liquidity_baking.ml b/src/proto_alpha/lib_protocol/test/integration/test_liquidity_baking.ml index 54b1dcf543511faa5eb137139b5f87488a0ff468..248429335df3fa2fdbd301701001606e74f6340d 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_liquidity_baking.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_liquidity_baking.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: liquidity baking - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe \ + -- --file test_liquidity_baking.ml Subject: Test liquidity baking subsidies, CPMM storage updates, and toggle vote. *) @@ -428,116 +429,120 @@ let liquidity_baking_origination_no_tzBTC_mainnet_migration () = let tests = [ Tztest.tztest - "test liquidity baking script hashes" + "liquidity baking script hashes" `Quick liquidity_baking_origination; Tztest.tztest - "test liquidity baking cpmm is originated at the expected address" + "liquidity baking cpmm is originated at the expected address" `Quick liquidity_baking_cpmm_address; Tztest.tztest "Init Context" `Quick generate_init_state; Tztest.tztest - "test liquidity baking subsidy is correct" + "liquidity baking subsidy is correct" `Quick (liquidity_baking_subsidies 64); Tztest.tztest - "test liquidity baking toggle vote with 100% of bakers voting LB_off \ - baking one block longer" + "liquidity baking toggle vote with 100% of bakers voting LB_off baking \ + one block longer" `Quick (liquidity_baking_toggle_100 1); Tztest.tztest - "test liquidity baking toggle vote with 100% of bakers voting LB_off \ - baking two blocks longer" + "liquidity baking toggle vote with 100% of bakers voting LB_off baking \ + two blocks longer" `Quick (liquidity_baking_toggle_100 2); Tztest.tztest - "test liquidity baking toggle vote with 100% of bakers voting LB_off \ - baking 100 blocks longer" + "liquidity baking toggle vote with 100% of bakers voting LB_off baking \ + 100 blocks longer" `Quick (liquidity_baking_toggle_100 100); Tztest.tztest - "test liquidity baking toggle vote with 80% of bakers voting LB_off \ - baking one block longer" + "liquidity baking toggle vote with 80% of bakers voting LB_off baking \ + one block longer" `Quick (liquidity_baking_toggle_80 1); Tztest.tztest - "test liquidity baking toggle vote with 80% of bakers voting LB_off \ - baking two blocks longer" + "liquidity baking toggle vote with 80% of bakers voting LB_off baking \ + two blocks longer" `Quick (liquidity_baking_toggle_80 2); Tztest.tztest - "test liquidity baking toggle vote with 80% of bakers voting LB_off \ - baking 100 blocks longer" + "liquidity baking toggle vote with 80% of bakers voting LB_off baking \ + 100 blocks longer" `Quick (liquidity_baking_toggle_80 100); Tztest.tztest - "test liquidity baking toggle vote with 60% of bakers voting LB_off \ - baking one block longer" + "liquidity baking toggle vote with 60% of bakers voting LB_off baking \ + one block longer" `Quick (liquidity_baking_toggle_60 1); Tztest.tztest - "test liquidity baking toggle vote with 60% of bakers voting LB_off \ - baking two blocks longer" + "liquidity baking toggle vote with 60% of bakers voting LB_off baking \ + two blocks longer" `Quick (liquidity_baking_toggle_60 2); Tztest.tztest - "test liquidity baking toggle vote with 60% of bakers voting LB_off \ - baking 100 blocks longer" + "liquidity baking toggle vote with 60% of bakers voting LB_off baking \ + 100 blocks longer" `Quick (liquidity_baking_toggle_60 100); Tztest.tztest - "test liquidity baking does not shut off with toggle vote at 50% and \ - baking 100 blocks longer than sunset level in previous protocols" + "liquidity baking does not shut off with toggle vote at 50% and baking \ + 100 blocks longer than sunset level in previous protocols" `Quick liquidity_baking_toggle_50; Tztest.tztest - "test a liquidity baking restart with 100% of bakers voting off, then \ - pass, then on" + "liquidity baking restart with 100% of bakers voting off, then pass, \ + then on" `Quick (liquidity_baking_restart 2000 1); Tztest.tztest - "test liquidity baking toggle ema in block metadata is zero with no \ - bakers voting LB_off." + "liquidity baking toggle ema in block metadata is zero with no bakers \ + voting LB_off." `Quick liquidity_baking_toggle_ema_zero; Tztest.tztest - "test liquidity baking toggle ema is equal to the threshold after the \ - subsidy has been stopped by a toggle vote" + "liquidity baking toggle ema is equal to the threshold after the subsidy \ + has been stopped by a toggle vote" `Quick liquidity_baking_toggle_ema_threshold; Tztest.tztest - "test liquidity baking storage is updated" + "liquidity baking storage is updated" `Quick (liquidity_baking_storage 64); Tztest.tztest - "test liquidity baking balance updates" + "liquidity baking balance updates" `Quick liquidity_baking_balance_update; Tztest.tztest - "test liquidity baking CPMM address in storage matches address in the \ + "liquidity baking CPMM address in storage matches address in the \ origination result" `Quick liquidity_baking_origination_result_cpmm_address; Tztest.tztest - "test liquidity baking CPMM balance in origination result is 100 mutez" + "liquidity baking CPMM balance in origination result is 100 mutez" `Quick liquidity_baking_origination_result_cpmm_balance; Tztest.tztest - "test liquidity baking LQT contract is originated at expected address" + "liquidity baking LQT contract is originated at expected address" `Quick liquidity_baking_origination_result_lqt_address; Tztest.tztest - "test liquidity baking LQT balance in origination result is 0 mutez" + "liquidity baking LQT balance in origination result is 0 mutez" `Quick liquidity_baking_origination_result_lqt_balance; Tztest.tztest - "test liquidity baking originates three contracts when tzBTC does not \ - exist and level indicates we are not on mainnet" + "liquidity baking originates three contracts when tzBTC does not exist \ + and level indicates we are not on mainnet" `Quick liquidity_baking_origination_test_migration; Tztest.tztest - "test liquidity baking originates three contracts when tzBTC does not \ - exist and level indicates we might be on mainnet" + "liquidity baking originates three contracts when tzBTC does not exist \ + and level indicates we might be on mainnet" `Quick liquidity_baking_origination_no_tzBTC_mainnet_migration; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("liquidity baking", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/test_main.ml b/src/proto_alpha/lib_protocol/test/integration/test_main.ml deleted file mode 100644 index 9cd546cafea987255f94f6874b5a91ba1df8b2c9..0000000000000000000000000000000000000000 --- a/src/proto_alpha/lib_protocol/test/integration/test_main.ml +++ /dev/null @@ -1,45 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2021 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe - Subject: Entrypoint -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration" - [ - (Protocol.name ^ ": constants", Test_constants.tests); - (Protocol.name ^ ": liquidity baking", Test_liquidity_baking.tests); - (Protocol.name ^ ": storage description", Test_storage.tests); - (Protocol.name ^ ": storage tests", Test_storage_functions.tests); - (Protocol.name ^ ": token movements", Test_token.tests); - (Protocol.name ^ ": frozen bonds", Test_frozen_bonds.tests); - ] - |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/test_storage.ml b/src/proto_alpha/lib_protocol/test/integration/test_storage.ml index 860edc3e562f8388eb64da2b0d387d799e5b1f7c..1918110dc65a194b18ddb7fa408e0e5674f3369c 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_storage.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_storage.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Context Storage - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe \ + -- --file test_storage.ml Subject: Test the correctnesss of debug message from storage_functor *) @@ -235,3 +236,7 @@ let tests = `Quick (fun _ -> test_register_indexed_subcontext_2); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("storage description", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/test_storage_functions.ml b/src/proto_alpha/lib_protocol/test/integration/test_storage_functions.ml index b73c99786913a8ec6ed0bb3696224726922f5612..28376c10fc7108ade813a21a938b3250c6868dbe 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_storage_functions.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_storage_functions.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Context Storage - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe \ + -- --file test_storage_functions.ml Subject: Test storage functions. *) @@ -173,3 +174,7 @@ let tests = test_fold_keys_unaccounted; Tztest.tztest "length test" `Quick test_length; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("storage tests", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/test_token.ml b/src/proto_alpha/lib_protocol/test/integration/test_token.ml index 7b6f80f9fd87070d010a41e5002afb55c127d1ac..e76293abe326e55dd0aa171be5adf86a3e28b5b1 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_token.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_token.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (token) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/main.exe \ + -- --file test_token.ml Subject: Token movements in the protocol. *) @@ -726,3 +727,7 @@ let tests = `Quick test_transfer_n_with_several_givers; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("token movements", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/dune b/src/proto_alpha/lib_protocol/test/integration/validate/dune index 712841be8ca419bc6ee39b7c0184a4df1b7be6e8..5aa689d327af81429603b4fb8aa346843ff7f88c 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/dune +++ b/src/proto_alpha/lib_protocol/test/integration/validate/dune @@ -30,7 +30,6 @@ -open Tezos_base_test_helpers -open Tezos_protocol_plugin_alpha) (modules - test_main generator_descriptors generators manager_operation_helpers diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/test_1m_restriction.ml b/src/proto_alpha/lib_protocol/test/integration/validate/test_1m_restriction.ml index 515316cd07a2bb45f0b44c78b85b671a298e84eb..8aeb608377746333228604d7e00b08298e3f3c2f 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_1m_restriction.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/test_1m_restriction.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ + -- --file test_1m_restriction.ml Subject: 1M restriction in validation of manager operation. *) @@ -224,3 +225,7 @@ let tests : (string * [`Quick | `Slow] * (unit -> unit Lwt.t)) trace = batch_is_not_singles_tests; conflict_free_tests; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("one-manager restriction", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/test_covalidity.ml b/src/proto_alpha/lib_protocol/test/integration/validate/test_covalidity.ml index 26c932e21f809c34a45e7648c1b5490c336247ae..ba203fe8242d6ea4e9f8d1636c0c6b8ffabd35d1 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_covalidity.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/test_covalidity.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ + -- --file test_covalidity.ml Subject: Validation of operation. *) open Validate_helpers @@ -153,3 +154,7 @@ let tests = [] voting_periods |> Qcheck2_helpers.qcheck_wrap_lwt + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("covalidity", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/test_main.ml b/src/proto_alpha/lib_protocol/test/integration/validate/test_main.ml deleted file mode 100644 index 031eadd44399ee1e1480162e3d401f4d754dfa68..0000000000000000000000000000000000000000 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_main.ml +++ /dev/null @@ -1,47 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2022 Nomadic Labs *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -(** Testing - ------- - Component: Protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe - Subject: Integration > Validate -*) - -let () = - Alcotest_lwt.run - ~__FILE__ - "protocol > integration > validate" - [ - (Protocol.name ^ ": sanity checks", Test_sanity.tests); - (Protocol.name ^ ": mempool", Test_mempool.tests); - ( Protocol.name ^ ": single manager validation", - Test_manager_operation_validation.tests ); - ( Protocol.name ^ ": batched managers validation", - Test_validation_batch.tests ); - (Protocol.name ^ ": one-manager restriction", Test_1m_restriction.tests); - (Protocol.name ^ ": covalidity", Test_covalidity.tests); - ] - |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/test_manager_operation_validation.ml b/src/proto_alpha/lib_protocol/test/integration/validate/test_manager_operation_validation.ml index e31a5d37990ea4f02f371c10209c5a8b3822cb21..24022dab489550870190c28f12a034b508484dc4 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_manager_operation_validation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/test_manager_operation_validation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ + -- --file test_manager_operation_validation.ml Subject: Validation of manager operation. *) @@ -611,8 +612,15 @@ let tests = test_low_gas_limit_no_consumer, not_gas_consum, mk_default ); - ("check dal disabled", test_feature_flags, all, mk_flags disabled_dal); - ("check toru disabled", test_feature_flags, all, mk_flags disabled_toru); - ("check scoru disabled", test_feature_flags, all, mk_flags disabled_scoru); - ("check zkru disabled", test_feature_flags, all, mk_flags disabled_zkru); + ("dal disabled", test_feature_flags, all, mk_flags disabled_dal); + ("toru disabled", test_feature_flags, all, mk_flags disabled_toru); + ("scoru disabled", test_feature_flags, all, mk_flags disabled_scoru); + ("zkru disabled", test_feature_flags, all, mk_flags disabled_zkru); ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("single manager validation", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/test_mempool.ml b/src/proto_alpha/lib_protocol/test/integration/validate/test_mempool.ml index 0855ef73b2684fae2d3861ef3b528dc13e1ca5ce..2349c5e08e70de21b9ed28df42ec0567e788636e 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_mempool.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/test_mempool.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ + -- --file test_mempool.ml Subject: Integration > Validate > Mempool mode *) @@ -389,3 +390,6 @@ let tests = test_add_and_replace; Tztest.tztest "remove operations" `Quick test_remove_operation; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("mempool", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml b/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml index 39976e0a71c86397acb050af7989369d4f643d2e..3d0aaa65df45bc7357898fdef797cfab98edd6b6 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ + -- --file test_sanity.ml Subject: Validation of operation. *) @@ -160,3 +161,7 @@ let tests = ("manager operation coverage", ensure_manager_operation_coverage); ("covalidation coverage", covalidation_sanity); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sanity checks", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/test_validation_batch.ml b/src/proto_alpha/lib_protocol/test/integration/validate/test_validation_batch.ml index 75deeef51eb522291d2f384921a101dbfc7e269c..0b7445cb07ef6db4fe3c87bdf895e6bd1f6a5b23 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_validation_batch.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/test_validation_batch.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (validate manager) - Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/validate/main.exe \ + -- --file test_validation_batch.ml Subject: Validation of batched manager operation. *) @@ -620,3 +621,10 @@ let tests = revealed, mk_high_gas_limit ); ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("batched managers validation", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/pbt/liquidity_baking_pbt.ml b/src/proto_alpha/lib_protocol/test/pbt/liquidity_baking_pbt.ml index f1a80e207cb71656192c45ab3d0b8dae68c0ed0c..0a891ece01393b0fd13a012a17082b8745336bcd 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/liquidity_baking_pbt.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/liquidity_baking_pbt.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: pbt for liquidity baking - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file liquidity_baking_pbt.ml Subject: Test liquidity baking contracts using randomly generated inputs. *) @@ -319,9 +320,8 @@ let () = let open Qcheck2_helpers in Alcotest.run ~__FILE__ - "protocol > pbt > liquidity baking" + Protocol.name [ - ( Protocol.name ^ ": Machines Cross-Validation", - qcheck_wrap machine_validation_tests ); - (Protocol.name ^ ": Economic Properties", qcheck_wrap economic_tests); + ("Machines Cross-Validation", qcheck_wrap machine_validation_tests); + ("Economic Properties", qcheck_wrap economic_tests); ] diff --git a/src/proto_alpha/lib_protocol/test/pbt/saturation_fuzzing.ml b/src/proto_alpha/lib_protocol/test/pbt/saturation_fuzzing.ml index 12c54af32b5c6b3695c8731b924042ed532f128c..c792f2048eb76c3f948ecc927cd12f573fad999b 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/saturation_fuzzing.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/saturation_fuzzing.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file saturation_fuzzing.ml Subject: Operations in Saturation_repr *) @@ -190,12 +191,12 @@ let tests_sqrt = [test_sqrt_squared; test_squared_sqrt] let () = Alcotest.run ~__FILE__ - "protocol > pbt > saturation" + Protocol.name [ - (Protocol.name ^ ": add", qcheck_wrap tests_add); - (Protocol.name ^ ": mul", qcheck_wrap tests_mul); - (Protocol.name ^ ": sub", qcheck_wrap tests_sub); - (Protocol.name ^ ": add and sub", qcheck_wrap tests_add_sub); - (Protocol.name ^ ": sqrt", qcheck_wrap tests_sqrt); - (Protocol.name ^ ": <= and >=", qcheck_wrap tests_boundaries); + ("add", qcheck_wrap tests_add); + ("mul", qcheck_wrap tests_mul); + ("sub", qcheck_wrap tests_sub); + ("add and sub", qcheck_wrap tests_add_sub); + ("sqrt", qcheck_wrap tests_sqrt); + ("<= and >=", qcheck_wrap tests_boundaries); ] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml b/src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml index dcb57ea9c95384d6aad5fc4e29892763fd609937..d37c9f5e92878b1c91bf13037a1b60e3574b6115 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_bitset.ml Subject: Bitset structure *) @@ -95,9 +96,9 @@ let test_fill = let () = Alcotest.run ~__FILE__ - "bits" + Protocol.name [ - ( Protocol.name ^ ": quantity", + ( "quantity", qcheck_wrap [ QCheck2.Test.make diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_bytes_conversion.ml b/src/proto_alpha/lib_protocol/test/pbt/test_bytes_conversion.ml index e3ed8f47340ab42c0a4f02e6759bdca75d727d09..59ebebfd7b771f10c57fb87ecb00d486427cf66c 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_bytes_conversion.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_bytes_conversion.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: pbt for bytes <=> nat/int conversions - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_bytes_conversion.ml Subject: Test the conversions between bytes and int/nat *) @@ -210,6 +211,5 @@ let tests = let () = Alcotest.run ~__FILE__ - ("protocol > script_bytes > " ^ Protocol.name - ^ ": bytes and int/nat conversion ") + (Protocol.name ^ ": bytes and int/nat conversion ") tests diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_carbonated_map.ml b/src/proto_alpha/lib_protocol/test/pbt/test_carbonated_map.ml index 797fbfde0d9f31575b0ec7686517df6b51290551..718d442daa97bc6e09fe4f07d1b434eab288c515 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_carbonated_map.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_carbonated_map.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_carbonated_map.ml Subject: Operations in Carbonated_map *) @@ -544,7 +545,4 @@ let tests ~rand = qcheck_wrap ~rand qcheck_tests @ unit_tests let () = (* Ensure deterministic results. *) let rand = Random.State.make [|0x1337533D; 71287309; 397060904|] in - Alcotest.run - ~__FILE__ - "protocol > pbt > carbonated map" - [(Protocol.name ^ ": Carbonated map", tests ~rand)] + Alcotest.run ~__FILE__ Protocol.name [("Carbonated map", tests ~rand)] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_compare_operations.ml b/src/proto_alpha/lib_protocol/test/pbt/test_compare_operations.ml index 97d862a2e9c5a4acf949cfa37c5e927b2c54a508..b4bbb0db3e441fb617893f28d5fc0105dd539b8a 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_compare_operations.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_compare_operations.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Operation compare) - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_compare_operations.ml Subject: Valid operations Comparison *) @@ -97,7 +98,5 @@ let tests = [test_compare_is_strorder] let () = Alcotest.run ~__FILE__ - "Compare operations" - [ - (Protocol.name ^ ": Compare_operations", Qcheck2_helpers.qcheck_wrap tests); - ] + Protocol.name + [("Compare_operations", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_dal_slot_proof.ml b/src/proto_alpha/lib_protocol/test/pbt/test_dal_slot_proof.ml index 8072df01b76c7f01d77451aad071ffd3f8152752..5b47374a068739a9e8dde9360e207d07ebc82c96 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_dal_slot_proof.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_dal_slot_proof.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: PBT for refutation proofs of Dal - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_dal_slot_proof.ml Subject: Refutation proof-related functions of Dal *) diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_gas_properties.ml b/src/proto_alpha/lib_protocol/test/pbt/test_gas_properties.ml index ca9d505ab6988f06d4a278a246b8ca138deaa8ef..53e28d23bf7b5821da895b51859ff4a1eda89f24 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_gas_properties.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_gas_properties.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (gas properties) - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_gas_properties.ml Subject: Arithmetic properties around gas. *) @@ -140,7 +141,4 @@ let tests = ] let () = - Alcotest.run - ~__FILE__ - "protocol > pbt > gas" - [(Protocol.name ^ ": gas properties", qcheck_wrap tests)] + Alcotest.run ~__FILE__ Protocol.name [("gas properties", qcheck_wrap tests)] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_merkle_list.ml b/src/proto_alpha/lib_protocol/test/pbt/test_merkle_list.ml index 56c824bd1ca6936a36ee1a551b05ae0ffbefb687..7be5c740903dbeb66b74575e92f50ef2db550125 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_merkle_list.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_merkle_list.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_merkle_list.ml Subject: Tx rollup l2 encoding *) @@ -111,15 +112,15 @@ let () = let qcheck_wrap = qcheck_wrap ~rand:(Random.State.make_self_init ()) in Alcotest.run ~__FILE__ - "Merkle list" + Protocol.name [ - ( Protocol.name ^ ": scons_equiv", + ( "scons_equiv", qcheck_wrap [ test_scons_scons_tr_equiv ~count:1000; test_scons_compute_equiv ~count:1000; ] ); - ( Protocol.name ^ ": check_path", + ( "check_path", qcheck_wrap [test_check_path ~count:1000; test_check_path_wrong ~count:1000] ); ] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_operation_encoding.ml b/src/proto_alpha/lib_protocol/test/pbt/test_operation_encoding.ml index 08bd36fcfcea1795cb8c925f222da9bc3cdf122f..b08de8c3ded9e7ee0b725b8aa0ed978f5eed9c99 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_operation_encoding.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_operation_encoding.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_operation_encoding.ml Subject: Encoding for operations *) @@ -62,5 +63,5 @@ let () = let qcheck_wrap = qcheck_wrap ~rand:(Random.State.make_self_init ()) in Alcotest.run ~__FILE__ - "Operation_encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap [test_operation])] + (Protocol.name ^ ": Operation_encoding") + [(": roundtrip", qcheck_wrap [test_operation])] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml b/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml index 7f0a6b92c670c889ae32de3c3052fe689ead0eaf..1dd2c12b1d5b1b9bad8ae978b8f74fb1c62b2b26 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_refutation_game.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: PBT for the SCORU refutation game - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_refutation_game.ml Subject: SCORU refutation game *) open Protocol diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_sampler.ml b/src/proto_alpha/lib_protocol/test/pbt/test_sampler.ml index e1c507d1f5dd666853db9e0720c08b09714309db..e2bd8547d4b09869ad5fbf9e527b7624c78c2e1d 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_sampler.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_sampler.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_sampler.ml Subject: Operations in Saturation_repr *) @@ -266,8 +267,5 @@ let alias_z_test = let () = Alcotest.run ~__FILE__ - "protocol > pbt > sampling" - [ - ( Protocol.name ^ ": sampling", - qcheck_wrap [alias_float_test; alias_z_test] ); - ] + Protocol.name + [("sampling", qcheck_wrap [alias_float_test; alias_z_test])] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_encoding.ml b/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_encoding.ml index 51f7d0f32046fc029cbc23bb800cbec0e599d075..480090e0fe59bb82e4959f329b973c1417960763 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_encoding.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_encoding.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_sc_rollup_encoding.ml Subject: SC rollup encoding *) @@ -292,5 +293,5 @@ let tests = let () = Alcotest.run ~__FILE__ - "SC rollup encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap tests)] + (Protocol.name ^ ": SC rollup encoding") + [(": roundtrip", qcheck_wrap tests)] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_inbox.ml b/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_inbox.ml index 58f36f75288b782ba1554618f5adfa16867963fe..d35400e4bed58414fc8b9f4d597366c8285575b4 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_inbox.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_inbox.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_sc_rollup_inbox.ml Subject: Smart rollup inbox *) @@ -73,8 +74,4 @@ let test_add_info_per_level = let tests = [test_add_info_per_level] -let () = - Alcotest.run - ~__FILE__ - "Smart rollup inbox" - [(Protocol.name ^ ": safety", qcheck_wrap tests)] +let () = Alcotest.run ~__FILE__ Protocol.name [("safety", qcheck_wrap tests)] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml b/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml index fd09d78ec0d9d81ebd98c9a4c5d97d36a6f6bbec..e5114fa4f94d99976b8013dd49fd8a6cd4513be0 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_sc_rollup_tick_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_sc_rollup_tick_repr.ml Subject: Operations in Tick_repr *) @@ -105,5 +106,5 @@ let tests = let () = Alcotest.run ~__FILE__ - "Tick_repr" - [(Protocol.name ^ ": Tick_repr", Qcheck2_helpers.qcheck_wrap tests)] + Protocol.name + [("Tick_repr", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml b/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml index 74c16fe5d08ba6174d75b63d581caaf2c1da2b6c..6319854c71c95ab86969d47eed8ffe743cf75a77 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Script_comparison - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_script_comparison.ml Subject: PBT of the Script_comparable.compare_comparable function. *) @@ -343,14 +344,12 @@ let test_pack_unpack = let () = Alcotest.run ~__FILE__ - "protocol > pbt > script_comparison" + Protocol.name [ - ( Protocol.name ^ ": compatible_with_reference", - qcheck_wrap [test_compatible_with_reference] ); - ( Protocol.name ^ ": compatible_with_packing", - qcheck_wrap [test_compatible_with_packing] ); - (Protocol.name ^ ": reflexivity", qcheck_wrap [test_reflexivity]); - (Protocol.name ^ ": symmetry", qcheck_wrap [test_symmetry]); - (Protocol.name ^ ": transitivity", qcheck_wrap [test_transitivity]); - (Protocol.name ^ ": pack_unpack", qcheck_wrap [test_pack_unpack]); + ("compatible_with_reference", qcheck_wrap [test_compatible_with_reference]); + ("compatible_with_packing", qcheck_wrap [test_compatible_with_packing]); + ("reflexivity", qcheck_wrap [test_reflexivity]); + ("symmetry", qcheck_wrap [test_symmetry]); + ("transitivity", qcheck_wrap [test_transitivity]); + ("pack_unpack", qcheck_wrap [test_pack_unpack]); ] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_tez_repr.ml b/src/proto_alpha/lib_protocol/test/pbt/test_tez_repr.ml index 167d79de53e3966367a005899cd75adc931fc2a9..fa4ccce2b73ce4e686b70cbddf99f985b1f1a18e 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_tez_repr.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_tez_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_tez_repr.ml Subject: Operations in Tez_repr *) @@ -132,5 +133,5 @@ let tests = let () = Alcotest.run ~__FILE__ - "protocol > pbt > tez_repr" - [(Protocol.name ^ ": Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] + Protocol.name + [("Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_zk_rollup_encoding.ml b/src/proto_alpha/lib_protocol/test/pbt/test_zk_rollup_encoding.ml index 8db8cd119c4c083d9a0a0933e7397393b3b46746..cc9b20635e1aeea51e38e2956e0886b7b50e9d8f 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_zk_rollup_encoding.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_zk_rollup_encoding.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/main.exe \ + -- --file test_zk_rollup_encoding.ml Subject: Zk rollup encodings *) @@ -222,8 +223,8 @@ let tests_to_scalar = [test_address_to_scalar; test_operation_to_scalar] let () = Alcotest.run ~__FILE__ - "ZK rollup encoding" + (Protocol.name ^ ": ZK rollup encoding") [ - (Protocol.name ^ ": roundtrip", qcheck_wrap tests_roundtrip); - (Protocol.name ^ ": to_scalar", qcheck_wrap tests_to_scalar); + (": roundtrip", qcheck_wrap tests_roundtrip); + (": to_scalar", qcheck_wrap tests_to_scalar); ] diff --git a/src/proto_alpha/lib_protocol/test/unit/dune b/src/proto_alpha/lib_protocol/test/unit/dune index c1be5bf09ec9580b92e1b6353db5d26dade58dac..ef1598ffb81c5338ee461eea660797ab1a5aab37 100644 --- a/src/proto_alpha/lib_protocol/test/unit/dune +++ b/src/proto_alpha/lib_protocol/test/unit/dune @@ -43,7 +43,6 @@ -open Tezos_crypto_dal -open Tezos_webassembly_interpreter_extra) (modules - test_main test_bond_id_repr test_consensus_key test_contract_repr diff --git a/src/proto_alpha/lib_protocol/test/unit/test_alpha_context.ml b/src/proto_alpha/lib_protocol/test/unit/test_alpha_context.ml index 7ecfda9f156c3b1b7da73a61b73b46f0813159b1..89c947065c72f6fdf1a09f08a1d7193d0fb56e3d 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_alpha_context.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_alpha_context.ml @@ -29,7 +29,8 @@ open Alpha_context (** Testing ------- Component: Alpha_context - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_alpha_context.ml Dependencies: helpers/block.ml Subject: To test the modules (including the top-level) in alpha_context.ml as individual units, particularly @@ -284,3 +285,7 @@ let tests = `Quick Test_Big_map.test_list_key_values_parameters; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("alpha context", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_bond_id_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_bond_id_repr.ml index 4ca1a86b80bda5d00cb3fbdcbbdf22a1263dfe63..92b32f31c59092c10e0a1f64f1e193227771462f 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_bond_id_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_bond_id_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Bond_id_repr - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_bond_id_repr.ml Dependencies: -- Subject: Test bond id representations for RPC definitions. *) @@ -111,3 +112,7 @@ let tests = test_destruct_invalid_bond_id_repr; Tztest.tztest "Deserialize/serialize roundtrip" `Quick test_roundtrip; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Bond_id_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_consensus_key.ml b/src/proto_alpha/lib_protocol/test/unit/test_consensus_key.ml index a4b9f86a5cf438fc24f57189089c420e72f2e927..ab49b21220179d7852621167b541e344b5b9617c 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_consensus_key.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_consensus_key.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (delegate_consensus_key) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_consensus_key.ml Subject: Functions from the module `Delegate_consensus_key` *) @@ -237,3 +238,7 @@ let test_consensus_key_storage () = let tests = [Tztest.tztest "consensus_key_storage" `Quick test_consensus_key_storage] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Delegate consensus key", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_contract_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_contract_repr.ml index cac129045afdc9cd383fa04f11b7a6be50e2190a..2c211049ab7943f13d8874a163bcd8bb49a00b66 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_contract_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_contract_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Contract_repr - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_contract_repr.ml Dependencies: contract_hash.ml Subject: To test the modules (including the top-level) in contract_repr.ml as individual units, particularly @@ -117,3 +118,7 @@ let tests = `Quick Test_contract_repr.test_to_b58check_originated; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Contract_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_dal_slot_proof.ml b/src/proto_alpha/lib_protocol/test/unit/test_dal_slot_proof.ml index deb8e113d4cc53e7cb4b02d44e79d4a631e159f4..eec3827372977072036151d5f5a74021c63c3469 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_dal_slot_proof.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_dal_slot_proof.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (dal slot proof) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_dal_slot_proof.ml Subject: These unit tests check proof-related functions of Dal slots. *) @@ -438,3 +439,7 @@ let tests = let dal_parameters = constants_test.dal end) in Test.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("dal slot proof", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_destination_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_destination_repr.ml index 802f4a5af1ed0f25ca4a494e2935dd4032dfbb80..4f902ac8ccb820b929da8245655ebeb90b11cb56 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_destination_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_destination_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Destination_repr - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_destination_repr.ml Subject: To test the encoding of [Destination_repr] and assert it is compatible with [Contract_repr.encoding]. *) @@ -219,3 +220,7 @@ let tests = @@ test_encoding_json_compat; tztest "Comparison of destinations" `Quick test_compare_destination; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Destination_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_fitness.ml b/src/proto_alpha/lib_protocol/test/unit/test_fitness.ml index 612f1f667c3baa855aa23d6fbbfd86521bf91e8a..cf54a1fadb4196633d514284f5108f8d3f6f353f 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_fitness.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_fitness.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (committee selection) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_fitness.ml Subject: test the fitness module *) @@ -155,3 +156,6 @@ let tests = `Quick test_compare_all; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("fitness", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_fixed_point.ml b/src/proto_alpha/lib_protocol/test/unit/test_fixed_point.ml index 58a38d32bb67673064b382055f2f7d6a9ea9c98b..0c9dd24eaf5aac90341369bc95ffe6e32ef35151 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_fixed_point.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_fixed_point.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (fixed-point decimals) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_fixed_point.ml Subject: On fixed-point decimal numbers. *) @@ -172,3 +173,7 @@ let tests = Tztest.tztest "FP tests (3 decimals)" `Quick fp_nonzero; Tztest.tztest "FP pp tests (3 decimals)" `Quick fp_pp; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("fixed point computation", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_gas_monad.ml b/src/proto_alpha/lib_protocol/test/unit/test_gas_monad.ml index 6b21f9e61c68ccdb4ba40e8ebbbc3cb493bd4541..05d5fd05ab6580438096977284f90ce8d8c24d74 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_gas_monad.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_gas_monad.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Gas_monad - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_gas_monad.ml Subject: Tests for the gas monad module *) @@ -195,20 +196,24 @@ let test_syntax_module () = let tests = [ - Tztest.tztest "Test exhaustion" `Quick test_gas_exhaustion; + Tztest.tztest "exhaustion" `Quick test_gas_exhaustion; Tztest.tztest - "Test exhaustion before error" + "exhaustion before error" `Quick test_gas_exhaustion_before_error; Tztest.tztest - "Test successful result with remaining gas" + "successful result with remaining gas" `Quick test_successful_with_remaining_gas; Tztest.tztest - "Test successful result with spare gas" + "successful result with spare gas" `Quick test_successful_with_spare_gas; - Tztest.tztest "Test inner error" `Quick test_inner_error; - Tztest.tztest "Test unlimited" `Quick test_unlimited; - Tztest.tztest "Test syntax module" `Quick test_syntax_module; + Tztest.tztest "inner error" `Quick test_inner_error; + Tztest.tztest "unlimited" `Quick test_unlimited; + Tztest.tztest "syntax module" `Quick test_syntax_module; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("gas monad", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_global_constants_storage.ml b/src/proto_alpha/lib_protocol/test/unit/test_global_constants_storage.ml index 9e263d4af221e920596b281451c4341c45791662..9e4569c7ebd5bdf8bfba0bbef590785e223f0efc 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_global_constants_storage.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_global_constants_storage.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Global table of constants - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_global_constants_storage.ml Dependencies: contract_hash.ml Subject: Test the global table of constants *) @@ -410,3 +411,7 @@ let tests = test_expand_is_idempotent; test_fold_does_not_stack_overflow; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Global constants storage", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_level_module.ml b/src/proto_alpha/lib_protocol/test/unit/test_level_module.ml index 894de6359b9fdfc1da758359fc690a20f31b55a4..16c7d49b1e33150849757cc20039487babce5763 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_level_module.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_level_module.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (baking) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_level_module.ml Subject: some functions in the Level module *) @@ -276,3 +277,7 @@ let tests = Tztest.tztest "level_from_raw" `Quick test_level_from_raw; Tztest.tztest "first_level_in_cycle" `Quick test_first_level_in_cycle; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("level module", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_liquidity_baking_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_liquidity_baking_repr.ml index 1e7d9e7be7acf994b742d0426b7fd81d492db25c..78d3b0d73851e786d0f84c78667f140d59673ce1 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_liquidity_baking_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_liquidity_baking_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol Liquidity_baking_repr module - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_liquidity_baking_repr.ml Subject: Tests for the Liquidity_baking_repr module *) @@ -216,44 +217,39 @@ let test_ema_symmetry () = let tests = [ + Tztest.tztest "EMA does not change when vote is Pass" `Quick test_ema_pass; Tztest.tztest - "Test EMA does not change when vote is Pass" - `Quick - test_ema_pass; - Tztest.tztest - "Test EMA remains in bounds when vote is Off" + "EMA remains in bounds when vote is Off" `Quick test_ema_in_bound_off; + Tztest.tztest "EMA increases when vote is Off" `Quick test_ema_increases_off; Tztest.tztest - "Test EMA increases when vote is Off" - `Quick - test_ema_increases_off; - Tztest.tztest - "Test EMA does not increase too much when vote is Off" + "EMA does not increase too much when vote is Off" `Quick test_ema_increases_off_bound; Tztest.tztest - "Test EMA remains in bounds when vote is On" + "EMA remains in bounds when vote is On" `Quick test_ema_in_bound_on; + Tztest.tztest "EMA decreases when vote is On" `Quick test_ema_decreases_on; Tztest.tztest - "Test EMA decreases when vote is On" - `Quick - test_ema_decreases_on; - Tztest.tztest - "Test EMA does not decrease too much when vote is On" + "EMA does not decrease too much when vote is On" `Quick test_ema_decreases_on_bound; Tztest.tztest - "Test EMA goes from 0 to one billion in 1386 Off votes" + "EMA goes from 0 to one billion in 1386 Off votes" `Quick test_ema_many_off; Tztest.tztest - "Test EMA goes from two billions to one billion in 1386 On votes" + "EMA goes from two billions to one billion in 1386 On votes" `Quick test_ema_many_on; Tztest.tztest - "Test that voting On and Off have symmetric effects on the EMA" + "voting On and Off have symmetric effects on the EMA" `Quick test_ema_symmetry; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("liquidity baking", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_local_contexts.ml b/src/proto_alpha/lib_protocol/test/unit/test_local_contexts.ml index 4505dddfcc5b182d47e807650e1fea2b8aac8f88..9e3c4c54ce69fb3513f0a253ffca3ef094df4a95 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_local_contexts.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_local_contexts.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Local context storages by functors - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_local_contexts.ml Dependencies: helpers/block.ml Subject: Tests for local contexts @@ -132,3 +133,7 @@ let tests = `Quick test_local_remove_existing; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("local contexts", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_main.ml b/src/proto_alpha/lib_protocol/test/unit/test_main.ml deleted file mode 100644 index da90172f15c347617d10c775dfec6add0df30589..0000000000000000000000000000000000000000 --- a/src/proto_alpha/lib_protocol/test/unit/test_main.ml +++ /dev/null @@ -1,62 +0,0 @@ -(*****************************************************************************) -(* *) -(* Open Source License *) -(* Copyright (c) 2022 Marigold *) -(* Copyright (c) 2022 Nomadic Labs *) -(* Copyright (c) 2022 Oxhead Alpha *) -(* *) -(* Permission is hereby granted, free of charge, to any person obtaining a *) -(* copy of this software and associated documentation files (the "Software"),*) -(* to deal in the Software without restriction, including without limitation *) -(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) -(* and/or sell copies of the Software, and to permit persons to whom the *) -(* Software is furnished to do so, subject to the following conditions: *) -(* *) -(* The above copyright notice and this permission notice shall be included *) -(* in all copies or substantial portions of the Software. *) -(* *) -(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) -(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) -(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) -(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) -(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) -(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) -(* DEALINGS IN THE SOFTWARE. *) -(* *) -(*****************************************************************************) - -let () = - Alcotest_lwt.run - ~__FILE__ - (Protocol.name ^ " > unit") - [ - ("Tez_repr.ml", Test_tez_repr.tests); - ("Contract_repr.ml", Test_contract_repr.tests); - ("Destination_repr.ml", Test_destination_repr.tests); - ("Operation_repr.ml", Test_operation_repr.tests); - ("Global_constants_storage.ml", Test_global_constants_storage.tests); - ("fitness", Test_fitness.tests); - ("fixed point computation", Test_fixed_point.tests); - ("level module", Test_level_module.tests); - ("qty", Test_qty.tests); - ("round", Test_round_repr.tests); - ("time", Test_time_repr.tests); - ("receipt encodings", Test_receipt.tests); - ("saturation arithmetic", Test_saturation.tests); - ("gas monad", Test_gas_monad.tests); - ("sc rollup storage", Test_sc_rollup_storage.tests); - ("sc rollup game", Test_sc_rollup_game.tests); - ("liquidity baking", Test_liquidity_baking_repr.tests); - ("sc rollup wasm", Test_sc_rollup_wasm.tests); - ("sc rollup arith", Test_sc_rollup_arith.tests); - ("merkle list", Test_merkle_list.tests); - ("sc rollup inbox", Test_sc_rollup_inbox.tests); - ("skip list", Test_skip_list_repr.tests); - ("sc rollup management protocol", Test_sc_rollup_management_protocol.tests); - ("Bond_id_repr.ml", Test_bond_id_repr.tests); - ("zk rollup storage", Test_zk_rollup_storage.tests); - ("Delegate_consensus_key.ml", Test_consensus_key.tests); - ("local_contexts", Test_local_contexts.tests); - ("dal slot proof", Test_dal_slot_proof.tests); - ] - |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_merkle_list.ml b/src/proto_alpha/lib_protocol/test/unit/test_merkle_list.ml index ffdc84b340d115766af710321d9bc7041867905b..d33e7194ddf8cd179bf36e28ea409a9629ce4249 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_merkle_list.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_merkle_list.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Merkle list) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_merkle_list.ml Subject: test the ad-hoc merkle tree structure implemented to encode lists *) @@ -234,20 +235,19 @@ let test_path_encoding () = let valid_tests = [ - ("test_compute", test_compute); - ("test_snoc", test_snoc); - ("test_snoc_non_tr", test_snoc_non_tr); - ("test_compute_path", test_compute_path); - ("test_check_path", test_check_path); - ("test_path_encoding", test_path_encoding); - ("test_compute_path_negative_pos", test_compute_path_negative_pos); - ("test_compute_path_out_of_bounds", test_compute_path_out_of_bounds); - ("test_check_path_negative_pos", test_check_path_negative_pos); - ("test_check_path_out_of_bounds", test_check_path_out_of_bounds); - ( "test_compute_path_out_of_bounds_full", - test_compute_path_out_of_bounds_full ); - ("test_check_path_wrong_pos", test_check_path_wrong_pos); - ("test_check_invalidated_path", test_check_invalidated_path); + ("compute", test_compute); + ("snoc", test_snoc); + ("snoc_non_tr", test_snoc_non_tr); + ("compute_path", test_compute_path); + ("check_path", test_check_path); + ("path_encoding", test_path_encoding); + ("compute_path_negative_pos", test_compute_path_negative_pos); + ("compute_path_out_of_bounds", test_compute_path_out_of_bounds); + ("check_path_negative_pos", test_check_path_negative_pos); + ("check_path_out_of_bounds", test_check_path_out_of_bounds); + ("compute_path_out_of_bounds_full", test_compute_path_out_of_bounds_full); + ("check_path_wrong_pos", test_check_path_wrong_pos); + ("check_invalidated_path", test_check_invalidated_path); ] let wrap (n, f) = @@ -255,3 +255,7 @@ let wrap (n, f) = Lwt.return (f ()) >|= function Ok () -> () | Error _ -> assert false) let tests = List.map wrap valid_tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("merkle list", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_operation_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_operation_repr.ml index 3d0e57d4f3539ca4f585db5ca9fb499074fa78b3..4ae7d506ff3af0255597eb7bfacda69d2186b156 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_operation_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_operation_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Operation_repr - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_operation_repr.ml Dependencies: -- Subject: To test the modules (including the top-level) in operation_repr.ml as individual units, particularly @@ -182,3 +183,7 @@ let tests = `Quick Test_operation_repr.test_multiple_non_manager; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Operation_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_qty.ml b/src/proto_alpha/lib_protocol/test/unit/test_qty.ml index b4a97549e99e1580bd95ca2c49ccc68bd22ae2ae..851faa4e15cfbc9d860b5651ab99c33a30ad62fc 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_qty.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_qty.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (quantities) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_qty.ml Subject: On tez quantities. *) @@ -157,3 +158,6 @@ let wrap (n, f) = Format.kasprintf Stdlib.failwith "%a" pp_print_trace error) let tests = List.map wrap tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("qty", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_raw_level_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_raw_level_repr.ml index 0074712e99298b1069d6d5e006a47f0262cdfe2d..1c345b749ef8ea0eb2b953921946270ac2a1558e 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_raw_level_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_raw_level_repr.ml @@ -29,7 +29,8 @@ open Tztest (** Testing ------- Component: Raw_level_repr - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_raw_level_repr.ml Dependencies: -- Subject: To test the modules (including the top-level) in raw_level_repr.ml as individual units, particularly @@ -173,3 +174,7 @@ let skipped_tests = `Quick Test_raw_level_repr.test_skip_succ; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Raw level", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_receipt.ml b/src/proto_alpha/lib_protocol/test/unit/test_receipt.ml index 5cad90a33103d460c5de4965aca94023ce6d1776..08e8deb83e80589018f84b9a14ae37cbbb4a7cfc 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_receipt.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_receipt.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (token) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_receipt.ml Subject: Test receipt endocings. *) @@ -91,3 +92,6 @@ let test_encodings () = test_encodings Sc_rollup_refutation_rewards let tests = Tztest.[tztest "receipt - encoding" `Quick test_encodings] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("receipt", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_round_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_round_repr.ml index 650ae35df6ae9a2c134b3a6a9746dd8ef936f1de..5e63976421e142757bc2956f2067c95c130080c8 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_round_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_round_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: protocol - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_round_repr.ml Subject: test the Round_repr module *) @@ -616,13 +617,13 @@ let test_round_and_offset_correction = let tests = Tztest. [ - tztest "test_level_offset_of_round" `Quick test_level_offset_of_round; - tztest "test Round_duration" `Quick test_round; + tztest "level_offset_of_round" `Quick test_level_offset_of_round; + tztest "Round_duration" `Quick test_round; tztest "round_of_timestamp" `Quick test_round_of_timestamp; tztest "round_of_timestamp_perf" `Quick test_round_of_timestamp_perf; tztest "timestamp_of_round_perf" `Quick test_timestamp_of_round_perf; tztest - "test level offset too high error is triggered" + "level offset too high error is triggered" `Quick test_error_is_triggered_for_too_high_timestamp; tztest "round_of_ts (ts_of_round r) = r" `Quick test_ts_of_round_inverse; @@ -632,3 +633,6 @@ let tests = test_round_of_ts_inverse; test_round_and_offset_correction; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("round", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_saturation.ml b/src/proto_alpha/lib_protocol/test/unit/test_saturation.ml index 3a1248aaca3cc1d069fb65937de003febdbefa18..b3379b034f639142ae3d62dfc77627c4554c48dd 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_saturation.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_saturation.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (saturated arithmetic) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_saturation.ml Subject: The gas is represented using saturated arithmetic. These unit tests check that saturated arithmetic operations are correctly implemented. @@ -233,3 +234,7 @@ let tests = `Quick (encoding Saturation_repr.n_encoding); ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("saturation arithmetic", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_arith.ml b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_arith.ml index d4d186c56651131cf5513233ae1a0ac1d2f4384c..de6e353b43273f3eb19206b5e6cd7d9d5519df79 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_arith.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_arith.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (saturated arithmetic) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_arith.ml Subject: Basic testing of the arithmetic rollup example *) @@ -545,3 +546,7 @@ let tests = test_initial_state_hash_arith_pvm; Tztest.tztest "Filter internal message" `Quick test_filter_internal_message; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup arith", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_game.ml b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_game.ml index 659d475495d4f02b6db6076fb9622f3d0c9f19b6..1da8d2b65fa5ae19015bf4342225eb75f2e7272d 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_game.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_game.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol Sc_rollup_refutation_storage - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_game.ml Subject: Tests for the SCORU refutation game *) @@ -459,21 +460,23 @@ let tests = `Quick test_invalid_serialized_inbox_proof; Tztest.tztest - "Test to start a game with invalid commitment hash (swap commitment)." + "start a game with invalid commitment hash (swap commitment)." `Quick test_first_move_with_swapped_commitment; Tztest.tztest - "Test to start a game with invalid commitment hash (op from outsider)." + "start a game with invalid commitment hash (op from outsider)." `Quick test_first_move_from_invalid_player; Tztest.tztest - "Test to start a game with invalid commitment hash (opponent is not in \ - game)." + "start a game with invalid commitment hash (opponent is not in game)." `Quick test_first_move_with_invalid_opponent; Tztest.tztest - "Test to start a game with commitment hash that are not the first \ - conflict." + "start a game with commitment hash that are not the first conflict." `Quick test_first_move_with_invalid_ancestor; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup game", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_inbox.ml b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_inbox.ml index 0cc0a699d1f89bbbac39696dfe7485f8b7ca435c..98e1867438c31924cc8b22d06b4b45212aec292e 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_inbox.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_inbox.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (smart contract rollup inbox) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_inbox.ml Subject: These unit tests check the off-line inbox implementation for smart contract rollups *) @@ -940,3 +941,7 @@ let inbox_tests = let tests = merkelized_payload_hashes_tests @ inbox_tests @ Test_sc_rollup_inbox_legacy.tests + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup inbox", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml index 66fa9d8cd82e74e16fcd923ac435701780425d59..e8af9186b77a5b3d312f6171eee631e74582c467 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_management_protocol.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Rollup Management Protocol) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_management_protocol.ml Subject: Sanity checks for the Rollup Management Protocol module. *) @@ -355,3 +356,10 @@ let tests = `Quick test_encode_decode_outbox_message; ] + +let () = + Alcotest_lwt.run + ~__FILE__ + Protocol.name + [("sc rollup management protocol", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_storage.ml b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_storage.ml index ed83ffbd90a115d45a80b61f59a1b1a51fa5cb24..0ce42edc846a7facd5fa88a1d215d158bf77fde6 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_storage.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_storage.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Protocol Sc_rollup_storage - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_storage.ml Subject: Tests for the SCORU storage module *) @@ -2672,7 +2673,7 @@ module Stake_storage_tests = struct `Quick test_no_conflict_point_both_stakers_at_lcc; Tztest.tztest - "test_conflict_point_computation_fits_in_gas_limit" + "conflict_point_computation_fits_in_gas_limit" `Quick test_conflict_point_computation_fits_in_gas_limit; Tztest.tztest "can remove staker 1" `Quick test_can_remove_staker; @@ -2743,7 +2744,7 @@ module Stake_storage_tests = struct `Quick test_unrelated_commitments; Tztest.tztest - "test fresh index is correcly incremented" + "fresh index is correcly incremented" `Quick test_fresh_index_correctly_increment; ] @@ -2797,3 +2798,7 @@ let tests = Stake_storage_tests.tests @ Rollup_storage_tests.tests (* FIXME: https://gitlab.com/tezos/tezos/-/issues/2460 Further tests to be added. *) + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup storage", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_wasm.ml b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_wasm.ml index 2dc6313cdc46f82f9dc110bd501ae00e4a69477a..644eaa6393bfe82b6a44863b204849a4492dedbc 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_wasm.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_wasm.ml @@ -27,7 +27,8 @@ (** Testing ------- Component: Rollup layer 1 logic - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_sc_rollup_wasm.ml Subject: Unit test for the Wasm PVM *) @@ -345,6 +346,10 @@ let tests = test_initial_state_hash_wasm_pvm; Tztest.tztest "size of a rollup metadata" `Quick test_metadata_size; Tztest.tztest "l1 input kind" `Quick test_l1_input_kind; - Tztest.tztest "test output proofs" `Quick test_output; - Tztest.tztest "test protocol names consistency" `Quick test_protocol_names; + Tztest.tztest "output proofs" `Quick test_output; + Tztest.tztest "protocol names consistency" `Quick test_protocol_names; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("sc rollup wasm", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_skip_list_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_skip_list_repr.ml index 8a64dd89b159a9fc459e7aa558ec0acf7b2b5ef3..0b5a0c06d45424e424af1c954d3cecf3613fe1df 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_skip_list_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_skip_list_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (skip lists) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_skip_list_repr.ml Subject: Test skip list implementation *) @@ -674,3 +675,7 @@ let tests = `Quick test_skip_list_proof_size; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("skip list", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_tez_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_tez_repr.ml index 65cecc9fd19171816ade0f6f14692fed6d625be3..ae6354778b90af0c0cf54393743a97cbeede75f0 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_tez_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_tez_repr.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Tez_repr - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_tez_repr.ml Dependencies: -- Subject: To test the modules (including the top-level) in tez_repr.ml as individual units, particularly @@ -196,3 +197,7 @@ let tests = `Quick Test_tez_repr.test_data_encoding; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("Tez_repr.ml", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_time_repr.ml b/src/proto_alpha/lib_protocol/test/unit/test_time_repr.ml index f103d9ccaf7df65b8b134248e9997964ead8a685..e9f6948084944c907c39b6d8a885086a011eb95d 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_time_repr.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_time_repr.ml @@ -1,7 +1,8 @@ (** Testing ------- Component: Protocol (time repr) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_time_repr.ml Subject: Error handling of time operations *) @@ -42,3 +43,6 @@ let tests = Tztest.tztest "non-overflowing addition" `Quick test_nominal_add; Tztest.tztest "overflowing addition" `Quick test_overflow_add; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("time", tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_protocol/test/unit/test_zk_rollup_storage.ml b/src/proto_alpha/lib_protocol/test/unit/test_zk_rollup_storage.ml index f42b9ebbec325c16504bd2fb289ae1fae39cb49b..82af6fbe1f0be6a7b26daa41231950465f94d3f2 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_zk_rollup_storage.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_zk_rollup_storage.ml @@ -26,7 +26,8 @@ (** Testing ------- Component: Protocol (Zk_rollup) - Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe + Invocation: dune exec src/proto_alpha/lib_protocol/test/unit/main.exe \ + -- --file test_zk_rollup_storage.ml Subject: On ZK Rollup storage *) @@ -388,9 +389,10 @@ let tests = "pending_list_get errors" `Quick Raw_context_tests.pending_list_errors; - Tztest.tztest "test_update" `Quick Raw_context_tests.test_update; - Tztest.tztest - "test_update errors" - `Quick - Raw_context_tests.test_update_errors; + Tztest.tztest "update" `Quick Raw_context_tests.test_update; + Tztest.tztest "update errors" `Quick Raw_context_tests.test_update_errors; ] + +let () = + Alcotest_lwt.run ~__FILE__ Protocol.name [("zk rollup storage", tests)] + |> Lwt_main.run