diff --git a/.gitlab/ci/jobs/test/unit.yml b/.gitlab/ci/jobs/test/unit.yml index 328deb4866074c9eb5189e04f85bb19bb55b46fa..a72a3e188d9e5b77bb8fde0073a97ac91be10f07 100644 --- a/.gitlab/ci/jobs/test/unit.yml +++ b/.gitlab/ci/jobs/test/unit.yml @@ -65,8 +65,6 @@ unit:015_PtLimaPt: @src/proto_015_PtLimaPt/lib_protocol/test/pbt/runtest2 proto_015_PtLimaPt__lib_protocol__pbt3: > @src/proto_015_PtLimaPt/lib_protocol/test/pbt/runtest3 - proto_015_PtLimaPt: > - @src/proto_015_PtLimaPt/lib_delegate/runtest parallel: matrix: - TEST_TARGETS: @@ -76,7 +74,6 @@ unit:015_PtLimaPt: - proto_015_PtLimaPt__lib_protocol__pbt1 - proto_015_PtLimaPt__lib_protocol__pbt2 - proto_015_PtLimaPt__lib_protocol__pbt3 - - proto_015_PtLimaPt script: - scripts/test_wrapper.sh $TEST_TARGETS ${!TEST_TARGETS} - ./scripts/ci/merge_coverage.sh @@ -106,7 +103,6 @@ unit:016_PtMumbai: proto_016_PtMumbai__lib_protocol__pbt3: > @src/proto_016_PtMumbai/lib_protocol/test/pbt/runtest3 proto_016_PtMumbai: > - @src/proto_016_PtMumbai/lib_delegate/runtest @src/proto_016_PtMumbai/lib_dal/runtest parallel: matrix: @@ -147,7 +143,6 @@ unit:alpha: proto_alpha__lib_protocol__pbt3: > @src/proto_alpha/lib_protocol/test/pbt/runtest3 proto_alpha: > - @src/proto_alpha/lib_delegate/runtest @src/proto_alpha/lib_dal/runtest parallel: matrix: diff --git a/manifest/main.ml b/manifest/main.ml index 0e3449a2a5410867d232513f98078150ae500f69..68ee9193a05a81a1d906cf256c6291894ccd48cf 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -4947,8 +4947,8 @@ module Protocol = Protocol ] ~bisect_ppx:false in - test - "main" + tezt + ["test_scenario"] ~path:(path // "lib_delegate/test") ~with_macos_security_framework:true ~opam:(sf "tezos-baking-%s" name_dash) @@ -4968,7 +4968,7 @@ module Protocol = Protocol baking |> open_; parameters |> if_some |> if_ N.(number >= 012); octez_crypto |> if_ N.(number >= 012); - alcotest_lwt; + alcotezt; uri; ] in diff --git a/opam/tezos-baking-015-PtLimaPt.opam b/opam/tezos-baking-015-PtLimaPt.opam index 4a3fa3bfcbc69065cbd6bb01d14130c587389f90..f86e4c334926880ea2ed793e66bb90cdda2799bb 100644 --- a/opam/tezos-baking-015-PtLimaPt.opam +++ b/opam/tezos-baking-015-PtLimaPt.opam @@ -36,14 +36,16 @@ depends: [ "tezos-mockup" "tezos-mockup-proxy" "tezos-mockup-commands" + "tezt" { with-test & >= "3.0.0" } "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-crypto" {with-test} - "alcotest-lwt" { with-test & >= "1.5.0" } + "octez-alcotezt" {with-test} ] build: [ ["rm" "-r" "vendors"] ["dune" "build" "-p" name "-j" jobs] ["dune" "runtest" "-p" name "-j" jobs] {with-test} + ["dune" "build" "@runtezt" "-p" name "-j" jobs] {with-test} ] synopsis: "Tezos/Protocol: base library for `tezos-baker/accuser`" diff --git a/opam/tezos-baking-016-PtMumbai.opam b/opam/tezos-baking-016-PtMumbai.opam index dab9b35f645d6c507269d5f05481fbb8b055aa11..3e26d967a7861207170a6b8253e6dab94b33b2fe 100644 --- a/opam/tezos-baking-016-PtMumbai.opam +++ b/opam/tezos-baking-016-PtMumbai.opam @@ -36,14 +36,16 @@ depends: [ "tezos-mockup" "tezos-mockup-proxy" "tezos-mockup-commands" + "tezt" { with-test & >= "3.0.0" } "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-crypto" {with-test} - "alcotest-lwt" { with-test & >= "1.5.0" } + "octez-alcotezt" {with-test} ] build: [ ["rm" "-r" "vendors"] ["dune" "build" "-p" name "-j" jobs] ["dune" "runtest" "-p" name "-j" jobs] {with-test} + ["dune" "build" "@runtezt" "-p" name "-j" jobs] {with-test} ] synopsis: "Tezos/Protocol: base library for `tezos-baker/accuser`" diff --git a/opam/tezos-baking-alpha.opam b/opam/tezos-baking-alpha.opam index 5122aaeb07dd2dfabfd619d407ca18f3113a473f..e2711ed928ef4da54aa17600e15a42d66c58b69d 100644 --- a/opam/tezos-baking-alpha.opam +++ b/opam/tezos-baking-alpha.opam @@ -37,14 +37,16 @@ depends: [ "tezos-mockup" "tezos-mockup-proxy" "tezos-mockup-commands" + "tezt" { with-test & >= "3.0.0" } "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-crypto" {with-test} - "alcotest-lwt" { with-test & >= "1.5.0" } + "octez-alcotezt" {with-test} ] build: [ ["rm" "-r" "vendors"] ["dune" "build" "-p" name "-j" jobs] ["dune" "runtest" "-p" name "-j" jobs] {with-test} + ["dune" "build" "@runtezt" "-p" name "-j" jobs] {with-test} ] synopsis: "Tezos/Protocol: base library for `tezos-baker/accuser`" diff --git a/src/proto_015_PtLimaPt/lib_delegate/test/dune b/src/proto_015_PtLimaPt/lib_delegate/test/dune index 22cc5db27090dea24bb1bfbc228065eef8ee43cd..f4a7c57b6c7f16ffcd7d3c5b29a19e75e07ac950 100644 --- a/src/proto_015_PtLimaPt/lib_delegate/test/dune +++ b/src/proto_015_PtLimaPt/lib_delegate/test/dune @@ -1,9 +1,11 @@ ; This file was automatically generated, do not edit. ; Edit file manifest/main.ml instead. -(executable - (name main) +(library + (name src_proto_015_PtLimaPt_lib_delegate_test_tezt_lib) + (instrumentation (backend bisect_ppx)) (libraries + tezt.core tezos-base tezos-micheline tezos-client-015-PtLimaPt @@ -13,13 +15,13 @@ tezos-baking-015-PtLimaPt tezos-protocol-015-PtLimaPt.parameters tezos-crypto - alcotest-lwt + octez-alcotezt uri) - (link_flags - (:standard) - (:include %{workspace_root}/macos-link-flags.sexp)) + (library_flags (:standard -linkall)) (flags (:standard) + -open Tezt_core + -open Tezt_core.Base -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline @@ -27,9 +29,25 @@ -open Tezos_protocol_015_PtLimaPt -open Tezos_base_test_helpers -open Tezos_015_PtLimaPt_mockup_simulator - -open Tezos_baking_015_PtLimaPt)) + -open Tezos_baking_015_PtLimaPt + -open Octez_alcotezt) + (modules test_scenario)) + +(executable + (name main) + (libraries + src_proto_015_PtLimaPt_lib_delegate_test_tezt_lib + tezt) + (link_flags + (:standard) + (:include %{workspace_root}/macos-link-flags.sexp)) + (modules main)) (rule - (alias runtest) + (alias runtezt) (package tezos-baking-015-PtLimaPt) (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_delegate/test/main.ml b/src/proto_015_PtLimaPt/lib_delegate/test/main.ml deleted file mode 100644 index f05f721ebebbd604a3ec79f4193f17674afa1e0d..0000000000000000000000000000000000000000 --- a/src/proto_015_PtLimaPt/lib_delegate/test/main.ml +++ /dev/null @@ -1,10 +0,0 @@ -(** Testing - ------- - Component: Baking - Invocation: dune build @src/proto_alpha/lib_delegate/runtest - Subject: Entrypoint - *) - -let () = - Lwt_main.run - (Alcotest_lwt.run "protocol_alpha" [("scenario", Test_scenario.tests)]) diff --git a/src/proto_015_PtLimaPt/lib_delegate/test/test_scenario.ml b/src/proto_015_PtLimaPt/lib_delegate/test/test_scenario.ml index 381962fee1a59eeaf893c82c280c7d3959eb76d0..4698f0d95f145eb9399f4ca1a0cd8a445176fa79 100644 --- a/src/proto_015_PtLimaPt/lib_delegate/test/test_scenario.ml +++ b/src/proto_015_PtLimaPt/lib_delegate/test/test_scenario.ml @@ -1477,3 +1477,7 @@ let tests = tztest "scenario m7" `Quick test_scenario_m7; tztest "scenario m8" `Quick test_scenario_m8; ] + +let () = + Alcotest_lwt.run "lib_delegate" [(Protocol.name ^ ": scenario", tests)] + |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_delegate/test/dune b/src/proto_016_PtMumbai/lib_delegate/test/dune index b7119036fb2fb42dc8ec2a3e2de3bde5837dbe2c..c91d74a135a8492dd47ec648035ee87f41a079c7 100644 --- a/src/proto_016_PtMumbai/lib_delegate/test/dune +++ b/src/proto_016_PtMumbai/lib_delegate/test/dune @@ -1,9 +1,11 @@ ; This file was automatically generated, do not edit. ; Edit file manifest/main.ml instead. -(executable - (name main) +(library + (name src_proto_016_PtMumbai_lib_delegate_test_tezt_lib) + (instrumentation (backend bisect_ppx)) (libraries + tezt.core tezos-base tezos-micheline tezos-client-016-PtMumbai @@ -13,13 +15,13 @@ tezos-baking-016-PtMumbai tezos-protocol-016-PtMumbai.parameters tezos-crypto - alcotest-lwt + octez-alcotezt uri) - (link_flags - (:standard) - (:include %{workspace_root}/macos-link-flags.sexp)) + (library_flags (:standard -linkall)) (flags (:standard) + -open Tezt_core + -open Tezt_core.Base -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline @@ -27,9 +29,25 @@ -open Tezos_protocol_016_PtMumbai -open Tezos_base_test_helpers -open Tezos_016_PtMumbai_mockup_simulator - -open Tezos_baking_016_PtMumbai)) + -open Tezos_baking_016_PtMumbai + -open Octez_alcotezt) + (modules test_scenario)) + +(executable + (name main) + (libraries + src_proto_016_PtMumbai_lib_delegate_test_tezt_lib + tezt) + (link_flags + (:standard) + (:include %{workspace_root}/macos-link-flags.sexp)) + (modules main)) (rule - (alias runtest) + (alias runtezt) (package tezos-baking-016-PtMumbai) (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_delegate/test/main.ml b/src/proto_016_PtMumbai/lib_delegate/test/main.ml deleted file mode 100644 index f05f721ebebbd604a3ec79f4193f17674afa1e0d..0000000000000000000000000000000000000000 --- a/src/proto_016_PtMumbai/lib_delegate/test/main.ml +++ /dev/null @@ -1,10 +0,0 @@ -(** Testing - ------- - Component: Baking - Invocation: dune build @src/proto_alpha/lib_delegate/runtest - Subject: Entrypoint - *) - -let () = - Lwt_main.run - (Alcotest_lwt.run "protocol_alpha" [("scenario", Test_scenario.tests)]) diff --git a/src/proto_016_PtMumbai/lib_delegate/test/test_scenario.ml b/src/proto_016_PtMumbai/lib_delegate/test/test_scenario.ml index 693b84bdda01bac7797678be34f6072a4f5c2584..87850f2598664a947bc672c34e04fbad5390e9f1 100644 --- a/src/proto_016_PtMumbai/lib_delegate/test/test_scenario.ml +++ b/src/proto_016_PtMumbai/lib_delegate/test/test_scenario.ml @@ -1544,3 +1544,7 @@ let tests = tztest "scenario m7" `Quick test_scenario_m7; tztest "scenario m8" `Quick test_scenario_m8; ] + +let () = + Alcotest_lwt.run "lib_delegate" [(Protocol.name ^ ": scenario", tests)] + |> Lwt_main.run diff --git a/src/proto_alpha/lib_delegate/test/dune b/src/proto_alpha/lib_delegate/test/dune index 16fbb32f61a1334b478c52c64680f78bde5de48b..56bf77b830c96df1e528b4410e207c37d9ebc05f 100644 --- a/src/proto_alpha/lib_delegate/test/dune +++ b/src/proto_alpha/lib_delegate/test/dune @@ -1,9 +1,11 @@ ; This file was automatically generated, do not edit. ; Edit file manifest/main.ml instead. -(executable - (name main) +(library + (name src_proto_alpha_lib_delegate_test_tezt_lib) + (instrumentation (backend bisect_ppx)) (libraries + tezt.core tezos-base tezos-micheline tezos-client-alpha @@ -13,13 +15,13 @@ tezos-baking-alpha tezos-protocol-alpha.parameters tezos-crypto - alcotest-lwt + octez-alcotezt uri) - (link_flags - (:standard) - (:include %{workspace_root}/macos-link-flags.sexp)) + (library_flags (:standard -linkall)) (flags (:standard) + -open Tezt_core + -open Tezt_core.Base -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline @@ -27,9 +29,25 @@ -open Tezos_protocol_alpha -open Tezos_base_test_helpers -open Tezos_alpha_mockup_simulator - -open Tezos_baking_alpha)) + -open Tezos_baking_alpha + -open Octez_alcotezt) + (modules test_scenario)) + +(executable + (name main) + (libraries + src_proto_alpha_lib_delegate_test_tezt_lib + tezt) + (link_flags + (:standard) + (:include %{workspace_root}/macos-link-flags.sexp)) + (modules main)) (rule - (alias runtest) + (alias runtezt) (package tezos-baking-alpha) (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_delegate/test/main.ml b/src/proto_alpha/lib_delegate/test/main.ml deleted file mode 100644 index f05f721ebebbd604a3ec79f4193f17674afa1e0d..0000000000000000000000000000000000000000 --- a/src/proto_alpha/lib_delegate/test/main.ml +++ /dev/null @@ -1,10 +0,0 @@ -(** Testing - ------- - Component: Baking - Invocation: dune build @src/proto_alpha/lib_delegate/runtest - Subject: Entrypoint - *) - -let () = - Lwt_main.run - (Alcotest_lwt.run "protocol_alpha" [("scenario", Test_scenario.tests)]) diff --git a/src/proto_alpha/lib_delegate/test/test_scenario.ml b/src/proto_alpha/lib_delegate/test/test_scenario.ml index 693b84bdda01bac7797678be34f6072a4f5c2584..87850f2598664a947bc672c34e04fbad5390e9f1 100644 --- a/src/proto_alpha/lib_delegate/test/test_scenario.ml +++ b/src/proto_alpha/lib_delegate/test/test_scenario.ml @@ -1544,3 +1544,7 @@ let tests = tztest "scenario m7" `Quick test_scenario_m7; tztest "scenario m8" `Quick test_scenario_m8; ] + +let () = + Alcotest_lwt.run "lib_delegate" [(Protocol.name ^ ": scenario", tests)] + |> Lwt_main.run diff --git a/tezt/tests/dune b/tezt/tests/dune index b4443e67967d2c3ba7ae693dc191b57a539b2175..99ccc8f229825187e14daa615b96681b6c24be1e 100644 --- a/tezt/tests/dune +++ b/tezt/tests/dune @@ -15,12 +15,15 @@ tezos-protocol-alpha src_proto_alpha_lib_protocol_test_regression_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 src_proto_016_PtMumbai_lib_protocol_test_regression_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 src_proto_015_PtLimaPt_lib_protocol_test_regression_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 src_proto_014_PtKathma_lib_client_test_tezt_lib src_proto_013_PtJakart_lib_client_test_tezt_lib