diff --git a/.gitlab/ci/jobs/test/unit.yml b/.gitlab/ci/jobs/test/unit.yml index ee8e7b02be0ebf4f3aa546187e4a56bdb6b8e999..031afda5d15608df2b5163207c571303c9119417 100644 --- a/.gitlab/ci/jobs/test/unit.yml +++ b/.gitlab/ci/jobs/test/unit.yml @@ -50,7 +50,6 @@ unit:015_PtLimaPt: # Note the use of @ resp. @@ to select tests recursively resp. non-recursively proto_015_PtLimaPt__lib_protocol__1: > @@src/proto_015_PtLimaPt/lib_protocol/test/integration/runtest - @src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/runtest @src/proto_015_PtLimaPt/lib_protocol/test/integration/gas/runtest proto_015_PtLimaPt__lib_protocol__2: > @src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/runtest @@ -77,7 +76,6 @@ unit:016_PtMumbai: # Note the use of @ resp. @@ to select tests recursively resp. non-recursively proto_016_PtMumbai__lib_protocol__1: > @@src/proto_016_PtMumbai/lib_protocol/test/integration/runtest - @src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/runtest @src/proto_016_PtMumbai/lib_protocol/test/integration/gas/runtest proto_016_PtMumbai__lib_protocol__2: > @src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/runtest @@ -107,7 +105,6 @@ unit:alpha: # Note the use of @ resp. @@ to select tests recursively resp. non-recursively proto_alpha__lib_protocol__1: > @@src/proto_alpha/lib_protocol/test/integration/runtest - @src/proto_alpha/lib_protocol/test/integration/consensus/runtest @src/proto_alpha/lib_protocol/test/integration/gas/runtest proto_alpha__lib_protocol__2: > @src/proto_alpha/lib_protocol/test/integration/michelson/runtest diff --git a/manifest/main.ml b/manifest/main.ml index e3740a32d30e7a090a6c00f492fda15268920314..f507ef3d50d71107fe21f17dec2978d16dc05ed3 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -3911,14 +3911,30 @@ end = struct let number = Name.number name in let path = Name.base_path name in let _integration_consensus = - test - "main" + tezt + [ + "test_main"; + "test_baking"; + "test_consensus_key"; + "test_deactivation"; + "test_delegation"; + "test_double_baking"; + "test_double_endorsement"; + "test_double_preendorsement"; + "test_endorsement"; + "test_frozen_deposits"; + "test_helpers_rpcs"; + "test_participation"; + "test_preendorsement_functor"; + "test_preendorsement"; + "test_seed"; + ] ~path:(path // "lib_protocol/test/integration/consensus") ~with_macos_security_framework:true ~opam:(sf "tezos-protocol-%s-tests" name_dash) ~deps: [ - alcotest_lwt; + alcotezt; octez_base |> open_ ~m:"TzPervasives" |> open_ ~m:"TzPervasives.Error_monad.Legacy_monad_globals"; main |> open_; diff --git a/opam/tezos-protocol-015-PtLimaPt-tests.opam b/opam/tezos-protocol-015-PtLimaPt-tests.opam index 99da1bf191e7dbd42d207701c21e3966e5d181b0..47d6a60ee66244700be620d3f9f693fbd7268e81 100644 --- a/opam/tezos-protocol-015-PtLimaPt-tests.opam +++ b/opam/tezos-protocol-015-PtLimaPt-tests.opam @@ -15,12 +15,12 @@ depends: [ "tezos-protocol-015-PtLimaPt" {with-test} "tezos-015-PtLimaPt-test-helpers" {with-test} "tezos-base-test-helpers" {with-test} - "tezos-protocol-plugin-015-PtLimaPt" {with-test} "tezos-client-015-PtLimaPt" {with-test} "tezos-benchmark" {with-test} "tezos-micheline" {with-test} "tezos-benchmark-015-PtLimaPt" {with-test} "tezos-benchmark-type-inference-015-PtLimaPt" {with-test} + "tezos-protocol-plugin-015-PtLimaPt" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } "tezos-test-helpers" {with-test} "tezt" { with-test & >= "3.0.0" } diff --git a/opam/tezos-protocol-016-PtMumbai-tests.opam b/opam/tezos-protocol-016-PtMumbai-tests.opam index a93eb6870996bc1b2e3ca7815162ce54561ced96..091810f90eea98b55fe11bd22cebd843074fe702 100644 --- a/opam/tezos-protocol-016-PtMumbai-tests.opam +++ b/opam/tezos-protocol-016-PtMumbai-tests.opam @@ -15,12 +15,12 @@ depends: [ "tezos-protocol-016-PtMumbai" {with-test} "tezos-016-PtMumbai-test-helpers" {with-test} "tezos-base-test-helpers" {with-test} - "tezos-protocol-plugin-016-PtMumbai" {with-test} "tezos-client-016-PtMumbai" {with-test} "tezos-benchmark" {with-test} "tezos-micheline" {with-test} "tezos-benchmark-016-PtMumbai" {with-test} "tezos-benchmark-type-inference-016-PtMumbai" {with-test} + "tezos-protocol-plugin-016-PtMumbai" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } "tezos-test-helpers" {with-test} "tezt" { with-test & >= "3.0.0" } diff --git a/opam/tezos-protocol-alpha-tests.opam b/opam/tezos-protocol-alpha-tests.opam index 15d4df922b4246e59b03fca1ca304ba5430a89a2..68772612ed843d6a5ecb24bc7bb25e551695295f 100644 --- a/opam/tezos-protocol-alpha-tests.opam +++ b/opam/tezos-protocol-alpha-tests.opam @@ -15,12 +15,12 @@ depends: [ "tezos-protocol-alpha" {with-test} "tezos-alpha-test-helpers" {with-test} "tezos-base-test-helpers" {with-test} - "tezos-protocol-plugin-alpha" {with-test} "tezos-client-alpha" {with-test} "tezos-benchmark" {with-test} "tezos-micheline" {with-test} "tezos-benchmark-alpha" {with-test} "tezos-benchmark-type-inference-alpha" {with-test} + "tezos-protocol-plugin-alpha" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } "tezos-test-helpers" {with-test} "tezt" { with-test & >= "3.0.0" } diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/dune b/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/dune index 019c3ff48270c6d938a214c96e7145703b61c527..9e97bbd96524ec55b987a312053a15a25f1912a7 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/dune @@ -1,30 +1,64 @@ ; This file was automatically generated, do not edit. ; Edit file manifest/main.ml instead. -(executable - (name main) +(library + (name + src_proto_015_PtLimaPt_lib_protocol_test_integration_consensus_tezt_lib) + (instrumentation (backend bisect_ppx)) (libraries - alcotest-lwt + tezt.core + octez-alcotezt tezos-base tezos-protocol-015-PtLimaPt tezos-015-PtLimaPt-test-helpers tezos-base-test-helpers tezos-protocol-015-PtLimaPt.parameters tezos-protocol-plugin-015-PtLimaPt) - (link_flags - (:standard) - (:include %{workspace_root}/macos-link-flags.sexp)) + (library_flags (:standard -linkall)) (flags (:standard) + -open Tezt_core + -open Tezt_core.Base + -open Octez_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_015_PtLimaPt -open Tezos_015_PtLimaPt_test_helpers -open Tezos_base_test_helpers -open Tezos_protocol_015_PtLimaPt_parameters - -open Tezos_protocol_plugin_015_PtLimaPt)) + -open Tezos_protocol_plugin_015_PtLimaPt) + (modules + test_main + test_baking + test_consensus_key + test_deactivation + test_delegation + test_double_baking + test_double_endorsement + test_double_preendorsement + test_endorsement + test_frozen_deposits + test_helpers_rpcs + test_participation + test_preendorsement_functor + test_preendorsement + test_seed)) + +(executable + (name main) + (libraries + src_proto_015_PtLimaPt_lib_protocol_test_integration_consensus_tezt_lib + tezt) + (link_flags + (:standard) + (:include %{workspace_root}/macos-link-flags.sexp)) + (modules main)) (rule - (alias runtest) + (alias runtezt) (package tezos-protocol-015-PtLimaPt-tests) (action (run %{dep:./main.exe}))) + +(rule + (targets main.ml) + (action (with-stdout-to %{targets} (echo "let () = Tezt.Test.run ()")))) diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/main.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_main.ml similarity index 70% rename from src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/main.ml rename to src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_main.ml index 04f2209b8b9d807905d67972ab831d3219e7ad09..03d274cb26b85eccbfc25195c3429c2bb1043547 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/main.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_main.ml @@ -34,18 +34,19 @@ let () = Alcotest_lwt.run "protocol > integration > consensus" [ - ("endorsement", Test_endorsement.tests); - ("preendorsement", Test_preendorsement.tests); - ("double endorsement", Test_double_endorsement.tests); - ("double preendorsement", Test_double_preendorsement.tests); - ("double baking", Test_double_baking.tests); - ("seed", Test_seed.tests); - ("baking", Test_baking.tests); - ("delegation", Test_delegation.tests); - ("deactivation", Test_deactivation.tests); - ("helpers rpcs", Test_helpers_rpcs.tests); - ("participation monitoring", Test_participation.tests); - ("frozen deposits", Test_frozen_deposits.tests); - ("consensus key", Test_consensus_key.tests); + (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/dune b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/dune index cca2db9985b034149e06796c0495022bc7f2960a..89f475287f04e053d1bae38966391f06229b2160 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/dune @@ -1,30 +1,64 @@ ; This file was automatically generated, do not edit. ; Edit file manifest/main.ml instead. -(executable - (name main) +(library + (name + src_proto_016_PtMumbai_lib_protocol_test_integration_consensus_tezt_lib) + (instrumentation (backend bisect_ppx)) (libraries - alcotest-lwt + tezt.core + octez-alcotezt tezos-base tezos-protocol-016-PtMumbai tezos-016-PtMumbai-test-helpers tezos-base-test-helpers tezos-protocol-016-PtMumbai.parameters tezos-protocol-plugin-016-PtMumbai) - (link_flags - (:standard) - (:include %{workspace_root}/macos-link-flags.sexp)) + (library_flags (:standard -linkall)) (flags (:standard) + -open Tezt_core + -open Tezt_core.Base + -open Octez_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_016_PtMumbai -open Tezos_016_PtMumbai_test_helpers -open Tezos_base_test_helpers -open Tezos_protocol_016_PtMumbai_parameters - -open Tezos_protocol_plugin_016_PtMumbai)) + -open Tezos_protocol_plugin_016_PtMumbai) + (modules + test_main + test_baking + test_consensus_key + test_deactivation + test_delegation + test_double_baking + test_double_endorsement + test_double_preendorsement + test_endorsement + test_frozen_deposits + test_helpers_rpcs + test_participation + test_preendorsement_functor + test_preendorsement + test_seed)) + +(executable + (name main) + (libraries + src_proto_016_PtMumbai_lib_protocol_test_integration_consensus_tezt_lib + tezt) + (link_flags + (:standard) + (:include %{workspace_root}/macos-link-flags.sexp)) + (modules main)) (rule - (alias runtest) + (alias runtezt) (package tezos-protocol-016-PtMumbai-tests) (action (run %{dep:./main.exe}))) + +(rule + (targets main.ml) + (action (with-stdout-to %{targets} (echo "let () = Tezt.Test.run ()")))) diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.ml b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_main.ml similarity index 70% rename from src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.ml rename to src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_main.ml index 04f2209b8b9d807905d67972ab831d3219e7ad09..03d274cb26b85eccbfc25195c3429c2bb1043547 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/main.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/test_main.ml @@ -34,18 +34,19 @@ let () = Alcotest_lwt.run "protocol > integration > consensus" [ - ("endorsement", Test_endorsement.tests); - ("preendorsement", Test_preendorsement.tests); - ("double endorsement", Test_double_endorsement.tests); - ("double preendorsement", Test_double_preendorsement.tests); - ("double baking", Test_double_baking.tests); - ("seed", Test_seed.tests); - ("baking", Test_baking.tests); - ("delegation", Test_delegation.tests); - ("deactivation", Test_deactivation.tests); - ("helpers rpcs", Test_helpers_rpcs.tests); - ("participation monitoring", Test_participation.tests); - ("frozen deposits", Test_frozen_deposits.tests); - ("consensus key", Test_consensus_key.tests); + (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/dune b/src/proto_alpha/lib_protocol/test/integration/consensus/dune index 7c544a7fb9e8bb7f43d1523407a0e59f6ffa23d3..3326467765d40daaf8ca08a728f13c0b8dbfdc6d 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/dune +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/dune @@ -1,30 +1,63 @@ ; This file was automatically generated, do not edit. ; Edit file manifest/main.ml instead. -(executable - (name main) +(library + (name src_proto_alpha_lib_protocol_test_integration_consensus_tezt_lib) + (instrumentation (backend bisect_ppx)) (libraries - alcotest-lwt + tezt.core + octez-alcotezt tezos-base tezos-protocol-alpha tezos-alpha-test-helpers tezos-base-test-helpers tezos-protocol-alpha.parameters tezos-protocol-plugin-alpha) - (link_flags - (:standard) - (:include %{workspace_root}/macos-link-flags.sexp)) + (library_flags (:standard -linkall)) (flags (:standard) + -open Tezt_core + -open Tezt_core.Base + -open Octez_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_alpha_test_helpers -open Tezos_base_test_helpers -open Tezos_protocol_alpha_parameters - -open Tezos_protocol_plugin_alpha)) + -open Tezos_protocol_plugin_alpha) + (modules + test_main + test_baking + test_consensus_key + test_deactivation + test_delegation + test_double_baking + test_double_endorsement + test_double_preendorsement + test_endorsement + test_frozen_deposits + test_helpers_rpcs + test_participation + test_preendorsement_functor + test_preendorsement + test_seed)) + +(executable + (name main) + (libraries + src_proto_alpha_lib_protocol_test_integration_consensus_tezt_lib + tezt) + (link_flags + (:standard) + (:include %{workspace_root}/macos-link-flags.sexp)) + (modules main)) (rule - (alias runtest) + (alias runtezt) (package tezos-protocol-alpha-tests) (action (run %{dep:./main.exe}))) + +(rule + (targets main.ml) + (action (with-stdout-to %{targets} (echo "let () = Tezt.Test.run ()")))) diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/main.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_main.ml similarity index 70% rename from src/proto_alpha/lib_protocol/test/integration/consensus/main.ml rename to src/proto_alpha/lib_protocol/test/integration/consensus/test_main.ml index 04f2209b8b9d807905d67972ab831d3219e7ad09..03d274cb26b85eccbfc25195c3429c2bb1043547 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/main.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_main.ml @@ -34,18 +34,19 @@ let () = Alcotest_lwt.run "protocol > integration > consensus" [ - ("endorsement", Test_endorsement.tests); - ("preendorsement", Test_preendorsement.tests); - ("double endorsement", Test_double_endorsement.tests); - ("double preendorsement", Test_double_preendorsement.tests); - ("double baking", Test_double_baking.tests); - ("seed", Test_seed.tests); - ("baking", Test_baking.tests); - ("delegation", Test_delegation.tests); - ("deactivation", Test_deactivation.tests); - ("helpers rpcs", Test_helpers_rpcs.tests); - ("participation monitoring", Test_participation.tests); - ("frozen deposits", Test_frozen_deposits.tests); - ("consensus key", Test_consensus_key.tests); + (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/tezt/tests/dune b/tezt/tests/dune index 8b5861c6b66c7e1eadd1d4fb3884d91c7872e306..7395cf36dcc1ba77d87289fbca1a490c17c572d4 100644 --- a/tezt/tests/dune +++ b/tezt/tests/dune @@ -17,6 +17,7 @@ src_proto_alpha_lib_protocol_test_pbt_tezt_lib src_proto_alpha_lib_protocol_test_integration_operations_tezt_lib src_proto_alpha_lib_protocol_test_integration_gas_tezt_lib + src_proto_alpha_lib_protocol_test_integration_consensus_tezt_lib src_proto_alpha_lib_plugin_test_tezt_lib src_proto_alpha_lib_delegate_test_tezt_lib src_proto_alpha_lib_client_test_tezt_lib @@ -24,6 +25,7 @@ src_proto_016_PtMumbai_lib_protocol_test_pbt_tezt_lib src_proto_016_PtMumbai_lib_protocol_test_integration_operations_tezt_lib src_proto_016_PtMumbai_lib_protocol_test_integration_gas_tezt_lib + src_proto_016_PtMumbai_lib_protocol_test_integration_consensus_tezt_lib src_proto_016_PtMumbai_lib_plugin_test_tezt_lib src_proto_016_PtMumbai_lib_delegate_test_tezt_lib src_proto_016_PtMumbai_lib_client_test_tezt_lib @@ -31,6 +33,7 @@ src_proto_015_PtLimaPt_lib_protocol_test_pbt_tezt_lib src_proto_015_PtLimaPt_lib_protocol_test_integration_operations_tezt_lib src_proto_015_PtLimaPt_lib_protocol_test_integration_gas_tezt_lib + src_proto_015_PtLimaPt_lib_protocol_test_integration_consensus_tezt_lib src_proto_015_PtLimaPt_lib_plugin_test_tezt_lib src_proto_015_PtLimaPt_lib_delegate_test_tezt_lib src_proto_015_PtLimaPt_lib_client_test_tezt_lib