From e9829d0c4893f48682b9588032e7e0817ccd1877 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Sun, 19 Mar 2023 20:59:43 +0100 Subject: [PATCH 01/12] Tezt/lib_tezos: Add [of_hash] to [Protocol] --- tezt/lib_tezos/protocol.ml | 11 +++++++++++ tezt/lib_tezos/protocol.mli | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/tezt/lib_tezos/protocol.ml b/tezt/lib_tezos/protocol.ml index 05c0c6618d1c..99067fbe4e9f 100644 --- a/tezt/lib_tezos/protocol.ml +++ b/tezt/lib_tezos/protocol.ml @@ -56,6 +56,17 @@ let hash = function | Mumbai -> "PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1" | Nairobi -> "PtNairobi9MxcBmKF7avFwkUohUu9KuxHt3w9cBmJ7ULqPD7cY5" +let of_hash_opt = function + | "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK" -> Some Alpha + | "PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW" -> Some Lima + | "PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1" -> Some Mumbai + | _ -> None + +let of_hash hash = + match of_hash_opt hash with + | Some protocol -> protocol + | None -> failwith (sf "[Protocol.of_hash] unknown protocol hash '%s'" hash) + let genesis_hash = "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" let demo_noops_hash = "ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp" diff --git a/tezt/lib_tezos/protocol.mli b/tezt/lib_tezos/protocol.mli index 655b1f7e7ba6..2a7e54ed97d8 100644 --- a/tezt/lib_tezos/protocol.mli +++ b/tezt/lib_tezos/protocol.mli @@ -37,6 +37,14 @@ val default_constants : constants (** Get the name of a protocol, capitalized (e.g. ["Edo"]). *) val name : t -> string +(** Get the protocol corresponding to a given full hash. + + Raises an error if the hash is not one of the protocols of {!all}. *) +val of_hash : string -> t + +(** As [of_hash], but return [None] instead of raising an error. *) +val of_hash_opt : string -> t option + (** Get the number of a protocol, e.g. 012 for Ithaca. The number for [Alpha] is the number it will have once snapshotted. -- GitLab From 4e6a7ab7c12d3a4ffa9f90545ee4569fc204a827 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Sun, 19 Mar 2023 21:02:52 +0100 Subject: [PATCH 02/12] Tezt/lib_alcotezt: add [?tags] to [Alcotest(_lwt).run] --- tezt/lib_alcotezt/alcotest.ml | 4 ++-- tezt/lib_alcotezt/alcotest.mli | 9 +++++++-- tezt/lib_alcotezt/alcotest_lwt.ml | 4 ++-- tezt/lib_alcotezt/alcotest_lwt.mli | 9 +++++++-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/tezt/lib_alcotezt/alcotest.ml b/tezt/lib_alcotezt/alcotest.ml index ec3a1cf6066b..f4101cae1737 100644 --- a/tezt/lib_alcotezt/alcotest.ml +++ b/tezt/lib_alcotezt/alcotest.ml @@ -37,13 +37,13 @@ exception Test_error type 'a test = string * 'a test_case list -let run ~__FILE__ library_name tests = +let run ~__FILE__ ?(tags = []) library_name tests = tests |> List.iter @@ fun (test_name, test_cases) -> Test.register ~__FILE__ ~title:(library_name ^ ": " ^ test_name) - ~tags:["alcotezt"] + ~tags:("alcotezt" :: tags) @@ fun () -> (test_cases |> List.iter @@ fun (test_case_name, speed_level, body) -> diff --git a/tezt/lib_alcotezt/alcotest.mli b/tezt/lib_alcotezt/alcotest.mli index 0e5cd54a37ef..e501e5388d83 100644 --- a/tezt/lib_alcotezt/alcotest.mli +++ b/tezt/lib_alcotezt/alcotest.mli @@ -68,8 +68,13 @@ type 'a test = string * 'a test_case list (** Run a test suite. In Tezt, this calls [Test.register] but does not actually run the test suite. - The name of the test suite is used as the filename for the Tezt test. *) -val run : __FILE__:string -> string -> unit test list -> return + + This function extends the original [Alcotest_lwt.run] with the + optional argument [?tags] that are passed to [Test.register], + along with a default ["alcotest"] tag. Likewise, the mandatory + [__FILE__] parameter is added and passed along to [Test.register]. *) +val run : + __FILE__:string -> ?tags:string list -> string -> unit test list -> return (** Values that can be tested with {!check}. *) type 'a testable = (module Tezt_core.Check.EQUALABLE with type t = 'a) diff --git a/tezt/lib_alcotezt/alcotest_lwt.ml b/tezt/lib_alcotezt/alcotest_lwt.ml index 0b91a01a2535..25e4a3b7ece1 100644 --- a/tezt/lib_alcotezt/alcotest_lwt.ml +++ b/tezt/lib_alcotezt/alcotest_lwt.ml @@ -47,13 +47,13 @@ let test_case_sync name speed_level body = type 'a test = string * 'a test_case list -let run ~__FILE__ library_name tests = +let run ~__FILE__ ?(tags = []) library_name tests = (tests |> List.iter @@ fun (test_name, test_cases) -> Test.register ~__FILE__ ~title:(library_name ^ ": " ^ test_name) - ~tags:["alcotezt"] + ~tags:("alcotezt" :: tags) @@ fun () -> test_cases |> Lwt_list.iter_s @@ fun (test_case_name, speed_level, body) -> diff --git a/tezt/lib_alcotezt/alcotest_lwt.mli b/tezt/lib_alcotezt/alcotest_lwt.mli index db4c16875ce9..40c2ffb8533b 100644 --- a/tezt/lib_alcotezt/alcotest_lwt.mli +++ b/tezt/lib_alcotezt/alcotest_lwt.mli @@ -63,5 +63,10 @@ type 'a test = string * 'a test_case list (** Run a test suite. In Tezt, this calls [Test.register] but does not actually run the test suite. - The name of the test suite is used as the filename for the Tezt test. *) -val run : __FILE__:string -> string -> unit test list -> return + + This function extends the original [Alcotest_lwt.run] with the + optional argument [?tags] that are passed to [Test.register], + along with a default ["alcotest"] tag. Likewise, the mandatory + [__FILE__] parameter is added and passed along to [Test.register]. *) +val run : + __FILE__:string -> ?tags:string list -> string -> unit test list -> return -- GitLab From f37dbed058fe746d5c295ce1f2a1068acc2b33f1 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 20 Mar 2023 08:59:12 +0100 Subject: [PATCH 03/12] Tezt: add [tezt/lib_protocol_alcotezt] --- .gitlab/ci/jobs/packaging/opam_package.yml | 11 +++- dune-project | 1 + manifest/main.ml | 19 +++++++ opam/octez-protocol-alcotezt.opam | 22 ++++++++ tezt/lib_protocol_alcotezt/dune | 15 ++++++ .../protocol_alcotest.ml | 34 ++++++++++++ .../protocol_alcotest.mli | 48 +++++++++++++++++ .../protocol_alcotest_lwt.ml | 34 ++++++++++++ .../protocol_alcotest_lwt.mli | 48 +++++++++++++++++ tezt/lib_protocol_alcotezt/tezt_protocol.ml | 41 ++++++++++++++ tezt/lib_protocol_alcotezt/tezt_protocol.mli | 53 +++++++++++++++++++ 11 files changed, 324 insertions(+), 2 deletions(-) create mode 100644 opam/octez-protocol-alcotezt.opam create mode 100644 tezt/lib_protocol_alcotezt/dune create mode 100644 tezt/lib_protocol_alcotezt/protocol_alcotest.ml create mode 100644 tezt/lib_protocol_alcotezt/protocol_alcotest.mli create mode 100644 tezt/lib_protocol_alcotezt/protocol_alcotest_lwt.ml create mode 100644 tezt/lib_protocol_alcotezt/protocol_alcotest_lwt.mli create mode 100644 tezt/lib_protocol_alcotezt/tezt_protocol.ml create mode 100644 tezt/lib_protocol_alcotezt/tezt_protocol.mli diff --git a/.gitlab/ci/jobs/packaging/opam_package.yml b/.gitlab/ci/jobs/packaging/opam_package.yml index 309167ed9557..ed86e45ca1da 100644 --- a/.gitlab/ci/jobs/packaging/opam_package.yml +++ b/.gitlab/ci/jobs/packaging/opam_package.yml @@ -369,6 +369,13 @@ opam:octez-polynomial: variables: package: octez-polynomial +opam:octez-protocol-alcotezt: + extends: + - .opam_template + - .rules_template__trigger_opam_batch_5 + variables: + package: octez-protocol-alcotezt + opam:octez-protocol-compiler: extends: - .opam_template @@ -1281,7 +1288,7 @@ opam:tezos-protocol-environment: opam:tezos-protocol-genesis: extends: - .opam_template - - .rules_template__trigger_opam_batch_5 + - .rules_template__trigger_opam_batch_6 variables: package: tezos-protocol-genesis @@ -1731,7 +1738,7 @@ opam:tezos-webassembly-interpreter-extra: opam:tezos-workers: extends: - .opam_template - - .rules_template__trigger_opam_batch_6 + - .rules_template__trigger_opam_batch_7 variables: package: tezos-workers diff --git a/dune-project b/dune-project index 73cae799a69a..f36c3e712c29 100644 --- a/dune-project +++ b/dune-project @@ -33,6 +33,7 @@ (package (name octez-plompiler)) (package (name octez-plonk)) (package (name octez-polynomial)) +(package (name octez-protocol-alcotezt)) (package (name octez-protocol-compiler)) (package (name octez-proxy-server)) (package (name octez-signer)) diff --git a/manifest/main.ml b/manifest/main.ml index d524fb54d027..fcb02f48498b 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -2877,6 +2877,25 @@ protocols.|} octez_event_logging; ] +let _protocol_alcotezt = + public_lib + "octez-protocol-alcotezt" + ~path:"tezt/lib_protocol_alcotezt" + (* TODO: is this necessary? + + TODO: https://gitlab.com/tezos/tezos/-/issues/4727 + + we mark "protocol-octez-alcotezt" as released but the real solution is to + modify the manifest to add build instructions for dune to be + used `with-test` *) + ~release_status:Released + ~synopsis: + "Provide the interface of Alcotest for Octez Protocol Tests, but with \ + Tezt as backend and automatically enforcing test naming and tagging \ + policies" + ~deps:[alcotezt; tezt_tezos; octez_protocol_environment |> open_] + |> open_ + let octez_shell_context = public_lib "tezos-shell-context" diff --git a/opam/octez-protocol-alcotezt.opam b/opam/octez-protocol-alcotezt.opam new file mode 100644 index 000000000000..f39047895a21 --- /dev/null +++ b/opam/octez-protocol-alcotezt.opam @@ -0,0 +1,22 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. +opam-version: "2.0" +maintainer: "contact@tezos.com" +authors: ["Tezos devteam"] +homepage: "https://www.tezos.com/" +bug-reports: "https://gitlab.com/tezos/tezos/issues" +dev-repo: "git+https://gitlab.com/tezos/tezos.git" +license: "MIT" +depends: [ + "dune" { >= "3.0" } + "ocaml" { >= "4.14" } + "octez-alcotezt" + "tezt-tezos" + "tezos-protocol-environment" +] +build: [ + ["rm" "-r" "vendors"] + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] +synopsis: "Provide the interface of Alcotest for Octez Protocol Tests, but with Tezt as backend and automatically enforcing test naming and tagging policies" diff --git a/tezt/lib_protocol_alcotezt/dune b/tezt/lib_protocol_alcotezt/dune new file mode 100644 index 000000000000..678a7b30c484 --- /dev/null +++ b/tezt/lib_protocol_alcotezt/dune @@ -0,0 +1,15 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + +(library + (name octez_protocol_alcotezt) + (public_name octez-protocol-alcotezt) + (instrumentation (backend bisect_ppx)) + (libraries + octez-alcotezt + tezt-tezos + tezos-protocol-environment) + (flags + (:standard) + -open Octez_alcotezt + -open Tezos_protocol_environment)) diff --git a/tezt/lib_protocol_alcotezt/protocol_alcotest.ml b/tezt/lib_protocol_alcotezt/protocol_alcotest.ml new file mode 100644 index 000000000000..d8ba3d01ef4b --- /dev/null +++ b/tezt/lib_protocol_alcotezt/protocol_alcotest.ml @@ -0,0 +1,34 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +include Alcotest + +let run protocol ~__FILE__ ?(tags = []) library_name tests = + let library_name = Tezt_protocol.name protocol ^ ": " ^ library_name in + Alcotest.run + ~__FILE__ + ~tags:(Tezt_protocol.tag protocol :: tags) + library_name + tests diff --git a/tezt/lib_protocol_alcotezt/protocol_alcotest.mli b/tezt/lib_protocol_alcotezt/protocol_alcotest.mli new file mode 100644 index 000000000000..f8dedbbf1603 --- /dev/null +++ b/tezt/lib_protocol_alcotezt/protocol_alcotest.mli @@ -0,0 +1,48 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +(** Protocol-specific Alcotezt wrapper. *) + +(** This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to automatically add the protocol name + to the title and tags of registered tests. *) +include module type of Alcotest + +(** Shadowed version of {!Octez_alcotezt.Alcotest.run}, with + protocol-prefixed titles and protocol-specific tags. + + This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to prefix Alcotest suite names with the + "pretty" version of the protocol name (e.g. [Alpha], [Mumbai], + ... ). It also adds a tag to each registered test identifying the + test. As in integration tests, this is the pretty name lowercased + (e.g. [alpha], [mumbai]). *) +val run : + Tezt_protocol.protocol -> + __FILE__:string -> + ?tags:string list -> + string -> + unit test list -> + return diff --git a/tezt/lib_protocol_alcotezt/protocol_alcotest_lwt.ml b/tezt/lib_protocol_alcotezt/protocol_alcotest_lwt.ml new file mode 100644 index 000000000000..a9ceb5eb2883 --- /dev/null +++ b/tezt/lib_protocol_alcotezt/protocol_alcotest_lwt.ml @@ -0,0 +1,34 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +include Alcotest_lwt + +let run protocol ~__FILE__ ?(tags = []) library_name tests = + let library_name = Tezt_protocol.name protocol ^ ": " ^ library_name in + Alcotest_lwt.run + ~__FILE__ + ~tags:(Tezt_protocol.tag protocol :: tags) + library_name + tests diff --git a/tezt/lib_protocol_alcotezt/protocol_alcotest_lwt.mli b/tezt/lib_protocol_alcotezt/protocol_alcotest_lwt.mli new file mode 100644 index 000000000000..e0ba23cd1f95 --- /dev/null +++ b/tezt/lib_protocol_alcotezt/protocol_alcotest_lwt.mli @@ -0,0 +1,48 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +(** Protocol-specific Alcotezt_lwt wrapper. *) + +(** This modules shadows the function [run] in + [Octez_alcotezt.Alcotest_lwt] to automatically add the protocol name + to the title and tags of registered tests. *) +include module type of Alcotest_lwt + +(** Shadowed version of {!Octez_alcotezt.Alcotest_lwt.run}, with + protocol-prefixed titles and protocol-specific tags. + + This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to prefix Alcotest suite names with the + "pretty" version of the protocol name (e.g. [Alpha], [Mumbai], + ... ). It also adds a tag to each registered test identifying the + test. As in integration tests, this is the pretty name lowercased + (e.g. [alpha], [mumbai]). *) +val run : + Tezt_protocol.protocol -> + __FILE__:string -> + ?tags:string list -> + string -> + unit test list -> + return diff --git a/tezt/lib_protocol_alcotezt/tezt_protocol.ml b/tezt/lib_protocol_alcotezt/tezt_protocol.ml new file mode 100644 index 000000000000..bdf5ef422723 --- /dev/null +++ b/tezt/lib_protocol_alcotezt/tezt_protocol.ml @@ -0,0 +1,41 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +module type PROTOCOL = sig + val hash : Tezos_crypto.Hashed.Protocol_hash.t + + val name : string +end + +type protocol = (module PROTOCOL) + +let tezt_protocol (p : protocol) = + let module Protocol = (val p : PROTOCOL) in + Protocol.hash |> Tezos_crypto.Hashed.Protocol_hash.to_b58check + |> Tezt_tezos.Protocol.of_hash + +let tag (p : protocol) = tezt_protocol p |> Tezt_tezos.Protocol.tag + +let name (p : protocol) = tezt_protocol p |> Tezt_tezos.Protocol.name diff --git a/tezt/lib_protocol_alcotezt/tezt_protocol.mli b/tezt/lib_protocol_alcotezt/tezt_protocol.mli new file mode 100644 index 000000000000..f03d1b48edae --- /dev/null +++ b/tezt/lib_protocol_alcotezt/tezt_protocol.mli @@ -0,0 +1,53 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +(** This module provides a bridge between the a Tezos protocols own + notion of a protocol (a [Protocol] module) and Tezts + [Protocol.t]. It is used to simplify registration of Alcotezts in + protocols while enforcing a test naming and tagging policies. *) + +(** Minimal signature of a Protocol. *) +module type PROTOCOL = sig + val hash : Tezos_crypto.Hashed.Protocol_hash.t + + val name : string +end + +(** [protocol] packs modules of signature [PROTOCOL]. *) +type protocol = (module PROTOCOL) + +(** Return the "pretty name" of a [protocol]. + + The pretty name is the same as defined by + {!Tezt_tezos.Protocol.name}, that is, the capitalized, + non-numbered name of a protocol, e.g. [Alpha], [Mumbai], ... *) +val name : protocol -> string + +(** The protocol-specific Tezt tag of this prototcol + + The protocol tag is the same as defined by + {!Tezt_tezos.Protocol.tag}, that is, the lower-cased "pretty" name + of the protocol (e.g. [alpha], [mumbai], ...). *) +val tag : protocol -> string -- GitLab From b23d246e600c6f8789e984e58369d07293527cdd Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 20 Mar 2023 11:47:41 +0100 Subject: [PATCH 04/12] Enforce name and tagging policy on src/proto_*/lib_client tests --- manifest/main.ml | 4 +-- opam/tezos-client-015-PtLimaPt.opam | 2 +- opam/tezos-client-016-PtMumbai.opam | 2 +- opam/tezos-client-017-PtNairob.opam | 2 +- opam/tezos-client-alpha.opam | 2 +- src/proto_015_PtLimaPt/lib_client/test/dune | 4 +-- .../test/test_client_proto_context.ml | 4 ++- .../test/test_client_proto_contracts.ml | 4 ++- .../test/test_michelson_v1_macros.ml | 4 ++- .../lib_client/test/test_proxy.ml | 4 ++- src/proto_016_PtMumbai/lib_client/test/dune | 4 +-- .../test/test_client_proto_context.ml | 4 ++- .../test/test_client_proto_contracts.ml | 4 ++- .../test/test_michelson_v1_macros.ml | 4 ++- .../lib_client/test/test_proxy.ml | 4 ++- src/proto_017_PtNairob/lib_client/test/dune | 4 +-- .../test/test_client_proto_context.ml | 4 ++- .../test/test_client_proto_contracts.ml | 4 ++- .../test/test_michelson_v1_macros.ml | 4 ++- .../lib_client/test/test_proxy.ml | 4 ++- .../test/pbt/test_sc_rollup_inbox.ml | 4 ++- src/proto_alpha/lib_client/test/dune | 4 +-- .../test/test_client_proto_context.ml | 4 ++- .../test/test_client_proto_contracts.ml | 4 ++- .../test/test_michelson_v1_macros.ml | 4 ++- src/proto_alpha/lib_client/test/test_proxy.ml | 4 ++- tezt/lib_protocol_alcotezt/tezt_protocol.ml | 26 +++++++++++++++---- 27 files changed, 86 insertions(+), 36 deletions(-) diff --git a/manifest/main.ml b/manifest/main.ml index fcb02f48498b..bf0d98083b18 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -2877,7 +2877,7 @@ protocols.|} octez_event_logging; ] -let _protocol_alcotezt = +let protocol_alcotezt = public_lib "octez-protocol-alcotezt" ~path:"tezt/lib_protocol_alcotezt" @@ -5591,7 +5591,7 @@ module Protocol = Protocol main |> open_; octez_base_test_helpers |> open_; octez_test_helpers |> open_; - alcotezt; + protocol_alcotezt; qcheck_alcotest; ] in diff --git a/opam/tezos-client-015-PtLimaPt.opam b/opam/tezos-client-015-PtLimaPt.opam index 0b111f186e2d..ae53b15c3aaa 100644 --- a/opam/tezos-client-015-PtLimaPt.opam +++ b/opam/tezos-client-015-PtLimaPt.opam @@ -33,7 +33,7 @@ depends: [ "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-test-helpers" {with-test} - "octez-alcotezt" {with-test} + "octez-protocol-alcotezt" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } ] build: [ diff --git a/opam/tezos-client-016-PtMumbai.opam b/opam/tezos-client-016-PtMumbai.opam index a38b3d232e82..3355644306f8 100644 --- a/opam/tezos-client-016-PtMumbai.opam +++ b/opam/tezos-client-016-PtMumbai.opam @@ -34,7 +34,7 @@ depends: [ "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-test-helpers" {with-test} - "octez-alcotezt" {with-test} + "octez-protocol-alcotezt" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } ] build: [ diff --git a/opam/tezos-client-017-PtNairob.opam b/opam/tezos-client-017-PtNairob.opam index fc204ad66686..66b9d40780cb 100644 --- a/opam/tezos-client-017-PtNairob.opam +++ b/opam/tezos-client-017-PtNairob.opam @@ -34,7 +34,7 @@ depends: [ "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-test-helpers" {with-test} - "octez-alcotezt" {with-test} + "octez-protocol-alcotezt" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } ] build: [ diff --git a/opam/tezos-client-alpha.opam b/opam/tezos-client-alpha.opam index 7a773bbe0bf7..3b562d482d00 100644 --- a/opam/tezos-client-alpha.opam +++ b/opam/tezos-client-alpha.opam @@ -34,7 +34,7 @@ depends: [ "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-test-helpers" {with-test} - "octez-alcotezt" {with-test} + "octez-protocol-alcotezt" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } ] build: [ diff --git a/src/proto_015_PtLimaPt/lib_client/test/dune b/src/proto_015_PtLimaPt/lib_client/test/dune index f7692ec3c150..7b0c1b741918 100644 --- a/src/proto_015_PtLimaPt/lib_client/test/dune +++ b/src/proto_015_PtLimaPt/lib_client/test/dune @@ -12,7 +12,7 @@ tezos-protocol-015-PtLimaPt tezos-base-test-helpers tezos-test-helpers - octez-alcotezt + octez-protocol-alcotezt qcheck-alcotest) (library_flags (:standard -linkall)) (flags @@ -26,7 +26,7 @@ -open Tezos_protocol_015_PtLimaPt -open Tezos_base_test_helpers -open Tezos_test_helpers - -open Octez_alcotezt) + -open Octez_protocol_alcotezt) (modules test_michelson_v1_macros test_client_proto_contracts diff --git a/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_context.ml b/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_context.ml index 0c6b2eab531a..ae5b4bb5f651 100644 --- a/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_context.ml +++ b/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_context.ml @@ -66,7 +66,9 @@ let tests = ] let () = - Alcotest.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest.run + protocol ~__FILE__ "Client proto context" [(Protocol.name ^ ": Encodings", qcheck_wrap tests)] diff --git a/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_contracts.ml b/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_contracts.ml index b02710728a08..0308b030ff32 100644 --- a/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_contracts.ml +++ b/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_contracts.ml @@ -88,7 +88,9 @@ let test_find_destination _ = test "Expected test_alias bootstrap1" "test_alias" bootstrap1 let () = - Alcotest_lwt.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest_lwt.run + protocol ~__FILE__ "tezos-lib-client-proto-contracts" [ diff --git a/src/proto_015_PtLimaPt/lib_client/test/test_michelson_v1_macros.ml b/src/proto_015_PtLimaPt/lib_client/test/test_michelson_v1_macros.ml index 17a0817f5914..730e357269a3 100644 --- a/src/proto_015_PtLimaPt/lib_client/test/test_michelson_v1_macros.ml +++ b/src/proto_015_PtLimaPt/lib_client/test/test_michelson_v1_macros.ml @@ -1340,7 +1340,9 @@ let wrap (n, f) = Format.kasprintf Stdlib.failwith "%a" pp_print_trace error) let () = - Alcotest_lwt.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest_lwt.run + protocol ~__FILE__ "tezos-lib-client" [(Protocol.name ^ ": micheline v1 macros", List.map wrap tests)] diff --git a/src/proto_015_PtLimaPt/lib_client/test/test_proxy.ml b/src/proto_015_PtLimaPt/lib_client/test/test_proxy.ml index f6249ec45578..9fbc22ff891f 100644 --- a/src/proto_015_PtLimaPt/lib_client/test/test_proxy.ml +++ b/src/proto_015_PtLimaPt/lib_client/test/test_proxy.ml @@ -83,7 +83,9 @@ let test_split_key = key let () = - Alcotest.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest.run + protocol ~__FILE__ "tezos-lib-client-proxy" [(Protocol.name ^ ": proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] diff --git a/src/proto_016_PtMumbai/lib_client/test/dune b/src/proto_016_PtMumbai/lib_client/test/dune index ea3c3dd4ad93..013c7f0ad242 100644 --- a/src/proto_016_PtMumbai/lib_client/test/dune +++ b/src/proto_016_PtMumbai/lib_client/test/dune @@ -12,7 +12,7 @@ tezos-protocol-016-PtMumbai tezos-base-test-helpers tezos-test-helpers - octez-alcotezt + octez-protocol-alcotezt qcheck-alcotest) (library_flags (:standard -linkall)) (flags @@ -26,7 +26,7 @@ -open Tezos_protocol_016_PtMumbai -open Tezos_base_test_helpers -open Tezos_test_helpers - -open Octez_alcotezt) + -open Octez_protocol_alcotezt) (modules test_michelson_v1_macros test_client_proto_contracts diff --git a/src/proto_016_PtMumbai/lib_client/test/test_client_proto_context.ml b/src/proto_016_PtMumbai/lib_client/test/test_client_proto_context.ml index e178bc95b909..27a35921c4f6 100644 --- a/src/proto_016_PtMumbai/lib_client/test/test_client_proto_context.ml +++ b/src/proto_016_PtMumbai/lib_client/test/test_client_proto_context.ml @@ -66,7 +66,9 @@ let tests = ] let () = - Alcotest.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest.run + protocol ~__FILE__ "Client proto context" [(Protocol.name ^ ": Encodings", qcheck_wrap tests)] diff --git a/src/proto_016_PtMumbai/lib_client/test/test_client_proto_contracts.ml b/src/proto_016_PtMumbai/lib_client/test/test_client_proto_contracts.ml index fecc84a12cf4..750def726c36 100644 --- a/src/proto_016_PtMumbai/lib_client/test/test_client_proto_contracts.ml +++ b/src/proto_016_PtMumbai/lib_client/test/test_client_proto_contracts.ml @@ -88,7 +88,9 @@ let test_find_destination _ = test "Expected test_alias bootstrap1" "test_alias" bootstrap1 let () = - Alcotest_lwt.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest_lwt.run + protocol ~__FILE__ "tezos-lib-client-proto-contracts" [ diff --git a/src/proto_016_PtMumbai/lib_client/test/test_michelson_v1_macros.ml b/src/proto_016_PtMumbai/lib_client/test/test_michelson_v1_macros.ml index 23bdd0b7b0cf..2da6a9ef3016 100644 --- a/src/proto_016_PtMumbai/lib_client/test/test_michelson_v1_macros.ml +++ b/src/proto_016_PtMumbai/lib_client/test/test_michelson_v1_macros.ml @@ -1340,7 +1340,9 @@ let wrap (n, f) = Format.kasprintf Stdlib.failwith "%a" pp_print_trace error) let () = - Alcotest_lwt.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest_lwt.run + protocol ~__FILE__ "tezos-lib-client" [(Protocol.name ^ ": micheline v1 macros", List.map wrap tests)] diff --git a/src/proto_016_PtMumbai/lib_client/test/test_proxy.ml b/src/proto_016_PtMumbai/lib_client/test/test_proxy.ml index 6d46086941fd..89eb5af81464 100644 --- a/src/proto_016_PtMumbai/lib_client/test/test_proxy.ml +++ b/src/proto_016_PtMumbai/lib_client/test/test_proxy.ml @@ -83,7 +83,9 @@ let test_split_key = key let () = - Alcotest.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest.run + protocol ~__FILE__ "tezos-lib-client-proxy" [(Protocol.name ^ ": proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] diff --git a/src/proto_017_PtNairob/lib_client/test/dune b/src/proto_017_PtNairob/lib_client/test/dune index 8fe17a865dfb..4e6f17225597 100644 --- a/src/proto_017_PtNairob/lib_client/test/dune +++ b/src/proto_017_PtNairob/lib_client/test/dune @@ -12,7 +12,7 @@ tezos-protocol-017-PtNairob tezos-base-test-helpers tezos-test-helpers - octez-alcotezt + octez-protocol-alcotezt qcheck-alcotest) (library_flags (:standard -linkall)) (flags @@ -26,7 +26,7 @@ -open Tezos_protocol_017_PtNairob -open Tezos_base_test_helpers -open Tezos_test_helpers - -open Octez_alcotezt) + -open Octez_protocol_alcotezt) (modules test_michelson_v1_macros test_client_proto_contracts diff --git a/src/proto_017_PtNairob/lib_client/test/test_client_proto_context.ml b/src/proto_017_PtNairob/lib_client/test/test_client_proto_context.ml index 1437fec988b9..165a242a2f7d 100644 --- a/src/proto_017_PtNairob/lib_client/test/test_client_proto_context.ml +++ b/src/proto_017_PtNairob/lib_client/test/test_client_proto_context.ml @@ -66,7 +66,9 @@ let tests = ] let () = - Alcotest.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest.run + protocol ~__FILE__ "Client proto context" [(Protocol.name ^ ": Encodings", qcheck_wrap tests)] diff --git a/src/proto_017_PtNairob/lib_client/test/test_client_proto_contracts.ml b/src/proto_017_PtNairob/lib_client/test/test_client_proto_contracts.ml index 74c35ce7ce19..bba0011dfcd1 100644 --- a/src/proto_017_PtNairob/lib_client/test/test_client_proto_contracts.ml +++ b/src/proto_017_PtNairob/lib_client/test/test_client_proto_contracts.ml @@ -88,7 +88,9 @@ let test_find_destination _ = test "Expected test_alias bootstrap1" "test_alias" bootstrap1 let () = - Alcotest_lwt.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest_lwt.run + protocol ~__FILE__ "tezos-lib-client-proto-contracts" [ diff --git a/src/proto_017_PtNairob/lib_client/test/test_michelson_v1_macros.ml b/src/proto_017_PtNairob/lib_client/test/test_michelson_v1_macros.ml index b6874812d00a..492442e1ccc8 100644 --- a/src/proto_017_PtNairob/lib_client/test/test_michelson_v1_macros.ml +++ b/src/proto_017_PtNairob/lib_client/test/test_michelson_v1_macros.ml @@ -1340,7 +1340,9 @@ let wrap (n, f) = Format.kasprintf Stdlib.failwith "%a" pp_print_trace error) let () = - Alcotest_lwt.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest_lwt.run + protocol ~__FILE__ "tezos-lib-client" [(Protocol.name ^ ": micheline v1 macros", List.map wrap tests)] diff --git a/src/proto_017_PtNairob/lib_client/test/test_proxy.ml b/src/proto_017_PtNairob/lib_client/test/test_proxy.ml index defa5b47870e..93e1b0a02f99 100644 --- a/src/proto_017_PtNairob/lib_client/test/test_proxy.ml +++ b/src/proto_017_PtNairob/lib_client/test/test_proxy.ml @@ -83,7 +83,9 @@ let test_split_key = key let () = - Alcotest.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest.run + protocol ~__FILE__ "tezos-lib-client-proxy" [(Protocol.name ^ ": proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] 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 3bcfae8f37e3..9bad7b1862ec 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 @@ -75,7 +75,9 @@ let test_add_info_per_level = let tests = [test_add_info_per_level] let () = - Alcotest.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest.run + protocol ~__FILE__ "Smart rollup inbox" [(Protocol.name ^ ": safety", qcheck_wrap tests)] diff --git a/src/proto_alpha/lib_client/test/dune b/src/proto_alpha/lib_client/test/dune index 6a37a175607d..e726ec8e3364 100644 --- a/src/proto_alpha/lib_client/test/dune +++ b/src/proto_alpha/lib_client/test/dune @@ -12,7 +12,7 @@ tezos-protocol-alpha tezos-base-test-helpers tezos-test-helpers - octez-alcotezt + octez-protocol-alcotezt qcheck-alcotest) (library_flags (:standard -linkall)) (flags @@ -26,7 +26,7 @@ -open Tezos_protocol_alpha -open Tezos_base_test_helpers -open Tezos_test_helpers - -open Octez_alcotezt) + -open Octez_protocol_alcotezt) (modules test_michelson_v1_macros test_client_proto_contracts diff --git a/src/proto_alpha/lib_client/test/test_client_proto_context.ml b/src/proto_alpha/lib_client/test/test_client_proto_context.ml index 7351c7013307..16887fd79a23 100644 --- a/src/proto_alpha/lib_client/test/test_client_proto_context.ml +++ b/src/proto_alpha/lib_client/test/test_client_proto_context.ml @@ -66,7 +66,9 @@ let tests = ] let () = - Alcotest.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest.run + protocol ~__FILE__ "Client proto context" [(Protocol.name ^ ": Encodings", qcheck_wrap tests)] diff --git a/src/proto_alpha/lib_client/test/test_client_proto_contracts.ml b/src/proto_alpha/lib_client/test/test_client_proto_contracts.ml index 3112cbbe9984..706fe0f485a9 100644 --- a/src/proto_alpha/lib_client/test/test_client_proto_contracts.ml +++ b/src/proto_alpha/lib_client/test/test_client_proto_contracts.ml @@ -88,7 +88,9 @@ let test_find_destination _ = test "Expected test_alias bootstrap1" "test_alias" bootstrap1 let () = - Alcotest_lwt.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest_lwt.run + protocol ~__FILE__ "tezos-lib-client-proto-contracts" [ diff --git a/src/proto_alpha/lib_client/test/test_michelson_v1_macros.ml b/src/proto_alpha/lib_client/test/test_michelson_v1_macros.ml index 8f210533c699..b452f5f45b3a 100644 --- a/src/proto_alpha/lib_client/test/test_michelson_v1_macros.ml +++ b/src/proto_alpha/lib_client/test/test_michelson_v1_macros.ml @@ -1340,7 +1340,9 @@ let wrap (n, f) = Format.kasprintf Stdlib.failwith "%a" pp_print_trace error) let () = - Alcotest_lwt.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest_lwt.run + protocol ~__FILE__ "tezos-lib-client" [(Protocol.name ^ ": micheline v1 macros", List.map wrap tests)] diff --git a/src/proto_alpha/lib_client/test/test_proxy.ml b/src/proto_alpha/lib_client/test/test_proxy.ml index 92fb592b0713..990bea686ab2 100644 --- a/src/proto_alpha/lib_client/test/test_proxy.ml +++ b/src/proto_alpha/lib_client/test/test_proxy.ml @@ -83,7 +83,9 @@ let test_split_key = key let () = - Alcotest.run + let protocol = (module Protocol : Tezt_protocol.PROTOCOL) in + Protocol_alcotest.run + protocol ~__FILE__ "tezos-lib-client-proxy" [(Protocol.name ^ ": proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] diff --git a/tezt/lib_protocol_alcotezt/tezt_protocol.ml b/tezt/lib_protocol_alcotezt/tezt_protocol.ml index bdf5ef422723..7f8583d981b9 100644 --- a/tezt/lib_protocol_alcotezt/tezt_protocol.ml +++ b/tezt/lib_protocol_alcotezt/tezt_protocol.ml @@ -31,11 +31,27 @@ end type protocol = (module PROTOCOL) +let name_internal (p : protocol) = + let module Protocol = (val p) in + Protocol.name + +let hash (p : protocol) = + let module Protocol = (val p) in + Protocol.hash + let tezt_protocol (p : protocol) = - let module Protocol = (val p : PROTOCOL) in - Protocol.hash |> Tezos_crypto.Hashed.Protocol_hash.to_b58check - |> Tezt_tezos.Protocol.of_hash + p |> hash |> Tezos_crypto.Hashed.Protocol_hash.to_b58check + |> Tezt_tezos.Protocol.of_hash_opt -let tag (p : protocol) = tezt_protocol p |> Tezt_tezos.Protocol.tag +let tag (p : protocol) = + match tezt_protocol p with + | Some tezt_protocol -> Tezt_tezos.Protocol.tag tezt_protocol + | None -> + name_internal p |> String.lowercase_ascii + |> String.map (fun c -> + match c with 'a' .. 'z' | '0' .. '9' -> c | _ -> '_') -let name (p : protocol) = tezt_protocol p |> Tezt_tezos.Protocol.name +let name (p : protocol) = + match tezt_protocol p with + | Some tezt_protocol -> Tezt_tezos.Protocol.name tezt_protocol + | None -> name_internal p -- GitLab From 1d98172901a1cd70bf872fa2f8940cb9b48b4ca9 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 20 Mar 2023 12:10:29 +0100 Subject: [PATCH 05/12] src/proto_*/lib_client/test: Remove double name --- .../lib_client/test/test_client_proto_context.ml | 2 +- .../lib_client/test/test_client_proto_contracts.ml | 2 +- .../lib_client/test/test_michelson_v1_macros.ml | 2 +- src/proto_015_PtLimaPt/lib_client/test/test_proxy.ml | 2 +- .../lib_client/test/test_client_proto_context.ml | 2 +- .../lib_client/test/test_client_proto_contracts.ml | 2 +- .../lib_client/test/test_michelson_v1_macros.ml | 2 +- src/proto_016_PtMumbai/lib_client/test/test_proxy.ml | 2 +- .../lib_client/test/test_client_proto_context.ml | 2 +- .../lib_client/test/test_client_proto_contracts.ml | 2 +- .../lib_client/test/test_michelson_v1_macros.ml | 2 +- src/proto_017_PtNairob/lib_client/test/test_proxy.ml | 2 +- src/proto_alpha/lib_client/test/test_client_proto_context.ml | 2 +- src/proto_alpha/lib_client/test/test_client_proto_contracts.ml | 2 +- src/proto_alpha/lib_client/test/test_michelson_v1_macros.ml | 2 +- src/proto_alpha/lib_client/test/test_proxy.ml | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_context.ml b/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_context.ml index ae5b4bb5f651..f8b187fb4a82 100644 --- a/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_context.ml +++ b/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_context.ml @@ -71,4 +71,4 @@ let () = protocol ~__FILE__ "Client proto context" - [(Protocol.name ^ ": Encodings", qcheck_wrap tests)] + [("Encodings", qcheck_wrap tests)] diff --git a/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_contracts.ml b/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_contracts.ml index 0308b030ff32..7380b3d1bfd8 100644 --- a/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_contracts.ml +++ b/src/proto_015_PtLimaPt/lib_client/test/test_client_proto_contracts.ml @@ -94,7 +94,7 @@ let () = ~__FILE__ "tezos-lib-client-proto-contracts" [ - ( Protocol.name ^ ": client_proto_contracts", + ( "client_proto_contracts", [Tztest.tztest "test_find_destination" `Quick test_find_destination] ); ] |> Lwt_main.run diff --git a/src/proto_015_PtLimaPt/lib_client/test/test_michelson_v1_macros.ml b/src/proto_015_PtLimaPt/lib_client/test/test_michelson_v1_macros.ml index 730e357269a3..fd80d5449890 100644 --- a/src/proto_015_PtLimaPt/lib_client/test/test_michelson_v1_macros.ml +++ b/src/proto_015_PtLimaPt/lib_client/test/test_michelson_v1_macros.ml @@ -1345,5 +1345,5 @@ let () = protocol ~__FILE__ "tezos-lib-client" - [(Protocol.name ^ ": micheline v1 macros", List.map wrap tests)] + [("micheline v1 macros", List.map wrap tests)] |> Lwt_main.run diff --git a/src/proto_015_PtLimaPt/lib_client/test/test_proxy.ml b/src/proto_015_PtLimaPt/lib_client/test/test_proxy.ml index 9fbc22ff891f..a7894fa8e7d8 100644 --- a/src/proto_015_PtLimaPt/lib_client/test/test_proxy.ml +++ b/src/proto_015_PtLimaPt/lib_client/test/test_proxy.ml @@ -88,4 +88,4 @@ let () = protocol ~__FILE__ "tezos-lib-client-proxy" - [(Protocol.name ^ ": proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] + [("proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] diff --git a/src/proto_016_PtMumbai/lib_client/test/test_client_proto_context.ml b/src/proto_016_PtMumbai/lib_client/test/test_client_proto_context.ml index 27a35921c4f6..3e64075d648a 100644 --- a/src/proto_016_PtMumbai/lib_client/test/test_client_proto_context.ml +++ b/src/proto_016_PtMumbai/lib_client/test/test_client_proto_context.ml @@ -71,4 +71,4 @@ let () = protocol ~__FILE__ "Client proto context" - [(Protocol.name ^ ": Encodings", qcheck_wrap tests)] + [("Encodings", qcheck_wrap tests)] diff --git a/src/proto_016_PtMumbai/lib_client/test/test_client_proto_contracts.ml b/src/proto_016_PtMumbai/lib_client/test/test_client_proto_contracts.ml index 750def726c36..a17b0f168611 100644 --- a/src/proto_016_PtMumbai/lib_client/test/test_client_proto_contracts.ml +++ b/src/proto_016_PtMumbai/lib_client/test/test_client_proto_contracts.ml @@ -94,7 +94,7 @@ let () = ~__FILE__ "tezos-lib-client-proto-contracts" [ - ( Protocol.name ^ ": client_proto_contracts", + ( "client_proto_contracts", [Tztest.tztest "test_find_destination" `Quick test_find_destination] ); ] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_client/test/test_michelson_v1_macros.ml b/src/proto_016_PtMumbai/lib_client/test/test_michelson_v1_macros.ml index 2da6a9ef3016..c1e493443b47 100644 --- a/src/proto_016_PtMumbai/lib_client/test/test_michelson_v1_macros.ml +++ b/src/proto_016_PtMumbai/lib_client/test/test_michelson_v1_macros.ml @@ -1345,5 +1345,5 @@ let () = protocol ~__FILE__ "tezos-lib-client" - [(Protocol.name ^ ": micheline v1 macros", List.map wrap tests)] + [("micheline v1 macros", List.map wrap tests)] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_client/test/test_proxy.ml b/src/proto_016_PtMumbai/lib_client/test/test_proxy.ml index 89eb5af81464..f6e0b18686f3 100644 --- a/src/proto_016_PtMumbai/lib_client/test/test_proxy.ml +++ b/src/proto_016_PtMumbai/lib_client/test/test_proxy.ml @@ -88,4 +88,4 @@ let () = protocol ~__FILE__ "tezos-lib-client-proxy" - [(Protocol.name ^ ": proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] + [("proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] diff --git a/src/proto_017_PtNairob/lib_client/test/test_client_proto_context.ml b/src/proto_017_PtNairob/lib_client/test/test_client_proto_context.ml index 165a242a2f7d..5f8547f55de5 100644 --- a/src/proto_017_PtNairob/lib_client/test/test_client_proto_context.ml +++ b/src/proto_017_PtNairob/lib_client/test/test_client_proto_context.ml @@ -71,4 +71,4 @@ let () = protocol ~__FILE__ "Client proto context" - [(Protocol.name ^ ": Encodings", qcheck_wrap tests)] + [("Encodings", qcheck_wrap tests)] diff --git a/src/proto_017_PtNairob/lib_client/test/test_client_proto_contracts.ml b/src/proto_017_PtNairob/lib_client/test/test_client_proto_contracts.ml index bba0011dfcd1..b3cf3ff04611 100644 --- a/src/proto_017_PtNairob/lib_client/test/test_client_proto_contracts.ml +++ b/src/proto_017_PtNairob/lib_client/test/test_client_proto_contracts.ml @@ -94,7 +94,7 @@ let () = ~__FILE__ "tezos-lib-client-proto-contracts" [ - ( Protocol.name ^ ": client_proto_contracts", + ( "client_proto_contracts", [Tztest.tztest "test_find_destination" `Quick test_find_destination] ); ] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_client/test/test_michelson_v1_macros.ml b/src/proto_017_PtNairob/lib_client/test/test_michelson_v1_macros.ml index 492442e1ccc8..aa4152f72811 100644 --- a/src/proto_017_PtNairob/lib_client/test/test_michelson_v1_macros.ml +++ b/src/proto_017_PtNairob/lib_client/test/test_michelson_v1_macros.ml @@ -1345,5 +1345,5 @@ let () = protocol ~__FILE__ "tezos-lib-client" - [(Protocol.name ^ ": micheline v1 macros", List.map wrap tests)] + [("micheline v1 macros", List.map wrap tests)] |> Lwt_main.run diff --git a/src/proto_017_PtNairob/lib_client/test/test_proxy.ml b/src/proto_017_PtNairob/lib_client/test/test_proxy.ml index 93e1b0a02f99..ee87951359c6 100644 --- a/src/proto_017_PtNairob/lib_client/test/test_proxy.ml +++ b/src/proto_017_PtNairob/lib_client/test/test_proxy.ml @@ -88,4 +88,4 @@ let () = protocol ~__FILE__ "tezos-lib-client-proxy" - [(Protocol.name ^ ": proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] + [("proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] diff --git a/src/proto_alpha/lib_client/test/test_client_proto_context.ml b/src/proto_alpha/lib_client/test/test_client_proto_context.ml index 16887fd79a23..7e95d44feacf 100644 --- a/src/proto_alpha/lib_client/test/test_client_proto_context.ml +++ b/src/proto_alpha/lib_client/test/test_client_proto_context.ml @@ -71,4 +71,4 @@ let () = protocol ~__FILE__ "Client proto context" - [(Protocol.name ^ ": Encodings", qcheck_wrap tests)] + [("Encodings", qcheck_wrap tests)] diff --git a/src/proto_alpha/lib_client/test/test_client_proto_contracts.ml b/src/proto_alpha/lib_client/test/test_client_proto_contracts.ml index 706fe0f485a9..e81abe7e818c 100644 --- a/src/proto_alpha/lib_client/test/test_client_proto_contracts.ml +++ b/src/proto_alpha/lib_client/test/test_client_proto_contracts.ml @@ -94,7 +94,7 @@ let () = ~__FILE__ "tezos-lib-client-proto-contracts" [ - ( Protocol.name ^ ": client_proto_contracts", + ( "client_proto_contracts", [Tztest.tztest "test_find_destination" `Quick test_find_destination] ); ] |> Lwt_main.run diff --git a/src/proto_alpha/lib_client/test/test_michelson_v1_macros.ml b/src/proto_alpha/lib_client/test/test_michelson_v1_macros.ml index b452f5f45b3a..abd06778350d 100644 --- a/src/proto_alpha/lib_client/test/test_michelson_v1_macros.ml +++ b/src/proto_alpha/lib_client/test/test_michelson_v1_macros.ml @@ -1345,5 +1345,5 @@ let () = protocol ~__FILE__ "tezos-lib-client" - [(Protocol.name ^ ": micheline v1 macros", List.map wrap tests)] + [("micheline v1 macros", List.map wrap tests)] |> Lwt_main.run diff --git a/src/proto_alpha/lib_client/test/test_proxy.ml b/src/proto_alpha/lib_client/test/test_proxy.ml index 990bea686ab2..c55ad1f6e0fc 100644 --- a/src/proto_alpha/lib_client/test/test_proxy.ml +++ b/src/proto_alpha/lib_client/test/test_proxy.ml @@ -88,4 +88,4 @@ let () = protocol ~__FILE__ "tezos-lib-client-proxy" - [(Protocol.name ^ ": proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] + [("proxy", Qcheck2_helpers.qcheck_wrap [test_split_key])] -- GitLab From 7d26a31d54e0da89f07cfc3dace897f7b00de6b7 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 20 Mar 2023 12:16:44 +0100 Subject: [PATCH 06/12] src/proto_/lib_protocol/test/regression: enforce naming/tagging policy --- manifest/main.ml | 1 + opam/tezos-protocol-015-PtLimaPt-tests.opam | 1 + opam/tezos-protocol-016-PtMumbai-tests.opam | 1 + opam/tezos-protocol-alpha-tests.opam | 1 + .../lib_protocol/test/regression/dune | 6 ++++-- .../test/regression/test_logging.ml | 17 +++++++---------- .../lib_protocol/test/regression/dune | 6 ++++-- .../test/regression/test_logging.ml | 17 +++++++---------- .../lib_protocol/test/regression/dune | 6 ++++-- .../test/regression/test_logging.ml | 17 +++++++---------- 10 files changed, 37 insertions(+), 36 deletions(-) diff --git a/manifest/main.ml b/manifest/main.ml index bf0d98083b18..1b961d1e8335 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -4980,6 +4980,7 @@ end = struct plugin |> if_some |> open_; test_helpers |> if_some |> open_; octez_micheline |> open_; + protocol_alcotezt; ] ~dep_globs:["contracts/*.tz"; "expected/test_logging.ml/*.out"] in diff --git a/opam/tezos-protocol-015-PtLimaPt-tests.opam b/opam/tezos-protocol-015-PtLimaPt-tests.opam index 532accfa4ad1..02b813b9bd69 100644 --- a/opam/tezos-protocol-015-PtLimaPt-tests.opam +++ b/opam/tezos-protocol-015-PtLimaPt-tests.opam @@ -26,6 +26,7 @@ depends: [ "qcheck-alcotest" { with-test & >= "0.20" } "tezos-test-helpers" {with-test} "tezt-tezos" {with-test} + "octez-protocol-alcotezt" {with-test} "tezos-client-base" {with-test} "tezos-protocol-environment" {with-test} "tezos-stdlib-unix" {with-test} diff --git a/opam/tezos-protocol-016-PtMumbai-tests.opam b/opam/tezos-protocol-016-PtMumbai-tests.opam index 0e0e4e8ab89c..08ca7f0c86d7 100644 --- a/opam/tezos-protocol-016-PtMumbai-tests.opam +++ b/opam/tezos-protocol-016-PtMumbai-tests.opam @@ -28,6 +28,7 @@ depends: [ "tezos-smart-rollup-016-PtMumbai" {with-test} "tezos-crypto-dal" {with-test} "tezt-tezos" {with-test} + "octez-protocol-alcotezt" {with-test} "tezos-client-base" {with-test} "tezos-protocol-environment" {with-test} "tezos-stdlib-unix" {with-test} diff --git a/opam/tezos-protocol-alpha-tests.opam b/opam/tezos-protocol-alpha-tests.opam index 69568ef93f48..bf1a04c7dae5 100644 --- a/opam/tezos-protocol-alpha-tests.opam +++ b/opam/tezos-protocol-alpha-tests.opam @@ -28,6 +28,7 @@ depends: [ "tezos-smart-rollup-alpha" {with-test} "tezos-crypto-dal" {with-test} "tezt-tezos" {with-test} + "octez-protocol-alcotezt" {with-test} "tezos-client-base" {with-test} "tezos-protocol-environment" {with-test} "tezos-stdlib-unix" {with-test} diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/regression/dune b/src/proto_015_PtLimaPt/lib_protocol/test/regression/dune index 0cc1eb204bd0..c18603113fe7 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/regression/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/regression/dune @@ -12,7 +12,8 @@ tezos-client-015-PtLimaPt tezos-protocol-plugin-015-PtLimaPt tezos-015-PtLimaPt-test-helpers - tezos-micheline) + tezos-micheline + octez-protocol-alcotezt) (library_flags (:standard -linkall)) (flags (:standard) @@ -24,7 +25,8 @@ -open Tezos_client_015_PtLimaPt -open Tezos_protocol_plugin_015_PtLimaPt -open Tezos_015_PtLimaPt_test_helpers - -open Tezos_micheline) + -open Tezos_micheline + -open Octez_protocol_alcotezt) (modules test_logging)) (executable diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/regression/test_logging.ml b/src/proto_015_PtLimaPt/lib_protocol/test/regression/test_logging.ml index d919830cc633..fa47a6941963 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/regression/test_logging.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/regression/test_logging.ml @@ -251,22 +251,19 @@ let fail_on_error f () = | Ok () -> return () | Error e -> Test.fail "%a" Error_monad.pp_print_trace e -(* Make sure that after a snapshot the snapshotted version of the test - has a different [~title], because all tests are linked in [tezt/tests/main.exe]. *) -let protocol = - match __FILE__ =~* rex "^src/proto_([0-9a-zA-Z_]*)/" with - | None -> - Stdlib.failwith ("failed to extract protocol name from path: " ^ __FILE__) - | Some name -> name - let register_script transaction = (* [~title] must be unique across the codebase, so we prefix it with the protocol name. [~file] however is better kept the same across protocols to simplify snapshotting. *) let file = filename transaction in + let protocol = + (module Protocol : Octez_protocol_alcotezt.Tezt_protocol.PROTOCOL) + in + let tag = Tezt_protocol.tag protocol in + let name = Tezt_protocol.name protocol in Regression.register ~__FILE__ - ~title:(protocol ^ ": " ^ file) - ~tags:["protocol"; "regression"; "logging"] + ~title:(name ^ ": " ^ file) + ~tags:[tag; "protocol"; "regression"; "logging"] ~file (fail_on_error @@ run_script transaction) diff --git a/src/proto_016_PtMumbai/lib_protocol/test/regression/dune b/src/proto_016_PtMumbai/lib_protocol/test/regression/dune index e795506d0365..a06834200d3d 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/regression/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/regression/dune @@ -12,7 +12,8 @@ tezos-client-016-PtMumbai tezos-protocol-plugin-016-PtMumbai tezos-016-PtMumbai-test-helpers - tezos-micheline) + tezos-micheline + octez-protocol-alcotezt) (library_flags (:standard -linkall)) (flags (:standard) @@ -24,7 +25,8 @@ -open Tezos_client_016_PtMumbai -open Tezos_protocol_plugin_016_PtMumbai -open Tezos_016_PtMumbai_test_helpers - -open Tezos_micheline) + -open Tezos_micheline + -open Octez_protocol_alcotezt) (modules test_logging)) (executable diff --git a/src/proto_016_PtMumbai/lib_protocol/test/regression/test_logging.ml b/src/proto_016_PtMumbai/lib_protocol/test/regression/test_logging.ml index 15d44bb77927..c45ea2088489 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/regression/test_logging.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/regression/test_logging.ml @@ -257,22 +257,19 @@ let fail_on_error f () = | Ok () -> return () | Error e -> Test.fail "%a" Error_monad.pp_print_trace e -(* Make sure that after a snapshot the snapshotted version of the test - has a different [~title], because all tests are linked in [tezt/tests/main.exe]. *) -let protocol = - match __FILE__ =~* rex "^src/proto_([0-9a-zA-Z_]*)/" with - | None -> - Stdlib.failwith ("failed to extract protocol name from path: " ^ __FILE__) - | Some name -> name - let register_script transaction = (* [~title] must be unique across the codebase, so we prefix it with the protocol name. [~file] however is better kept the same across protocols to simplify snapshotting. *) let file = filename transaction in + let protocol = + (module Protocol : Octez_protocol_alcotezt.Tezt_protocol.PROTOCOL) + in + let tag = Tezt_protocol.tag protocol in + let name = Tezt_protocol.name protocol in Regression.register ~__FILE__ - ~title:(protocol ^ ": " ^ file) - ~tags:["protocol"; "regression"; "logging"] + ~title:(name ^ ": " ^ file) + ~tags:[tag; "protocol"; "regression"; "logging"] ~file (fail_on_error @@ run_script transaction) diff --git a/src/proto_alpha/lib_protocol/test/regression/dune b/src/proto_alpha/lib_protocol/test/regression/dune index 2fd1dde8bad6..6ec6b745a50c 100644 --- a/src/proto_alpha/lib_protocol/test/regression/dune +++ b/src/proto_alpha/lib_protocol/test/regression/dune @@ -12,7 +12,8 @@ tezos-client-alpha tezos-protocol-plugin-alpha tezos-alpha-test-helpers - tezos-micheline) + tezos-micheline + octez-protocol-alcotezt) (library_flags (:standard -linkall)) (flags (:standard) @@ -24,7 +25,8 @@ -open Tezos_client_alpha -open Tezos_protocol_plugin_alpha -open Tezos_alpha_test_helpers - -open Tezos_micheline) + -open Tezos_micheline + -open Octez_protocol_alcotezt) (modules test_logging)) (executable diff --git a/src/proto_alpha/lib_protocol/test/regression/test_logging.ml b/src/proto_alpha/lib_protocol/test/regression/test_logging.ml index 8607cdb21846..8315d1ef9085 100644 --- a/src/proto_alpha/lib_protocol/test/regression/test_logging.ml +++ b/src/proto_alpha/lib_protocol/test/regression/test_logging.ml @@ -259,22 +259,19 @@ let fail_on_error f () = | Ok () -> return () | Error e -> Test.fail "%a" Error_monad.pp_print_trace e -(* Make sure that after a snapshot the snapshotted version of the test - has a different [~title], because all tests are linked in [tezt/tests/main.exe]. *) -let protocol = - match __FILE__ =~* rex "^src/proto_([0-9a-zA-Z_]*)/" with - | None -> - Stdlib.failwith ("failed to extract protocol name from path: " ^ __FILE__) - | Some name -> name - let register_script transaction = (* [~title] must be unique across the codebase, so we prefix it with the protocol name. [~file] however is better kept the same across protocols to simplify snapshotting. *) let file = filename transaction in + let protocol = + (module Protocol : Octez_protocol_alcotezt.Tezt_protocol.PROTOCOL) + in + let tag = Tezt_protocol.tag protocol in + let name = Tezt_protocol.name protocol in Regression.register ~__FILE__ - ~title:(protocol ^ ": " ^ file) - ~tags:["protocol"; "regression"; "logging"] + ~title:(name ^ ": " ^ file) + ~tags:[tag; "protocol"; "regression"; "logging"] ~file (fail_on_error @@ run_script transaction) -- GitLab From 37cf376f9e01817c45db68e1f8f50b7f5e48f1c9 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 20 Mar 2023 12:33:23 +0100 Subject: [PATCH 07/12] Add protocol-specific instantiation of alcotest-protocol --- manifest/main.ml | 49 +++++++++++++------ .../test/helpers/alcotezt/alcotest.ml | 28 +++++++++++ .../test/helpers/alcotezt/alcotest.mli | 43 ++++++++++++++++ .../test/helpers/alcotezt/alcotest_lwt.ml | 29 +++++++++++ .../test/helpers/alcotezt/alcotest_lwt.mli | 43 ++++++++++++++++ .../lib_protocol/test/helpers/alcotezt/dune | 15 ++++++ .../test/helpers/alcotezt/tezt_protocol.ml | 33 +++++++++++++ .../test/helpers/alcotezt/tezt_protocol.mli | 36 ++++++++++++++ .../test/helpers/alcotezt/alcotest.ml | 28 +++++++++++ .../test/helpers/alcotezt/alcotest.mli | 43 ++++++++++++++++ .../test/helpers/alcotezt/alcotest_lwt.ml | 29 +++++++++++ .../test/helpers/alcotezt/alcotest_lwt.mli | 43 ++++++++++++++++ .../lib_protocol/test/helpers/alcotezt/dune | 15 ++++++ .../test/helpers/alcotezt/tezt_protocol.ml | 33 +++++++++++++ .../test/helpers/alcotezt/tezt_protocol.mli | 36 ++++++++++++++ .../test/helpers/alcotezt/alcotest.ml | 28 +++++++++++ .../test/helpers/alcotezt/alcotest.mli | 43 ++++++++++++++++ .../test/helpers/alcotezt/alcotest_lwt.ml | 29 +++++++++++ .../test/helpers/alcotezt/alcotest_lwt.mli | 43 ++++++++++++++++ .../lib_protocol/test/helpers/alcotezt/dune | 15 ++++++ .../test/helpers/alcotezt/tezt_protocol.ml | 33 +++++++++++++ .../test/helpers/alcotezt/tezt_protocol.mli | 36 ++++++++++++++ 22 files changed, 716 insertions(+), 14 deletions(-) create mode 100644 src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest.ml create mode 100644 src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest.mli create mode 100644 src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml create mode 100644 src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli create mode 100644 src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/dune create mode 100644 src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml create mode 100644 src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli create mode 100644 src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest.ml create mode 100644 src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest.mli create mode 100644 src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml create mode 100644 src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli create mode 100644 src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/dune create mode 100644 src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml create mode 100644 src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli create mode 100644 src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest.ml create mode 100644 src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest.mli create mode 100644 src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml create mode 100644 src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli create mode 100644 src/proto_alpha/lib_protocol/test/helpers/alcotezt/dune create mode 100644 src/proto_alpha/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml create mode 100644 src/proto_alpha/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli diff --git a/manifest/main.ml b/manifest/main.ml index 1b961d1e8335..85fcb17347ea 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -4604,8 +4604,8 @@ end = struct module Lib_protocol = struct type t = {main : target; embedded : target} - let make_tests ?test_helpers ?parameters ?plugin ?client ?benchmark - ?benchmark_type_inference ?octez_sc_rollup ~main ~name () = + let make_tests ?test_helpers ?alcotezt ?parameters ?plugin ?client + ?benchmark ?benchmark_type_inference ?octez_sc_rollup ~main ~name () = let name_dash = Name.name_dash name in let number = Name.number name in let path = Name.base_path name in @@ -4633,7 +4633,7 @@ end = struct ~opam:(sf "tezos-protocol-%s-tests" name_dash) ~deps: [ - alcotezt; + alcotezt |> if_some; octez_base |> open_ ~m:"TzPervasives" |> open_ ~m:"TzPervasives.Error_monad.Legacy_monad_globals"; main |> open_; @@ -4651,7 +4651,7 @@ end = struct ~with_macos_security_framework:true ~deps: [ - alcotezt; + alcotezt |> if_some; octez_base |> open_ ~m:"TzPervasives" |> open_ ~m:"TzPervasives.Error_monad.Legacy_monad_globals"; main |> open_; @@ -4707,7 +4707,7 @@ end = struct ]) ~deps: [ - alcotezt; + alcotezt |> if_some; octez_base |> open_ ~m:"TzPervasives" |> open_ ~m:"TzPervasives.Error_monad.Legacy_monad_globals"; main |> open_; @@ -4751,7 +4751,7 @@ end = struct ~dep_globs:(conditional_list [("contracts/*", N.(number >= 013))]) ~deps: [ - alcotezt; + alcotezt |> if_some; octez_base |> open_ ~m:"TzPervasives" |> open_ ~m:"TzPervasives.Error_monad.Legacy_monad_globals"; main |> open_; @@ -4783,7 +4783,7 @@ end = struct ~with_macos_security_framework:true ~deps: [ - alcotezt; + alcotezt |> if_some; octez_base |> open_ ~m:"TzPervasives" |> open_ ~m:"TzPervasives.Error_monad.Legacy_monad_globals"; main |> open_; @@ -4818,7 +4818,7 @@ end = struct [ (if N.(number >= 015) then Some tezt_lib else None) |> if_some; octez_context; - alcotezt; + alcotezt |> if_some; octez_base |> open_ ~m:"TzPervasives" |> open_ ~m:"TzPervasives.Error_monad.Legacy_monad_globals"; client |> if_some |> open_; @@ -4877,7 +4877,7 @@ end = struct octez_merkle_proof_encoding; octez_test_helpers |> open_; test_helpers |> if_some |> open_; - alcotezt; + alcotezt |> if_some; qcheck_alcotest; octez_client_base |> if_ N.(number <= 012); octez_benchmark; @@ -4946,7 +4946,7 @@ end = struct main |> open_; octez_test_helpers |> open_; test_helpers |> if_some |> open_; - alcotezt; + alcotezt |> if_some; octez_scoru_wasm_helpers |> if_ N.(number >= 016) |> open_; octez_stdlib |> if_ N.(number >= 013) |> open_; octez_crypto_dal |> if_ N.(number >= 016) |> open_; @@ -5538,6 +5538,26 @@ module Protocol = Protocol octez_crypto_dal |> if_ N.(number >= 016) |> open_; ] in + (* We override the original definition of [alcotezt] to a + protocol-specific wrapper that registers tests with a + Protocol-appropriate title prefix and tag. We override to + ensure that the original definition is not used by mistake + which could lead to test title collisions when snapshotting. *) + let this_protocol_alcotezt = + only_if active @@ fun () -> + public_lib + (sf "tezos-%s-test-helpers.alcotezt" name_dash) + ~path: + (if active then path // "lib_protocol/test/helpers/alcotezt" + else path // "lib_protocol") + ~opam: + (if active then sf "tezos-%s-test-helpers" name_dash + else sf "tezos-%s-test-helpers" name_dash) + ~internal_name:(sf "tezos_%s_test_helpers_alcotezt" name_underscore) + ~opam_only_deps:[octez_protocol_environment] + ~deps:[octez_protocol_environment; main |> open_; protocol_alcotezt] + |> open_ + in let _plugin_tests = opt_map (both plugin test_helpers) @@ fun (plugin, test_helpers) -> only_if active @@ fun () -> @@ -5560,7 +5580,7 @@ module Protocol = Protocol |> open_ ~m:"TzPervasives.Error_monad.Legacy_monad_globals"; octez_base_test_helpers |> open_; octez_base_unix |> if_ N.(number >= 013); - alcotezt; + this_protocol_alcotezt |> if_some; octez_test_helpers |> open_; qcheck_alcotest; octez_stdlib_unix; @@ -5811,7 +5831,7 @@ module Protocol = Protocol baking |> open_; parameters |> if_some |> if_ N.(number >= 012); octez_crypto |> if_ N.(number >= 012); - alcotezt; + this_protocol_alcotezt |> if_some; uri; ] in @@ -6216,7 +6236,7 @@ module Protocol = Protocol main |> open_; octez_base_test_helpers |> open_; test_helpers |> if_some |> open_; - alcotezt; + this_protocol_alcotezt |> if_some; ] in let dac = @@ -6267,7 +6287,7 @@ module Protocol = Protocol test_helpers |> if_some |> open_; octez_dac_lib |> open_; octez_dac_node_lib |> open_; - alcotezt; + this_protocol_alcotezt |> if_some; ] in let benchmark_type_inference = @@ -6412,6 +6432,7 @@ module Protocol = Protocol if active then Lib_protocol.make_tests ?test_helpers + ?alcotezt:this_protocol_alcotezt ?parameters ?plugin ?client diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest.ml b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest.ml new file mode 100644 index 000000000000..faa66ffe9592 --- /dev/null +++ b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest.ml @@ -0,0 +1,28 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +include Octez_protocol_alcotezt.Protocol_alcotest + +let run = Octez_protocol_alcotezt.Protocol_alcotest.run Tezt_protocol.protocol diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest.mli b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest.mli new file mode 100644 index 000000000000..b3188151e221 --- /dev/null +++ b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest.mli @@ -0,0 +1,43 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +(** Protocol-specific Alcotezt wrapper. *) + +(** This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to automatically add the protocol name + to the title and tags of registered tests. *) +include module type of Octez_alcotezt.Alcotest + +(** Shadowed version of {!Octez_alcotezt.Alcotest.run}, with + protocol-prefixed titles and protocol-specific tags. + + This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to prefix Alcotest suite names with the + "pretty" version of the protocol name (e.g. [Alpha], [Mumbai], + ... ). It also adds a tag to each registered test identifying the + test. As in integration tests, this is the pretty name lowercased + (e.g. [alpha], [mumbai]). *) +val run : + __FILE__:string -> ?tags:string list -> string -> unit test list -> return diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml new file mode 100644 index 000000000000..1214d7e3c937 --- /dev/null +++ b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml @@ -0,0 +1,29 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +include Octez_protocol_alcotezt.Protocol_alcotest_lwt + +let run = + Octez_protocol_alcotezt.Protocol_alcotest_lwt.run Tezt_protocol.protocol diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli new file mode 100644 index 000000000000..a02fe4aa0d90 --- /dev/null +++ b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli @@ -0,0 +1,43 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +(** Protocol-specific Alcotezt_lwt wrapper. *) + +(** This modules shadows the function [run] in + [Octez_alcotezt.Alcotest_lwt] to automatically add the protocol name + to the title and tags of registered tests. *) +include module type of Octez_alcotezt.Alcotest_lwt + +(** Shadowed version of {!Octez_alcotezt.Alcotest_lwt.run}, with + protocol-prefixed titles and protocol-specific tags. + + This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to prefix Alcotest suite names with the + "pretty" version of the protocol name (e.g. [Alpha], [Mumbai], + ... ). It also adds a tag to each registered test identifying the + test. As in integration tests, this is the pretty name lowercased + (e.g. [alpha], [mumbai]). *) +val run : + __FILE__:string -> ?tags:string list -> string -> unit test list -> return diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/dune b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/dune new file mode 100644 index 000000000000..a70d31ab3c5c --- /dev/null +++ b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/dune @@ -0,0 +1,15 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + +(library + (name tezos_015_PtLimaPt_test_helpers_alcotezt) + (public_name tezos-015-PtLimaPt-test-helpers.alcotezt) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-protocol-environment + tezos-protocol-015-PtLimaPt + octez-protocol-alcotezt) + (flags + (:standard) + -open Tezos_protocol_015_PtLimaPt + -open Octez_protocol_alcotezt)) diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml new file mode 100644 index 000000000000..77a323131942 --- /dev/null +++ b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml @@ -0,0 +1,33 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +let protocol = + (module Protocol : Octez_protocol_alcotezt.Tezt_protocol.PROTOCOL) + +let tag = + (* Get protocol tag from Tezt_tezos *) + Octez_protocol_alcotezt.Tezt_protocol.tag protocol + +let name = Octez_protocol_alcotezt.Tezt_protocol.name protocol diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli new file mode 100644 index 000000000000..4fc2d66a4608 --- /dev/null +++ b/src/proto_015_PtLimaPt/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli @@ -0,0 +1,36 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +val protocol : Octez_protocol_alcotezt.Tezt_protocol.protocol + +(** TODO: document *) +val name : string + +(** The protocol-specific Tezt tag of this prototcol + + The protocol tag is the same as defined by + {!Tezt_tezos.Protocol.tag}, that is, the lower-cased "pretty" name + of the protocol (e.g. [Alpha], [Mumbai], ...). *) +val tag : string diff --git a/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest.ml b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest.ml new file mode 100644 index 000000000000..faa66ffe9592 --- /dev/null +++ b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest.ml @@ -0,0 +1,28 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +include Octez_protocol_alcotezt.Protocol_alcotest + +let run = Octez_protocol_alcotezt.Protocol_alcotest.run Tezt_protocol.protocol diff --git a/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest.mli b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest.mli new file mode 100644 index 000000000000..b3188151e221 --- /dev/null +++ b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest.mli @@ -0,0 +1,43 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +(** Protocol-specific Alcotezt wrapper. *) + +(** This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to automatically add the protocol name + to the title and tags of registered tests. *) +include module type of Octez_alcotezt.Alcotest + +(** Shadowed version of {!Octez_alcotezt.Alcotest.run}, with + protocol-prefixed titles and protocol-specific tags. + + This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to prefix Alcotest suite names with the + "pretty" version of the protocol name (e.g. [Alpha], [Mumbai], + ... ). It also adds a tag to each registered test identifying the + test. As in integration tests, this is the pretty name lowercased + (e.g. [alpha], [mumbai]). *) +val run : + __FILE__:string -> ?tags:string list -> string -> unit test list -> return diff --git a/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml new file mode 100644 index 000000000000..1214d7e3c937 --- /dev/null +++ b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml @@ -0,0 +1,29 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +include Octez_protocol_alcotezt.Protocol_alcotest_lwt + +let run = + Octez_protocol_alcotezt.Protocol_alcotest_lwt.run Tezt_protocol.protocol diff --git a/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli new file mode 100644 index 000000000000..a02fe4aa0d90 --- /dev/null +++ b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli @@ -0,0 +1,43 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +(** Protocol-specific Alcotezt_lwt wrapper. *) + +(** This modules shadows the function [run] in + [Octez_alcotezt.Alcotest_lwt] to automatically add the protocol name + to the title and tags of registered tests. *) +include module type of Octez_alcotezt.Alcotest_lwt + +(** Shadowed version of {!Octez_alcotezt.Alcotest_lwt.run}, with + protocol-prefixed titles and protocol-specific tags. + + This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to prefix Alcotest suite names with the + "pretty" version of the protocol name (e.g. [Alpha], [Mumbai], + ... ). It also adds a tag to each registered test identifying the + test. As in integration tests, this is the pretty name lowercased + (e.g. [alpha], [mumbai]). *) +val run : + __FILE__:string -> ?tags:string list -> string -> unit test list -> return diff --git a/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/dune b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/dune new file mode 100644 index 000000000000..ee4e4f60648b --- /dev/null +++ b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/dune @@ -0,0 +1,15 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + +(library + (name tezos_016_PtMumbai_test_helpers_alcotezt) + (public_name tezos-016-PtMumbai-test-helpers.alcotezt) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-protocol-environment + tezos-protocol-016-PtMumbai + octez-protocol-alcotezt) + (flags + (:standard) + -open Tezos_protocol_016_PtMumbai + -open Octez_protocol_alcotezt)) diff --git a/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml new file mode 100644 index 000000000000..77a323131942 --- /dev/null +++ b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml @@ -0,0 +1,33 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +let protocol = + (module Protocol : Octez_protocol_alcotezt.Tezt_protocol.PROTOCOL) + +let tag = + (* Get protocol tag from Tezt_tezos *) + Octez_protocol_alcotezt.Tezt_protocol.tag protocol + +let name = Octez_protocol_alcotezt.Tezt_protocol.name protocol diff --git a/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli new file mode 100644 index 000000000000..4fc2d66a4608 --- /dev/null +++ b/src/proto_016_PtMumbai/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli @@ -0,0 +1,36 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +val protocol : Octez_protocol_alcotezt.Tezt_protocol.protocol + +(** TODO: document *) +val name : string + +(** The protocol-specific Tezt tag of this prototcol + + The protocol tag is the same as defined by + {!Tezt_tezos.Protocol.tag}, that is, the lower-cased "pretty" name + of the protocol (e.g. [Alpha], [Mumbai], ...). *) +val tag : string diff --git a/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest.ml b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest.ml new file mode 100644 index 000000000000..faa66ffe9592 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest.ml @@ -0,0 +1,28 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +include Octez_protocol_alcotezt.Protocol_alcotest + +let run = Octez_protocol_alcotezt.Protocol_alcotest.run Tezt_protocol.protocol diff --git a/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest.mli b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest.mli new file mode 100644 index 000000000000..b3188151e221 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest.mli @@ -0,0 +1,43 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +(** Protocol-specific Alcotezt wrapper. *) + +(** This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to automatically add the protocol name + to the title and tags of registered tests. *) +include module type of Octez_alcotezt.Alcotest + +(** Shadowed version of {!Octez_alcotezt.Alcotest.run}, with + protocol-prefixed titles and protocol-specific tags. + + This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to prefix Alcotest suite names with the + "pretty" version of the protocol name (e.g. [Alpha], [Mumbai], + ... ). It also adds a tag to each registered test identifying the + test. As in integration tests, this is the pretty name lowercased + (e.g. [alpha], [mumbai]). *) +val run : + __FILE__:string -> ?tags:string list -> string -> unit test list -> return diff --git a/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml new file mode 100644 index 000000000000..1214d7e3c937 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest_lwt.ml @@ -0,0 +1,29 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +include Octez_protocol_alcotezt.Protocol_alcotest_lwt + +let run = + Octez_protocol_alcotezt.Protocol_alcotest_lwt.run Tezt_protocol.protocol diff --git a/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli new file mode 100644 index 000000000000..a02fe4aa0d90 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/alcotest_lwt.mli @@ -0,0 +1,43 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +(** Protocol-specific Alcotezt_lwt wrapper. *) + +(** This modules shadows the function [run] in + [Octez_alcotezt.Alcotest_lwt] to automatically add the protocol name + to the title and tags of registered tests. *) +include module type of Octez_alcotezt.Alcotest_lwt + +(** Shadowed version of {!Octez_alcotezt.Alcotest_lwt.run}, with + protocol-prefixed titles and protocol-specific tags. + + This modules shadows the function [run] in + [Octez_alcotezt.Alcotest] to prefix Alcotest suite names with the + "pretty" version of the protocol name (e.g. [Alpha], [Mumbai], + ... ). It also adds a tag to each registered test identifying the + test. As in integration tests, this is the pretty name lowercased + (e.g. [alpha], [mumbai]). *) +val run : + __FILE__:string -> ?tags:string list -> string -> unit test list -> return diff --git a/src/proto_alpha/lib_protocol/test/helpers/alcotezt/dune b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/dune new file mode 100644 index 000000000000..bdb4df4e8cc0 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/dune @@ -0,0 +1,15 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + +(library + (name tezos_alpha_test_helpers_alcotezt) + (public_name tezos-alpha-test-helpers.alcotezt) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-protocol-environment + tezos-protocol-alpha + octez-protocol-alcotezt) + (flags + (:standard) + -open Tezos_protocol_alpha + -open Octez_protocol_alcotezt)) diff --git a/src/proto_alpha/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml new file mode 100644 index 000000000000..77a323131942 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/tezt_protocol.ml @@ -0,0 +1,33 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +let protocol = + (module Protocol : Octez_protocol_alcotezt.Tezt_protocol.PROTOCOL) + +let tag = + (* Get protocol tag from Tezt_tezos *) + Octez_protocol_alcotezt.Tezt_protocol.tag protocol + +let name = Octez_protocol_alcotezt.Tezt_protocol.name protocol diff --git a/src/proto_alpha/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli new file mode 100644 index 000000000000..4fc2d66a4608 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/helpers/alcotezt/tezt_protocol.mli @@ -0,0 +1,36 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2023 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. *) +(* *) +(*****************************************************************************) + +val protocol : Octez_protocol_alcotezt.Tezt_protocol.protocol + +(** TODO: document *) +val name : string + +(** The protocol-specific Tezt tag of this prototcol + + The protocol tag is the same as defined by + {!Tezt_tezos.Protocol.tag}, that is, the lower-cased "pretty" name + of the protocol (e.g. [Alpha], [Mumbai], ...). *) +val tag : string -- GitLab From 5d29e033e3d0820d493637ded3c69807eb2fc05e Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 20 Mar 2023 12:34:11 +0100 Subject: [PATCH 08/12] Add dune/opam files for protocol-specific instantiation of alcotest-protocol --- opam/tezos-015-PtLimaPt-test-helpers.opam | 1 + opam/tezos-016-PtMumbai-test-helpers.opam | 1 + opam/tezos-017-PtNairob-test-helpers.opam | 1 + opam/tezos-alpha-test-helpers.opam | 1 + opam/tezos-baking-015-PtLimaPt.opam | 2 +- opam/tezos-baking-016-PtMumbai.opam | 2 +- opam/tezos-baking-017-PtNairob.opam | 2 +- opam/tezos-baking-alpha.opam | 2 +- opam/tezos-dac-017-PtNairob.opam | 1 - opam/tezos-dac-alpha.opam | 1 - opam/tezos-dal-016-PtMumbai.opam | 1 - opam/tezos-dal-017-PtNairob.opam | 1 - opam/tezos-dal-alpha.opam | 1 - opam/tezos-protocol-015-PtLimaPt-tests.opam | 3 +-- opam/tezos-protocol-016-PtMumbai-tests.opam | 3 +-- opam/tezos-protocol-017-PtNairob-tests.opam | 4 ++-- opam/tezos-protocol-alpha-tests.opam | 3 +-- opam/tezos-protocol-plugin-015-PtLimaPt-tests.opam | 3 +-- opam/tezos-protocol-plugin-016-PtMumbai-tests.opam | 3 +-- opam/tezos-protocol-plugin-017-PtNairob-tests.opam | 3 +-- opam/tezos-protocol-plugin-alpha-tests.opam | 3 +-- src/proto_015_PtLimaPt/lib_delegate/test/dune | 4 ++-- src/proto_015_PtLimaPt/lib_plugin/test/dune | 4 ++-- .../lib_protocol/test/integration/consensus/dune | 4 ++-- src/proto_015_PtLimaPt/lib_protocol/test/integration/dune | 4 ++-- .../lib_protocol/test/integration/gas/dune | 4 ++-- .../lib_protocol/test/integration/michelson/dune | 4 ++-- .../lib_protocol/test/integration/operations/dune | 4 ++-- .../lib_protocol/test/integration/validate/dune | 4 ++-- src/proto_015_PtLimaPt/lib_protocol/test/pbt/dune | 4 ++-- src/proto_015_PtLimaPt/lib_protocol/test/unit/dune | 4 ++-- src/proto_016_PtMumbai/lib_dal/test/dune | 4 ++-- src/proto_016_PtMumbai/lib_delegate/test/dune | 4 ++-- src/proto_016_PtMumbai/lib_plugin/test/dune | 4 ++-- .../lib_protocol/test/integration/consensus/dune | 4 ++-- src/proto_016_PtMumbai/lib_protocol/test/integration/dune | 4 ++-- .../lib_protocol/test/integration/gas/dune | 4 ++-- .../lib_protocol/test/integration/michelson/dune | 4 ++-- .../lib_protocol/test/integration/operations/dune | 4 ++-- .../lib_protocol/test/integration/validate/dune | 4 ++-- src/proto_016_PtMumbai/lib_protocol/test/pbt/dune | 4 ++-- src/proto_016_PtMumbai/lib_protocol/test/unit/dune | 4 ++-- src/proto_017_PtNairob/lib_dac_plugin/test/dune | 4 ++-- src/proto_017_PtNairob/lib_dal/test/dune | 4 ++-- src/proto_017_PtNairob/lib_delegate/test/dune | 4 ++-- src/proto_017_PtNairob/lib_plugin/test/dune | 4 ++-- .../lib_protocol/test/integration/consensus/dune | 4 ++-- src/proto_017_PtNairob/lib_protocol/test/integration/dune | 4 ++-- .../lib_protocol/test/integration/gas/dune | 4 ++-- .../lib_protocol/test/integration/michelson/dune | 4 ++-- .../lib_protocol/test/integration/operations/dune | 4 ++-- .../lib_protocol/test/integration/validate/dune | 4 ++-- src/proto_017_PtNairob/lib_protocol/test/pbt/dune | 4 ++-- src/proto_017_PtNairob/lib_protocol/test/regression/dune | 6 ++++-- src/proto_017_PtNairob/lib_protocol/test/unit/dune | 4 ++-- src/proto_alpha/lib_dac_plugin/test/dune | 4 ++-- src/proto_alpha/lib_dal/test/dune | 4 ++-- src/proto_alpha/lib_delegate/test/dune | 4 ++-- src/proto_alpha/lib_plugin/test/dune | 4 ++-- .../lib_protocol/test/integration/consensus/dune | 4 ++-- src/proto_alpha/lib_protocol/test/integration/dune | 4 ++-- src/proto_alpha/lib_protocol/test/integration/gas/dune | 4 ++-- .../lib_protocol/test/integration/michelson/dune | 4 ++-- .../lib_protocol/test/integration/operations/dune | 4 ++-- src/proto_alpha/lib_protocol/test/integration/validate/dune | 4 ++-- src/proto_alpha/lib_protocol/test/pbt/dune | 4 ++-- src/proto_alpha/lib_protocol/test/unit/dune | 4 ++-- 67 files changed, 111 insertions(+), 117 deletions(-) diff --git a/opam/tezos-015-PtLimaPt-test-helpers.opam b/opam/tezos-015-PtLimaPt-test-helpers.opam index 8cb2483c6402..452e62162830 100644 --- a/opam/tezos-015-PtLimaPt-test-helpers.opam +++ b/opam/tezos-015-PtLimaPt-test-helpers.opam @@ -21,6 +21,7 @@ depends: [ "tezos-protocol-plugin-015-PtLimaPt" "tezos-shell-services" "octez-plompiler" + "octez-protocol-alcotezt" ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-016-PtMumbai-test-helpers.opam b/opam/tezos-016-PtMumbai-test-helpers.opam index c041ee4aae5d..a21851797186 100644 --- a/opam/tezos-016-PtMumbai-test-helpers.opam +++ b/opam/tezos-016-PtMumbai-test-helpers.opam @@ -22,6 +22,7 @@ depends: [ "tezos-shell-services" "octez-plompiler" "tezos-crypto-dal" + "octez-protocol-alcotezt" ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-017-PtNairob-test-helpers.opam b/opam/tezos-017-PtNairob-test-helpers.opam index ca7f3c84a184..ccb45073f9e0 100644 --- a/opam/tezos-017-PtNairob-test-helpers.opam +++ b/opam/tezos-017-PtNairob-test-helpers.opam @@ -22,6 +22,7 @@ depends: [ "tezos-shell-services" "octez-plompiler" "tezos-crypto-dal" + "octez-protocol-alcotezt" ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-alpha-test-helpers.opam b/opam/tezos-alpha-test-helpers.opam index 1002ce39d3c9..84ed3b38b41c 100644 --- a/opam/tezos-alpha-test-helpers.opam +++ b/opam/tezos-alpha-test-helpers.opam @@ -22,6 +22,7 @@ depends: [ "tezos-shell-services" "octez-plompiler" "tezos-crypto-dal" + "octez-protocol-alcotezt" ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-baking-015-PtLimaPt.opam b/opam/tezos-baking-015-PtLimaPt.opam index f86e4c334926..9b3c640f980b 100644 --- a/opam/tezos-baking-015-PtLimaPt.opam +++ b/opam/tezos-baking-015-PtLimaPt.opam @@ -40,7 +40,7 @@ depends: [ "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-crypto" {with-test} - "octez-alcotezt" {with-test} + "tezos-015-PtLimaPt-test-helpers" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-baking-016-PtMumbai.opam b/opam/tezos-baking-016-PtMumbai.opam index 3e26d967a786..37b09ed31ae6 100644 --- a/opam/tezos-baking-016-PtMumbai.opam +++ b/opam/tezos-baking-016-PtMumbai.opam @@ -40,7 +40,7 @@ depends: [ "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-crypto" {with-test} - "octez-alcotezt" {with-test} + "tezos-016-PtMumbai-test-helpers" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-baking-017-PtNairob.opam b/opam/tezos-baking-017-PtNairob.opam index c856c058a989..f2c7db2a4357 100644 --- a/opam/tezos-baking-017-PtNairob.opam +++ b/opam/tezos-baking-017-PtNairob.opam @@ -41,7 +41,7 @@ depends: [ "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-crypto" {with-test} - "octez-alcotezt" {with-test} + "tezos-017-PtNairob-test-helpers" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-baking-alpha.opam b/opam/tezos-baking-alpha.opam index e2711ed928ef..f25065254e14 100644 --- a/opam/tezos-baking-alpha.opam +++ b/opam/tezos-baking-alpha.opam @@ -41,7 +41,7 @@ depends: [ "tezos-micheline" {with-test} "tezos-base-test-helpers" {with-test} "tezos-crypto" {with-test} - "octez-alcotezt" {with-test} + "tezos-alpha-test-helpers" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-dac-017-PtNairob.opam b/opam/tezos-dac-017-PtNairob.opam index 56e93fcca9cb..8198ae33a85a 100644 --- a/opam/tezos-dac-017-PtNairob.opam +++ b/opam/tezos-dac-017-PtNairob.opam @@ -23,7 +23,6 @@ depends: [ "tezos-base-test-helpers" {with-test} "tezos-017-PtNairob-test-helpers" {with-test} "tezos-dac-node-lib" {with-test} - "octez-alcotezt" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-dac-alpha.opam b/opam/tezos-dac-alpha.opam index 4d08e27b0519..9752cde709ad 100644 --- a/opam/tezos-dac-alpha.opam +++ b/opam/tezos-dac-alpha.opam @@ -23,7 +23,6 @@ depends: [ "tezos-base-test-helpers" {with-test} "tezos-alpha-test-helpers" {with-test} "tezos-dac-node-lib" {with-test} - "octez-alcotezt" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-dal-016-PtMumbai.opam b/opam/tezos-dal-016-PtMumbai.opam index d3c522cad9dd..3bf9ada21d3a 100644 --- a/opam/tezos-dal-016-PtMumbai.opam +++ b/opam/tezos-dal-016-PtMumbai.opam @@ -23,7 +23,6 @@ depends: [ "tezt" { with-test & >= "3.0.0" } "tezos-base-test-helpers" {with-test} "tezos-016-PtMumbai-test-helpers" {with-test} - "octez-alcotezt" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-dal-017-PtNairob.opam b/opam/tezos-dal-017-PtNairob.opam index 0fc44eef70f1..13771b8dee6b 100644 --- a/opam/tezos-dal-017-PtNairob.opam +++ b/opam/tezos-dal-017-PtNairob.opam @@ -23,7 +23,6 @@ depends: [ "tezt" { with-test & >= "3.0.0" } "tezos-base-test-helpers" {with-test} "tezos-017-PtNairob-test-helpers" {with-test} - "octez-alcotezt" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-dal-alpha.opam b/opam/tezos-dal-alpha.opam index 48f0faecdaf6..77ac951a7796 100644 --- a/opam/tezos-dal-alpha.opam +++ b/opam/tezos-dal-alpha.opam @@ -23,7 +23,6 @@ depends: [ "tezt" { with-test & >= "3.0.0" } "tezos-base-test-helpers" {with-test} "tezos-alpha-test-helpers" {with-test} - "octez-alcotezt" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-protocol-015-PtLimaPt-tests.opam b/opam/tezos-protocol-015-PtLimaPt-tests.opam index 02b813b9bd69..cb3181139d96 100644 --- a/opam/tezos-protocol-015-PtLimaPt-tests.opam +++ b/opam/tezos-protocol-015-PtLimaPt-tests.opam @@ -12,11 +12,10 @@ depends: [ "ocaml" { >= "4.14" } "tezt" { with-test & >= "3.0.0" } "tezos-context" {with-test} - "octez-alcotezt" {with-test} + "tezos-015-PtLimaPt-test-helpers" {with-test} "tezos-base" {with-test} "tezos-client-015-PtLimaPt" {with-test} "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-benchmark" {with-test} diff --git a/opam/tezos-protocol-016-PtMumbai-tests.opam b/opam/tezos-protocol-016-PtMumbai-tests.opam index 08ca7f0c86d7..67eca199c5b4 100644 --- a/opam/tezos-protocol-016-PtMumbai-tests.opam +++ b/opam/tezos-protocol-016-PtMumbai-tests.opam @@ -12,11 +12,10 @@ depends: [ "ocaml" { >= "4.14" } "tezt" { with-test & >= "3.0.0" } "tezos-context" {with-test} - "octez-alcotezt" {with-test} + "tezos-016-PtMumbai-test-helpers" {with-test} "tezos-base" {with-test} "tezos-client-016-PtMumbai" {with-test} "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-benchmark" {with-test} diff --git a/opam/tezos-protocol-017-PtNairob-tests.opam b/opam/tezos-protocol-017-PtNairob-tests.opam index 62ba825d4aac..4b4001b27fd0 100644 --- a/opam/tezos-protocol-017-PtNairob-tests.opam +++ b/opam/tezos-protocol-017-PtNairob-tests.opam @@ -12,11 +12,10 @@ depends: [ "ocaml" { >= "4.14" } "tezt" { with-test & >= "3.0.0" } "tezos-context" {with-test} - "octez-alcotezt" {with-test} + "tezos-017-PtNairob-test-helpers" {with-test} "tezos-base" {with-test} "tezos-client-017-PtNairob" {with-test} "tezos-protocol-017-PtNairob" {with-test} - "tezos-017-PtNairob-test-helpers" {with-test} "tezos-base-test-helpers" {with-test} "tezos-protocol-plugin-017-PtNairob" {with-test} "tezos-benchmark" {with-test} @@ -28,6 +27,7 @@ depends: [ "tezos-smart-rollup-017-PtNairob" {with-test} "tezos-crypto-dal" {with-test} "tezt-tezos" {with-test} + "octez-protocol-alcotezt" {with-test} "tezos-client-base" {with-test} "tezos-protocol-environment" {with-test} "tezos-stdlib-unix" {with-test} diff --git a/opam/tezos-protocol-alpha-tests.opam b/opam/tezos-protocol-alpha-tests.opam index bf1a04c7dae5..2704a8745cc0 100644 --- a/opam/tezos-protocol-alpha-tests.opam +++ b/opam/tezos-protocol-alpha-tests.opam @@ -12,11 +12,10 @@ depends: [ "ocaml" { >= "4.14" } "tezt" { with-test & >= "3.0.0" } "tezos-context" {with-test} - "octez-alcotezt" {with-test} + "tezos-alpha-test-helpers" {with-test} "tezos-base" {with-test} "tezos-client-alpha" {with-test} "tezos-protocol-alpha" {with-test} - "tezos-alpha-test-helpers" {with-test} "tezos-base-test-helpers" {with-test} "tezos-protocol-plugin-alpha" {with-test} "tezos-benchmark" {with-test} diff --git a/opam/tezos-protocol-plugin-015-PtLimaPt-tests.opam b/opam/tezos-protocol-plugin-015-PtLimaPt-tests.opam index b9269c355b61..e7eaad6f14ac 100644 --- a/opam/tezos-protocol-plugin-015-PtLimaPt-tests.opam +++ b/opam/tezos-protocol-plugin-015-PtLimaPt-tests.opam @@ -13,14 +13,13 @@ depends: [ "tezt" { with-test & >= "3.0.0" } "tezos-base" {with-test} "tezos-base-test-helpers" {with-test} - "octez-alcotezt" {with-test} + "tezos-015-PtLimaPt-test-helpers" {with-test} "tezos-test-helpers" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } "tezos-stdlib-unix" {with-test} "tezos-micheline" {with-test} "tezos-protocol-plugin-015-PtLimaPt" {with-test} "tezos-protocol-015-PtLimaPt" {with-test} - "tezos-015-PtLimaPt-test-helpers" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-protocol-plugin-016-PtMumbai-tests.opam b/opam/tezos-protocol-plugin-016-PtMumbai-tests.opam index ca78afa10ffc..1054ac96b982 100644 --- a/opam/tezos-protocol-plugin-016-PtMumbai-tests.opam +++ b/opam/tezos-protocol-plugin-016-PtMumbai-tests.opam @@ -13,14 +13,13 @@ depends: [ "tezt" { with-test & >= "3.0.0" } "tezos-base" {with-test} "tezos-base-test-helpers" {with-test} - "octez-alcotezt" {with-test} + "tezos-016-PtMumbai-test-helpers" {with-test} "tezos-test-helpers" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } "tezos-stdlib-unix" {with-test} "tezos-micheline" {with-test} "tezos-protocol-plugin-016-PtMumbai" {with-test} "tezos-protocol-016-PtMumbai" {with-test} - "tezos-016-PtMumbai-test-helpers" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-protocol-plugin-017-PtNairob-tests.opam b/opam/tezos-protocol-plugin-017-PtNairob-tests.opam index c4c11e998740..e4443debad6b 100644 --- a/opam/tezos-protocol-plugin-017-PtNairob-tests.opam +++ b/opam/tezos-protocol-plugin-017-PtNairob-tests.opam @@ -13,14 +13,13 @@ depends: [ "tezt" { with-test & >= "3.0.0" } "tezos-base" {with-test} "tezos-base-test-helpers" {with-test} - "octez-alcotezt" {with-test} + "tezos-017-PtNairob-test-helpers" {with-test} "tezos-test-helpers" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } "tezos-stdlib-unix" {with-test} "tezos-micheline" {with-test} "tezos-protocol-plugin-017-PtNairob" {with-test} "tezos-protocol-017-PtNairob" {with-test} - "tezos-017-PtNairob-test-helpers" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezos-protocol-plugin-alpha-tests.opam b/opam/tezos-protocol-plugin-alpha-tests.opam index cfc304235fc1..6e95ff3f439a 100644 --- a/opam/tezos-protocol-plugin-alpha-tests.opam +++ b/opam/tezos-protocol-plugin-alpha-tests.opam @@ -13,14 +13,13 @@ depends: [ "tezt" { with-test & >= "3.0.0" } "tezos-base" {with-test} "tezos-base-test-helpers" {with-test} - "octez-alcotezt" {with-test} + "tezos-alpha-test-helpers" {with-test} "tezos-test-helpers" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } "tezos-stdlib-unix" {with-test} "tezos-micheline" {with-test} "tezos-protocol-plugin-alpha" {with-test} "tezos-protocol-alpha" {with-test} - "tezos-alpha-test-helpers" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/src/proto_015_PtLimaPt/lib_delegate/test/dune b/src/proto_015_PtLimaPt/lib_delegate/test/dune index a0bf2ea9ab74..d5072b1d4b0d 100644 --- a/src/proto_015_PtLimaPt/lib_delegate/test/dune +++ b/src/proto_015_PtLimaPt/lib_delegate/test/dune @@ -15,7 +15,7 @@ tezos-baking-015-PtLimaPt tezos-protocol-015-PtLimaPt.parameters tezos-crypto - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt uri) (library_flags (:standard -linkall)) (flags @@ -30,7 +30,7 @@ -open Tezos_base_test_helpers -open Tezos_015_PtLimaPt_mockup_simulator -open Tezos_baking_015_PtLimaPt - -open Octez_alcotezt) + -open Tezos_015_PtLimaPt_test_helpers_alcotezt) (modules test_scenario)) (executable diff --git a/src/proto_015_PtLimaPt/lib_plugin/test/dune b/src/proto_015_PtLimaPt/lib_plugin/test/dune index a152e5acfc9b..3158de2468a5 100644 --- a/src/proto_015_PtLimaPt/lib_plugin/test/dune +++ b/src/proto_015_PtLimaPt/lib_plugin/test/dune @@ -9,7 +9,7 @@ tezos-base tezos-base-test-helpers tezos-base.unix - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt tezos-test-helpers qcheck-alcotest tezos-stdlib-unix @@ -26,7 +26,7 @@ -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base_test_helpers - -open Octez_alcotezt + -open Tezos_015_PtLimaPt_test_helpers_alcotezt -open Tezos_test_helpers -open Tezos_micheline -open Tezos_protocol_plugin_015_PtLimaPt 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 05454121a764..21bbbbbbd3f5 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/dune @@ -7,7 +7,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt tezos-base tezos-protocol-015-PtLimaPt tezos-015-PtLimaPt-test-helpers @@ -19,7 +19,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_015_PtLimaPt_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_015_PtLimaPt diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/dune b/src/proto_015_PtLimaPt/lib_protocol/test/integration/dune index 49409ef787e2..4f5841f2d534 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/dune @@ -8,7 +8,7 @@ tezt.core tezt tezos-context - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt tezos-base tezos-client-015-PtLimaPt tezos-protocol-015-PtLimaPt @@ -20,7 +20,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_015_PtLimaPt_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_client_015_PtLimaPt diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/gas/dune b/src/proto_015_PtLimaPt/lib_protocol/test/integration/gas/dune index 573319b558ab..54ceb476a7e7 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/gas/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/gas/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt tezos-base tezos-protocol-015-PtLimaPt tezos-015-PtLimaPt-test-helpers @@ -16,7 +16,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_015_PtLimaPt_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_015_PtLimaPt diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/dune b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/dune index fac126ca4354..07c9116178fe 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/dune @@ -7,7 +7,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt tezos-base tezos-protocol-015-PtLimaPt tezos-015-PtLimaPt-test-helpers @@ -24,7 +24,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_015_PtLimaPt_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_015_PtLimaPt diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/dune b/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/dune index 9e51741182b8..b3489bdeef6a 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/dune @@ -7,7 +7,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt tezos-base tezos-protocol-015-PtLimaPt tezos-client-015-PtLimaPt @@ -19,7 +19,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_015_PtLimaPt_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_015_PtLimaPt diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/validate/dune b/src/proto_015_PtLimaPt/lib_protocol/test/integration/validate/dune index 61207942f939..e1303620da50 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/validate/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/validate/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt tezos-base tezos-protocol-015-PtLimaPt qcheck-alcotest @@ -20,7 +20,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_015_PtLimaPt_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_015_PtLimaPt diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/dune b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/dune index 9e2781484317..5a149a0d84ca 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/dune @@ -13,7 +13,7 @@ tezos-context.merkle_proof_encoding tezos-test-helpers tezos-015-PtLimaPt-test-helpers - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt qcheck-alcotest tezos-benchmark tezos-benchmark-015-PtLimaPt @@ -29,7 +29,7 @@ -open Tezos_protocol_015_PtLimaPt -open Tezos_test_helpers -open Tezos_015_PtLimaPt_test_helpers - -open Octez_alcotezt + -open Tezos_015_PtLimaPt_test_helpers_alcotezt -open Tezos_benchmark_015_PtLimaPt -open Tezos_benchmark_type_inference_015_PtLimaPt) (modules diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/unit/dune b/src/proto_015_PtLimaPt/lib_protocol/test/unit/dune index fdaa5135c364..2dfd452c0f72 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/unit/dune +++ b/src/proto_015_PtLimaPt/lib_protocol/test/unit/dune @@ -17,7 +17,7 @@ tezos-protocol-015-PtLimaPt tezos-test-helpers tezos-015-PtLimaPt-test-helpers - octez-alcotezt + tezos-015-PtLimaPt-test-helpers.alcotezt tezos-stdlib tezos-scoru-wasm) (library_flags (:standard -linkall)) @@ -33,7 +33,7 @@ -open Tezos_protocol_015_PtLimaPt -open Tezos_test_helpers -open Tezos_015_PtLimaPt_test_helpers - -open Octez_alcotezt + -open Tezos_015_PtLimaPt_test_helpers_alcotezt -open Tezos_stdlib) (modules test_main diff --git a/src/proto_016_PtMumbai/lib_dal/test/dune b/src/proto_016_PtMumbai/lib_dal/test/dune index a0eceb195e7a..19c63caeb1b6 100644 --- a/src/proto_016_PtMumbai/lib_dal/test/dune +++ b/src/proto_016_PtMumbai/lib_dal/test/dune @@ -11,7 +11,7 @@ tezos-protocol-016-PtMumbai tezos-base-test-helpers tezos-016-PtMumbai-test-helpers - octez-alcotezt) + tezos-016-PtMumbai-test-helpers.alcotezt) (library_flags (:standard -linkall)) (flags (:standard) @@ -23,7 +23,7 @@ -open Tezos_protocol_016_PtMumbai -open Tezos_base_test_helpers -open Tezos_016_PtMumbai_test_helpers - -open Octez_alcotezt) + -open Tezos_016_PtMumbai_test_helpers_alcotezt) (modules test_dal_slot_frame_encoding test_helpers)) (executable diff --git a/src/proto_016_PtMumbai/lib_delegate/test/dune b/src/proto_016_PtMumbai/lib_delegate/test/dune index 8206c345908c..7b93f2614961 100644 --- a/src/proto_016_PtMumbai/lib_delegate/test/dune +++ b/src/proto_016_PtMumbai/lib_delegate/test/dune @@ -15,7 +15,7 @@ tezos-baking-016-PtMumbai tezos-protocol-016-PtMumbai.parameters tezos-crypto - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt uri) (library_flags (:standard -linkall)) (flags @@ -30,7 +30,7 @@ -open Tezos_base_test_helpers -open Tezos_016_PtMumbai_mockup_simulator -open Tezos_baking_016_PtMumbai - -open Octez_alcotezt) + -open Tezos_016_PtMumbai_test_helpers_alcotezt) (modules test_scenario)) (executable diff --git a/src/proto_016_PtMumbai/lib_plugin/test/dune b/src/proto_016_PtMumbai/lib_plugin/test/dune index 70d7d736ad7c..9ae55b7c8f2d 100644 --- a/src/proto_016_PtMumbai/lib_plugin/test/dune +++ b/src/proto_016_PtMumbai/lib_plugin/test/dune @@ -9,7 +9,7 @@ tezos-base tezos-base-test-helpers tezos-base.unix - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt tezos-test-helpers qcheck-alcotest tezos-stdlib-unix @@ -26,7 +26,7 @@ -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base_test_helpers - -open Octez_alcotezt + -open Tezos_016_PtMumbai_test_helpers_alcotezt -open Tezos_test_helpers -open Tezos_micheline -open Tezos_protocol_plugin_016_PtMumbai 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 e43d7b45a08c..fdcf57030657 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/consensus/dune @@ -7,7 +7,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt tezos-base tezos-protocol-016-PtMumbai tezos-016-PtMumbai-test-helpers @@ -19,7 +19,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_016_PtMumbai_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_016_PtMumbai diff --git a/src/proto_016_PtMumbai/lib_protocol/test/integration/dune b/src/proto_016_PtMumbai/lib_protocol/test/integration/dune index 51efbbe49ad9..91844bea3f2e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/dune @@ -8,7 +8,7 @@ tezt.core tezt tezos-context - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt tezos-base tezos-client-016-PtMumbai tezos-protocol-016-PtMumbai @@ -20,7 +20,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_016_PtMumbai_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_client_016_PtMumbai 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 e358e9c047c4..2fce6850a886 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/gas/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt tezos-base tezos-protocol-016-PtMumbai tezos-016-PtMumbai-test-helpers @@ -16,7 +16,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_016_PtMumbai_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_016_PtMumbai 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 9510709025f2..dd7516b2e0f5 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/michelson/dune @@ -7,7 +7,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt tezos-base tezos-protocol-016-PtMumbai tezos-016-PtMumbai-test-helpers @@ -24,7 +24,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_016_PtMumbai_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_016_PtMumbai 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 5efb8044f524..079abd24f20e 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/operations/dune @@ -7,7 +7,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt tezos-base tezos-protocol-016-PtMumbai tezos-client-016-PtMumbai @@ -19,7 +19,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_016_PtMumbai_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_016_PtMumbai 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 8c3f81382687..38200b422f1a 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/validate/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt tezos-base tezos-protocol-016-PtMumbai qcheck-alcotest @@ -20,7 +20,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_016_PtMumbai_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_016_PtMumbai diff --git a/src/proto_016_PtMumbai/lib_protocol/test/pbt/dune b/src/proto_016_PtMumbai/lib_protocol/test/pbt/dune index aa2b2f7f667e..ec250e13badd 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/pbt/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/pbt/dune @@ -13,7 +13,7 @@ tezos-context.merkle_proof_encoding tezos-test-helpers tezos-016-PtMumbai-test-helpers - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt qcheck-alcotest tezos-benchmark tezos-benchmark-016-PtMumbai @@ -33,7 +33,7 @@ -open Tezos_protocol_016_PtMumbai -open Tezos_test_helpers -open Tezos_016_PtMumbai_test_helpers - -open Octez_alcotezt + -open Tezos_016_PtMumbai_test_helpers_alcotezt -open Tezos_benchmark_016_PtMumbai -open Tezos_benchmark_type_inference_016_PtMumbai -open Tezos_smart_rollup_016_PtMumbai diff --git a/src/proto_016_PtMumbai/lib_protocol/test/unit/dune b/src/proto_016_PtMumbai/lib_protocol/test/unit/dune index 138dd6abfa79..37d2ccec63d2 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/dune +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/dune @@ -17,7 +17,7 @@ tezos-protocol-016-PtMumbai tezos-test-helpers tezos-016-PtMumbai-test-helpers - octez-alcotezt + tezos-016-PtMumbai-test-helpers.alcotezt tezos-scoru-wasm-helpers tezos-stdlib tezos-crypto-dal @@ -37,7 +37,7 @@ -open Tezos_protocol_016_PtMumbai -open Tezos_test_helpers -open Tezos_016_PtMumbai_test_helpers - -open Octez_alcotezt + -open Tezos_016_PtMumbai_test_helpers_alcotezt -open Tezos_scoru_wasm_helpers -open Tezos_stdlib -open Tezos_crypto_dal diff --git a/src/proto_017_PtNairob/lib_dac_plugin/test/dune b/src/proto_017_PtNairob/lib_dac_plugin/test/dune index 281a3a4a6a60..8969f59de961 100644 --- a/src/proto_017_PtNairob/lib_dac_plugin/test/dune +++ b/src/proto_017_PtNairob/lib_dac_plugin/test/dune @@ -13,7 +13,7 @@ tezos-017-PtNairob-test-helpers tezos-dac-lib tezos_dac_node_lib - octez-alcotezt) + tezos-017-PtNairob-test-helpers.alcotezt) (library_flags (:standard -linkall)) (flags (:standard) @@ -27,7 +27,7 @@ -open Tezos_017_PtNairob_test_helpers -open Tezos_dac_lib -open Tezos_dac_node_lib - -open Octez_alcotezt) + -open Tezos_017_PtNairob_test_helpers_alcotezt) (modules test_dac_pages_encoding test_dac_plugin_registration test_helpers)) (executable diff --git a/src/proto_017_PtNairob/lib_dal/test/dune b/src/proto_017_PtNairob/lib_dal/test/dune index 93b86554a027..29a24e7e2e79 100644 --- a/src/proto_017_PtNairob/lib_dal/test/dune +++ b/src/proto_017_PtNairob/lib_dal/test/dune @@ -11,7 +11,7 @@ tezos-protocol-017-PtNairob tezos-base-test-helpers tezos-017-PtNairob-test-helpers - octez-alcotezt) + tezos-017-PtNairob-test-helpers.alcotezt) (library_flags (:standard -linkall)) (flags (:standard) @@ -23,7 +23,7 @@ -open Tezos_protocol_017_PtNairob -open Tezos_base_test_helpers -open Tezos_017_PtNairob_test_helpers - -open Octez_alcotezt) + -open Tezos_017_PtNairob_test_helpers_alcotezt) (modules test_dal_slot_frame_encoding test_helpers)) (executable diff --git a/src/proto_017_PtNairob/lib_delegate/test/dune b/src/proto_017_PtNairob/lib_delegate/test/dune index 33a473dda4ed..e494fbe77276 100644 --- a/src/proto_017_PtNairob/lib_delegate/test/dune +++ b/src/proto_017_PtNairob/lib_delegate/test/dune @@ -15,7 +15,7 @@ tezos-baking-017-PtNairob tezos-protocol-017-PtNairob.parameters tezos-crypto - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt uri) (library_flags (:standard -linkall)) (flags @@ -30,7 +30,7 @@ -open Tezos_base_test_helpers -open Tezos_017_PtNairob_mockup_simulator -open Tezos_baking_017_PtNairob - -open Octez_alcotezt) + -open Tezos_017_PtNairob_test_helpers_alcotezt) (modules test_scenario)) (executable diff --git a/src/proto_017_PtNairob/lib_plugin/test/dune b/src/proto_017_PtNairob/lib_plugin/test/dune index b6870095abf3..89aeba02a189 100644 --- a/src/proto_017_PtNairob/lib_plugin/test/dune +++ b/src/proto_017_PtNairob/lib_plugin/test/dune @@ -9,7 +9,7 @@ tezos-base tezos-base-test-helpers tezos-base.unix - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt tezos-test-helpers qcheck-alcotest tezos-stdlib-unix @@ -26,7 +26,7 @@ -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base_test_helpers - -open Octez_alcotezt + -open Tezos_017_PtNairob_test_helpers_alcotezt -open Tezos_test_helpers -open Tezos_micheline -open Tezos_protocol_plugin_017_PtNairob 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 02b4e560515f..a6ee1e58128d 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/consensus/dune @@ -7,7 +7,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt tezos-base tezos-protocol-017-PtNairob tezos-017-PtNairob-test-helpers @@ -19,7 +19,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_017_PtNairob_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_017_PtNairob diff --git a/src/proto_017_PtNairob/lib_protocol/test/integration/dune b/src/proto_017_PtNairob/lib_protocol/test/integration/dune index b50e0da39c80..8ea8afacf128 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/dune @@ -8,7 +8,7 @@ tezt.core tezt tezos-context - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt tezos-base tezos-client-017-PtNairob tezos-protocol-017-PtNairob @@ -20,7 +20,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_017_PtNairob_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_client_017_PtNairob 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 7ea3a1758fa1..9389fa117368 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/gas/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/gas/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt tezos-base tezos-protocol-017-PtNairob tezos-017-PtNairob-test-helpers @@ -16,7 +16,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_017_PtNairob_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_017_PtNairob 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 3f792e161906..5f44a21bffa1 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/michelson/dune @@ -7,7 +7,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt tezos-base tezos-protocol-017-PtNairob tezos-017-PtNairob-test-helpers @@ -24,7 +24,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_017_PtNairob_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_017_PtNairob 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 a0d3ffd577a3..eeba8e4b95c5 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/operations/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/operations/dune @@ -7,7 +7,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt tezos-base tezos-protocol-017-PtNairob tezos-client-017-PtNairob @@ -19,7 +19,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_017_PtNairob_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_017_PtNairob 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 69f7236c7b9a..bb71dea2f657 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/integration/validate/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/integration/validate/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt tezos-base tezos-protocol-017-PtNairob qcheck-alcotest @@ -20,7 +20,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_017_PtNairob_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_017_PtNairob diff --git a/src/proto_017_PtNairob/lib_protocol/test/pbt/dune b/src/proto_017_PtNairob/lib_protocol/test/pbt/dune index bcada9c56f93..cbd262209758 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/pbt/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/pbt/dune @@ -13,7 +13,7 @@ tezos-context.merkle_proof_encoding tezos-test-helpers tezos-017-PtNairob-test-helpers - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt qcheck-alcotest tezos-benchmark tezos-benchmark-017-PtNairob @@ -33,7 +33,7 @@ -open Tezos_protocol_017_PtNairob -open Tezos_test_helpers -open Tezos_017_PtNairob_test_helpers - -open Octez_alcotezt + -open Tezos_017_PtNairob_test_helpers_alcotezt -open Tezos_benchmark_017_PtNairob -open Tezos_benchmark_type_inference_017_PtNairob -open Tezos_smart_rollup_017_PtNairob diff --git a/src/proto_017_PtNairob/lib_protocol/test/regression/dune b/src/proto_017_PtNairob/lib_protocol/test/regression/dune index fb784bb650fe..02b7a9f72c6f 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/regression/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/regression/dune @@ -12,7 +12,8 @@ tezos-client-017-PtNairob tezos-protocol-plugin-017-PtNairob tezos-017-PtNairob-test-helpers - tezos-micheline) + tezos-micheline + octez-protocol-alcotezt) (library_flags (:standard -linkall)) (flags (:standard) @@ -24,7 +25,8 @@ -open Tezos_client_017_PtNairob -open Tezos_protocol_plugin_017_PtNairob -open Tezos_017_PtNairob_test_helpers - -open Tezos_micheline) + -open Tezos_micheline + -open Octez_protocol_alcotezt) (modules test_logging)) (executable diff --git a/src/proto_017_PtNairob/lib_protocol/test/unit/dune b/src/proto_017_PtNairob/lib_protocol/test/unit/dune index 738d17f237a7..77d9ea40a183 100644 --- a/src/proto_017_PtNairob/lib_protocol/test/unit/dune +++ b/src/proto_017_PtNairob/lib_protocol/test/unit/dune @@ -17,7 +17,7 @@ tezos-protocol-017-PtNairob tezos-test-helpers tezos-017-PtNairob-test-helpers - octez-alcotezt + tezos-017-PtNairob-test-helpers.alcotezt tezos-scoru-wasm-helpers tezos-stdlib tezos-crypto-dal @@ -37,7 +37,7 @@ -open Tezos_protocol_017_PtNairob -open Tezos_test_helpers -open Tezos_017_PtNairob_test_helpers - -open Octez_alcotezt + -open Tezos_017_PtNairob_test_helpers_alcotezt -open Tezos_scoru_wasm_helpers -open Tezos_stdlib -open Tezos_crypto_dal diff --git a/src/proto_alpha/lib_dac_plugin/test/dune b/src/proto_alpha/lib_dac_plugin/test/dune index 3b4e454d6e25..ba0abe68ed4e 100644 --- a/src/proto_alpha/lib_dac_plugin/test/dune +++ b/src/proto_alpha/lib_dac_plugin/test/dune @@ -13,7 +13,7 @@ tezos-alpha-test-helpers tezos-dac-lib tezos_dac_node_lib - octez-alcotezt) + tezos-alpha-test-helpers.alcotezt) (library_flags (:standard -linkall)) (flags (:standard) @@ -27,7 +27,7 @@ -open Tezos_alpha_test_helpers -open Tezos_dac_lib -open Tezos_dac_node_lib - -open Octez_alcotezt) + -open Tezos_alpha_test_helpers_alcotezt) (modules test_dac_pages_encoding test_dac_plugin_registration test_helpers)) (executable diff --git a/src/proto_alpha/lib_dal/test/dune b/src/proto_alpha/lib_dal/test/dune index 2ba69866c9a5..052659d1e42a 100644 --- a/src/proto_alpha/lib_dal/test/dune +++ b/src/proto_alpha/lib_dal/test/dune @@ -11,7 +11,7 @@ tezos-protocol-alpha tezos-base-test-helpers tezos-alpha-test-helpers - octez-alcotezt) + tezos-alpha-test-helpers.alcotezt) (library_flags (:standard -linkall)) (flags (:standard) @@ -23,7 +23,7 @@ -open Tezos_protocol_alpha -open Tezos_base_test_helpers -open Tezos_alpha_test_helpers - -open Octez_alcotezt) + -open Tezos_alpha_test_helpers_alcotezt) (modules test_dal_slot_frame_encoding test_helpers)) (executable diff --git a/src/proto_alpha/lib_delegate/test/dune b/src/proto_alpha/lib_delegate/test/dune index 706b888e7f2f..29e4610e705c 100644 --- a/src/proto_alpha/lib_delegate/test/dune +++ b/src/proto_alpha/lib_delegate/test/dune @@ -15,7 +15,7 @@ tezos-baking-alpha tezos-protocol-alpha.parameters tezos-crypto - octez-alcotezt + tezos-alpha-test-helpers.alcotezt uri) (library_flags (:standard -linkall)) (flags @@ -30,7 +30,7 @@ -open Tezos_base_test_helpers -open Tezos_alpha_mockup_simulator -open Tezos_baking_alpha - -open Octez_alcotezt) + -open Tezos_alpha_test_helpers_alcotezt) (modules test_scenario)) (executable diff --git a/src/proto_alpha/lib_plugin/test/dune b/src/proto_alpha/lib_plugin/test/dune index 5cdafd3624a4..78055d66a7a0 100644 --- a/src/proto_alpha/lib_plugin/test/dune +++ b/src/proto_alpha/lib_plugin/test/dune @@ -9,7 +9,7 @@ tezos-base tezos-base-test-helpers tezos-base.unix - octez-alcotezt + tezos-alpha-test-helpers.alcotezt tezos-test-helpers qcheck-alcotest tezos-stdlib-unix @@ -26,7 +26,7 @@ -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base_test_helpers - -open Octez_alcotezt + -open Tezos_alpha_test_helpers_alcotezt -open Tezos_test_helpers -open Tezos_micheline -open Tezos_protocol_plugin_alpha diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/dune b/src/proto_alpha/lib_protocol/test/integration/consensus/dune index da75d5a3f0b5..8b92e289986c 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/dune +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-alpha-test-helpers.alcotezt tezos-base tezos-protocol-alpha tezos-alpha-test-helpers @@ -18,7 +18,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_alpha_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_protocol/test/integration/dune b/src/proto_alpha/lib_protocol/test/integration/dune index b6c3ac7dfcda..64080a553f16 100644 --- a/src/proto_alpha/lib_protocol/test/integration/dune +++ b/src/proto_alpha/lib_protocol/test/integration/dune @@ -8,7 +8,7 @@ tezt.core tezt tezos-context - octez-alcotezt + tezos-alpha-test-helpers.alcotezt tezos-base tezos-client-alpha tezos-protocol-alpha @@ -20,7 +20,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_alpha_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_client_alpha diff --git a/src/proto_alpha/lib_protocol/test/integration/gas/dune b/src/proto_alpha/lib_protocol/test/integration/gas/dune index 8af85ef19f2c..6f2b81974de8 100644 --- a/src/proto_alpha/lib_protocol/test/integration/gas/dune +++ b/src/proto_alpha/lib_protocol/test/integration/gas/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-alpha-test-helpers.alcotezt tezos-base tezos-protocol-alpha tezos-alpha-test-helpers @@ -16,7 +16,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_alpha_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/dune b/src/proto_alpha/lib_protocol/test/integration/michelson/dune index 86fa7880924f..5bcfe89917c3 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/dune +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-alpha-test-helpers.alcotezt tezos-base tezos-protocol-alpha tezos-alpha-test-helpers @@ -23,7 +23,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_alpha_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/dune b/src/proto_alpha/lib_protocol/test/integration/operations/dune index 3a1f9cd62dc2..65e1518dfbb8 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/dune +++ b/src/proto_alpha/lib_protocol/test/integration/operations/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-alpha-test-helpers.alcotezt tezos-base tezos-protocol-alpha tezos-client-alpha @@ -18,7 +18,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_alpha_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/dune b/src/proto_alpha/lib_protocol/test/integration/validate/dune index 712841be8ca4..e1427963c96e 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/dune +++ b/src/proto_alpha/lib_protocol/test/integration/validate/dune @@ -6,7 +6,7 @@ (instrumentation (backend bisect_ppx)) (libraries tezt.core - octez-alcotezt + tezos-alpha-test-helpers.alcotezt tezos-base tezos-protocol-alpha qcheck-alcotest @@ -20,7 +20,7 @@ (:standard) -open Tezt_core -open Tezt_core.Base - -open Octez_alcotezt + -open Tezos_alpha_test_helpers_alcotezt -open Tezos_base.TzPervasives -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_protocol/test/pbt/dune b/src/proto_alpha/lib_protocol/test/pbt/dune index cf9aa4066635..40ccdf23a3b8 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/dune +++ b/src/proto_alpha/lib_protocol/test/pbt/dune @@ -13,7 +13,7 @@ tezos-context.merkle_proof_encoding tezos-test-helpers tezos-alpha-test-helpers - octez-alcotezt + tezos-alpha-test-helpers.alcotezt qcheck-alcotest tezos-benchmark tezos-benchmark-alpha @@ -33,7 +33,7 @@ -open Tezos_protocol_alpha -open Tezos_test_helpers -open Tezos_alpha_test_helpers - -open Octez_alcotezt + -open Tezos_alpha_test_helpers_alcotezt -open Tezos_benchmark_alpha -open Tezos_benchmark_type_inference_alpha -open Tezos_smart_rollup_alpha diff --git a/src/proto_alpha/lib_protocol/test/unit/dune b/src/proto_alpha/lib_protocol/test/unit/dune index c1be5bf09ec9..dd1cd50edcad 100644 --- a/src/proto_alpha/lib_protocol/test/unit/dune +++ b/src/proto_alpha/lib_protocol/test/unit/dune @@ -17,7 +17,7 @@ tezos-protocol-alpha tezos-test-helpers tezos-alpha-test-helpers - octez-alcotezt + tezos-alpha-test-helpers.alcotezt tezos-scoru-wasm-helpers tezos-stdlib tezos-crypto-dal @@ -37,7 +37,7 @@ -open Tezos_protocol_alpha -open Tezos_test_helpers -open Tezos_alpha_test_helpers - -open Octez_alcotezt + -open Tezos_alpha_test_helpers_alcotezt -open Tezos_scoru_wasm_helpers -open Tezos_stdlib -open Tezos_crypto_dal -- GitLab From 24202ca987e37ccaaa46937e70d7d75e4a50f350 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 20 Mar 2023 12:40:01 +0100 Subject: [PATCH 09/12] src/proto_alpha: Remove hard-coded protocol prefixes from tests --- .../test/test_dac_pages_encoding.ml | 6 +- .../test/test_dac_plugin_registration.ml | 6 +- .../test/test_dal_slot_frame_encoding.ml | 6 +- .../lib_delegate/test/test_scenario.ml | 33 ++++--- .../lib_plugin/test/test_conflict_handler.ml | 2 +- .../lib_plugin/test/test_consensus_filter.ml | 2 +- .../lib_plugin/test/test_filter_state.ml | 5 +- .../lib_plugin/test/test_plugin.ml | 2 +- .../test/integration/consensus/test_main.ml | 27 +++--- .../test/integration/gas/test_main.ml | 4 +- .../test/integration/michelson/test_main.ml | 48 +++++----- .../test/integration/operations/test_main.ml | 25 +++--- .../test/integration/test_main.ml | 14 +-- .../test/integration/validate/test_main.ml | 14 ++- .../test/pbt/liquidity_baking_pbt.ml | 5 +- .../test/pbt/saturation_fuzzing.ml | 12 +-- .../lib_protocol/test/pbt/test_bitset.ml | 2 +- .../test/pbt/test_carbonated_map.ml | 2 +- .../test/pbt/test_compare_operations.ml | 4 +- .../test/pbt/test_dal_slot_proof.ml | 5 +- .../test/pbt/test_gas_properties.ml | 2 +- .../lib_protocol/test/pbt/test_merkle_list.ml | 4 +- .../test/pbt/test_operation_encoding.ml | 2 +- .../test/pbt/test_refutation_game.ml | 2 +- .../lib_protocol/test/pbt/test_sampler.ml | 5 +- .../test/pbt/test_sc_rollup_encoding.ml | 5 +- .../test/pbt/test_sc_rollup_inbox.ml | 5 +- .../test/pbt/test_sc_rollup_tick_repr.ml | 2 +- .../test/pbt/test_script_comparison.ml | 14 ++- .../lib_protocol/test/pbt/test_tez_repr.ml | 2 +- .../test/pbt/test_zk_rollup_encoding.ml | 4 +- .../lib_protocol/test/unit/test_main.ml | 90 ++++++------------- 32 files changed, 145 insertions(+), 216 deletions(-) diff --git a/src/proto_alpha/lib_dac_plugin/test/test_dac_pages_encoding.ml b/src/proto_alpha/lib_dac_plugin/test/test_dac_pages_encoding.ml index 2d1f0892fbc8..38e671ea0206 100644 --- a/src/proto_alpha/lib_dac_plugin/test/test_dac_pages_encoding.ml +++ b/src/proto_alpha/lib_dac_plugin/test/test_dac_pages_encoding.ml @@ -711,9 +711,5 @@ let () = Alcotest_lwt.run ~__FILE__ "protocol > unit" - [ - Test_helpers.Unit_test.spec - (Protocol.name ^ ": Dac_pages_encoding.ml") - tests; - ] + [Test_helpers.Unit_test.spec "Dac_pages_encoding.ml" tests] |> Lwt_main.run diff --git a/src/proto_alpha/lib_dac_plugin/test/test_dac_plugin_registration.ml b/src/proto_alpha/lib_dac_plugin/test/test_dac_plugin_registration.ml index cdab557320f4..ec696e4dd24f 100644 --- a/src/proto_alpha/lib_dac_plugin/test/test_dac_plugin_registration.ml +++ b/src/proto_alpha/lib_dac_plugin/test/test_dac_plugin_registration.ml @@ -154,9 +154,5 @@ let () = Alcotest_lwt.run ~__FILE__ "protocol > unit" - [ - Test_helpers.Unit_test.spec - (Protocol.name ^ ": Dac_plugin_registration.ml") - tests; - ] + [Test_helpers.Unit_test.spec "Dac_plugin_registration.ml" tests] |> Lwt_main.run diff --git a/src/proto_alpha/lib_dal/test/test_dal_slot_frame_encoding.ml b/src/proto_alpha/lib_dal/test/test_dal_slot_frame_encoding.ml index 775505cb992a..06595283de8b 100644 --- a/src/proto_alpha/lib_dal/test/test_dal_slot_frame_encoding.ml +++ b/src/proto_alpha/lib_dal/test/test_dal_slot_frame_encoding.ml @@ -415,9 +415,5 @@ let () = Alcotest_lwt.run ~__FILE__ "protocol > unit" - [ - Test_helpers.Unit_test.spec - (Protocol.name ^ ": Slot_framing_protocol.ml") - tests; - ] + [Test_helpers.Unit_test.spec "Slot_framing_protocol.ml" tests] |> Lwt_main.run diff --git a/src/proto_alpha/lib_delegate/test/test_scenario.ml b/src/proto_alpha/lib_delegate/test/test_scenario.ml index 667374a3718f..641c672544f8 100644 --- a/src/proto_alpha/lib_delegate/test/test_scenario.ml +++ b/src/proto_alpha/lib_delegate/test/test_scenario.ml @@ -1594,22 +1594,21 @@ let () = let open Tezos_base_test_helpers.Tztest in (title, [tztest title `Quick body])) [ - (Protocol.name ^ ": reaches level 5", test_level_5); - ( Protocol.name ^ ": cannot progress without new head", - test_preendorse_on_valid ); - (Protocol.name ^ ": reset delayed pqc", test_reset_delayed_pqc); - (Protocol.name ^ ": scenario t1", test_scenario_t1); - (Protocol.name ^ ": scenario t2", test_scenario_t2); - (Protocol.name ^ ": scenario t3", test_scenario_t3); - (Protocol.name ^ ": scenario f1", test_scenario_f1); - (Protocol.name ^ ": scenario f2", test_scenario_f2); - (Protocol.name ^ ": scenario m1", test_scenario_m1); - (Protocol.name ^ ": scenario m2", test_scenario_m2); - (Protocol.name ^ ": scenario m3", test_scenario_m3); - (Protocol.name ^ ": scenario m4", test_scenario_m4); - (Protocol.name ^ ": scenario m5", test_scenario_m5); - (Protocol.name ^ ": scenario m6", test_scenario_m6); - (Protocol.name ^ ": scenario m7", test_scenario_m7); - (Protocol.name ^ ": scenario m8", test_scenario_m8); + ("reaches level 5", test_level_5); + ("cannot progress without new head", test_preendorse_on_valid); + ("reset delayed pqc", test_reset_delayed_pqc); + ("scenario t1", test_scenario_t1); + ("scenario t2", test_scenario_t2); + ("scenario t3", test_scenario_t3); + ("scenario f1", test_scenario_f1); + ("scenario f2", test_scenario_f2); + ("scenario m1", test_scenario_m1); + ("scenario m2", test_scenario_m2); + ("scenario m3", test_scenario_m3); + ("scenario m4", test_scenario_m4); + ("scenario m5", test_scenario_m5); + ("scenario m6", test_scenario_m6); + ("scenario m7", test_scenario_m7); + ("scenario m8", test_scenario_m8); ] |> Lwt_main.run diff --git a/src/proto_alpha/lib_plugin/test/test_conflict_handler.ml b/src/proto_alpha/lib_plugin/test/test_conflict_handler.ml index 7ca63242579e..40f307622c2d 100644 --- a/src/proto_alpha/lib_plugin/test/test_conflict_handler.ml +++ b/src/proto_alpha/lib_plugin/test/test_conflict_handler.ml @@ -263,7 +263,7 @@ let () = ~__FILE__ "conflict_handler" [ - ( Protocol.name ^ ": conflict_handler", + ( "conflict_handler", [ Tztest.tztest "Random operations (not both manager)" diff --git a/src/proto_alpha/lib_plugin/test/test_consensus_filter.ml b/src/proto_alpha/lib_plugin/test/test_consensus_filter.ml index 1445191ab587..d467b88706d6 100644 --- a/src/proto_alpha/lib_plugin/test/test_consensus_filter.ml +++ b/src/proto_alpha/lib_plugin/test/test_consensus_filter.ml @@ -436,7 +436,7 @@ let () = ~__FILE__ "Filter" [ - ( Protocol.name ^ ": pre_filter", + ( "pre_filter", qcheck_wrap [ test_acceptable_past_level; diff --git a/src/proto_alpha/lib_plugin/test/test_filter_state.ml b/src/proto_alpha/lib_plugin/test/test_filter_state.ml index 646e8f5b37dc..d333281ae10f 100644 --- a/src/proto_alpha/lib_plugin/test/test_filter_state.ml +++ b/src/proto_alpha/lib_plugin/test/test_filter_state.ml @@ -188,7 +188,6 @@ let () = ~__FILE__ "Filter_state" [ - (Protocol.name ^ ": add_manager_op", qcheck_wrap [test_add_manager_op]); - ( Protocol.name ^ ": remove", - qcheck_wrap [test_remove_present; test_remove_unknown] ); + ("add_manager_op", qcheck_wrap [test_add_manager_op]); + ("remove", qcheck_wrap [test_remove_present; test_remove_unknown]); ] diff --git a/src/proto_alpha/lib_plugin/test/test_plugin.ml b/src/proto_alpha/lib_plugin/test/test_plugin.ml index ea5fa5efdf15..420ac1dc4999 100644 --- a/src/proto_alpha/lib_plugin/test/test_plugin.ml +++ b/src/proto_alpha/lib_plugin/test/test_plugin.ml @@ -72,7 +72,7 @@ let () = ~__FILE__ "Plugin" [ - ( Protocol.name ^ ": on_flush", + ( "on_flush", [ Tztest.tztest "[on_flush ~validation_state ...] yields an empty state " 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 index 7e4523930be7..5d8adb3c8a77 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_main.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_main.ml @@ -35,19 +35,18 @@ let () = ~__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); + ("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); ] |> 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 index c5bb194a1416..997b1ba7049c 100644 --- a/src/proto_alpha/lib_protocol/test/integration/gas/test_main.ml +++ b/src/proto_alpha/lib_protocol/test/integration/gas/test_main.ml @@ -35,7 +35,7 @@ let () = ~__FILE__ "protocol > integration > gas" [ - (Protocol.name ^ ": gas levels", Test_gas_levels.tests); - (Protocol.name ^ ": gas cost functions", Test_gas_costs.tests); + ("gas levels", Test_gas_levels.tests); + ("gas cost functions", Test_gas_costs.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 index 082975311139..f65ed6fbedfb 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_main.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_main.ml @@ -35,31 +35,27 @@ let () = ~__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 ^ ": timelock", Test_timelock.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); + ("global table of constants", Test_global_constants_storage.tests); + ("interpretation", Test_interpretation.tests); + ("lazy storage diff", Test_lazy_storage_diff.tests); + ("sapling", Test_sapling.tests); + ("script typed ir size", Test_script_typed_ir_size.tests); + ("temp big maps", Test_temp_big_maps.tests); + ("ticket balance key", Test_ticket_balance_key.tests); + ("ticket scanner", Test_ticket_scanner.tests); + ("ticket storage", Test_ticket_storage.tests); + ("ticket lazy storage diff", Test_ticket_lazy_storage_diff.tests); + ("ticket operations diff", Test_ticket_operations_diff.tests); + ("ticket accounting", Test_ticket_accounting.tests); + ("ticket balance", Test_ticket_balance.tests); + ("ticket manager", Test_ticket_manager.tests); + ("timelock", Test_timelock.tests); + ("typechecking", Test_typechecking.tests); + ("script cache", Test_script_cache.tests); + ("block time instructions", Test_block_time_instructions.tests); + ("annotations", Test_annotations.tests); + ("event logging", Test_contract_event.tests); + ("patched contracts", Test_patched_contracts.tests); + ("lambda normalization", Test_lambda_normalization.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 index d63ba82de880..394caad30cc8 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_main.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_main.ml @@ -35,18 +35,17 @@ let () = ~__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); + ("voting", Test_voting.tests); + ("origination", Test_origination.tests); + ("revelation", Test_reveal.tests); + ("transfer", Test_transfer.tests); + ("activation", Test_activation.tests); + ("paid storage increase", Test_paid_storage_increase.tests); + ("combined", Test_combined_operations.tests); + ("failing_noop operation", Test_failing_noop.tests); + ("sc rollup", Test_sc_rollup.tests); + ("sc rollup transfer", Test_sc_rollup_transfer.tests); + ("zk rollup", Test_zk_rollup.tests); + ("transfer ticket", Test_transfer_ticket.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 index 4ba3dd6d77d4..248c4260221d 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_main.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_main.ml @@ -35,12 +35,12 @@ let () = ~__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); - (Protocol.name ^ ": sc rollup wasm", Test_sc_rollup_wasm.tests); + ("constants", Test_constants.tests); + ("liquidity baking", Test_liquidity_baking.tests); + ("storage description", Test_storage.tests); + ("storage tests", Test_storage_functions.tests); + ("token movements", Test_token.tests); + ("frozen bonds", Test_frozen_bonds.tests); + ("sc rollup wasm", Test_sc_rollup_wasm.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 index 031eadd44399..c80a95b018bf 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_main.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/test_main.ml @@ -35,13 +35,11 @@ let () = ~__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); + ("sanity checks", Test_sanity.tests); + ("mempool", Test_mempool.tests); + ("single manager validation", Test_manager_operation_validation.tests); + ("batched managers validation", Test_validation_batch.tests); + ("one-manager restriction", Test_1m_restriction.tests); + ("covalidity", Test_covalidity.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 f1a80e207cb7..41e7f38ef095 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 @@ -321,7 +321,6 @@ let () = ~__FILE__ "protocol > pbt > liquidity baking" [ - ( 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 12c54af32b5c..e6360ed7be52 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/saturation_fuzzing.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/saturation_fuzzing.ml @@ -192,10 +192,10 @@ let () = ~__FILE__ "protocol > pbt > saturation" [ - (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 dcb57ea9c953..69711dbd89d3 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml @@ -97,7 +97,7 @@ let () = ~__FILE__ "bits" [ - ( Protocol.name ^ ": quantity", + ( "quantity", qcheck_wrap [ QCheck2.Test.make 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 797fbfde0d9f..04d29a0df559 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 @@ -547,4 +547,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > carbonated map" - [(Protocol.name ^ ": Carbonated map", tests ~rand)] + [("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 97d862a2e9c5..55b386ce2a5e 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 @@ -98,6 +98,4 @@ let () = Alcotest.run ~__FILE__ "Compare operations" - [ - (Protocol.name ^ ": Compare_operations", Qcheck2_helpers.qcheck_wrap tests); - ] + [("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 8072df01b76c..680cf7d07583 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 @@ -252,8 +252,5 @@ let () = let dal_parameters = constants_test.dal end) in - Alcotest_lwt.run - ~__FILE__ - (Protocol.name ^ ": Dal slots refutation game") - Test.tests + Alcotest_lwt.run ~__FILE__ "Dal slots refutation game" Test.tests |> Lwt_main.run 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 ca9d505ab698..9f89456827ad 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 @@ -143,4 +143,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > gas" - [(Protocol.name ^ ": gas properties", qcheck_wrap tests)] + [("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 56c824bd1ca6..03f10758db51 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 @@ -113,13 +113,13 @@ let () = ~__FILE__ "Merkle list" [ - ( 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 08bd36fcfcea..aa78dcf78d19 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 @@ -63,4 +63,4 @@ let () = Alcotest.run ~__FILE__ "Operation_encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap [test_operation])] + [("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 7f0a6b92c670..058c99ed2e89 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 @@ -1802,4 +1802,4 @@ let tests = let tests = [tests; Dissection.tests] -let () = Alcotest.run ~__FILE__ (Protocol.name ^ ": Refutation_game") tests +let () = Alcotest.run ~__FILE__ "Refutation_game" tests 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 e1c507d1f5dd..da8ca6b5cd14 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_sampler.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_sampler.ml @@ -267,7 +267,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > sampling" - [ - ( Protocol.name ^ ": sampling", - qcheck_wrap [alias_float_test; alias_z_test] ); - ] + [("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 51f7d0f32046..ca6109e84e1a 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 @@ -290,7 +290,4 @@ let tests = ] let () = - Alcotest.run - ~__FILE__ - "SC rollup encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap tests)] + Alcotest.run ~__FILE__ "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 58f36f75288b..1e65af134b23 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 @@ -74,7 +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)] + Alcotest.run ~__FILE__ "Smart rollup inbox" [("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 fd09d78ec0d9..10db1f2c255a 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 @@ -106,4 +106,4 @@ let () = Alcotest.run ~__FILE__ "Tick_repr" - [(Protocol.name ^ ": Tick_repr", Qcheck2_helpers.qcheck_wrap tests)] + [("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 74c16fe5d08b..d2016c98e01e 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 @@ -345,12 +345,10 @@ let () = ~__FILE__ "protocol > pbt > script_comparison" [ - ( 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 167d79de53e3..2a2c0be49df9 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 @@ -133,4 +133,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > tez_repr" - [(Protocol.name ^ ": Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] + [("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 8db8cd119c4c..d40128fb6846 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 @@ -224,6 +224,6 @@ let () = ~__FILE__ "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/test_main.ml b/src/proto_alpha/lib_protocol/test/unit/test_main.ml index 2e1e0906871f..eaaa6eec9582 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_main.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_main.ml @@ -50,69 +50,37 @@ let () = ~__FILE__ "protocol > unit" [ - Unit_test.spec (Protocol.name ^ ": Tez_repr.ml") Test_tez_repr.tests; + Unit_test.spec "Tez_repr.ml" Test_tez_repr.tests; + Unit_test.spec "Contract_repr.ml" Test_contract_repr.tests; + Unit_test.spec "Destination_repr.ml" Test_destination_repr.tests; + Unit_test.spec "Operation_repr.ml" Test_operation_repr.tests; Unit_test.spec - (Protocol.name ^ ": Contract_repr.ml") - Test_contract_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Destination_repr.ml") - Test_destination_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Operation_repr.ml") - Test_operation_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Global_constants_storage.ml") + "Global_constants_storage.ml" Test_global_constants_storage.tests; - Unit_test.spec (Protocol.name ^ ": fitness") Test_fitness.tests; - Unit_test.spec - (Protocol.name ^ ": fixed point computation") - Test_fixed_point.tests; - Unit_test.spec (Protocol.name ^ ": level module") Test_level_module.tests; - Unit_test.spec (Protocol.name ^ ": qty") Test_qty.tests; - Unit_test.spec (Protocol.name ^ ": round") Test_round_repr.tests; - Unit_test.spec (Protocol.name ^ ": time") Test_time_repr.tests; - Unit_test.spec (Protocol.name ^ ": receipt encodings") Test_receipt.tests; - Unit_test.spec - (Protocol.name ^ ": saturation arithmetic") - Test_saturation.tests; - Unit_test.spec (Protocol.name ^ ": gas monad") Test_gas_monad.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup storage") - Test_sc_rollup_storage.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup game") - Test_sc_rollup_game.tests; - Unit_test.spec - (Protocol.name ^ ": liquidity baking") - Test_liquidity_baking_repr.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup wasm") - Test_sc_rollup_wasm.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup arith") - Test_sc_rollup_arith.tests; - Unit_test.spec (Protocol.name ^ ": merkle list") Test_merkle_list.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup inbox") - Test_sc_rollup_inbox.tests; - Unit_test.spec (Protocol.name ^ ": skip list") Test_skip_list_repr.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup management protocol") + Unit_test.spec "fitness" Test_fitness.tests; + Unit_test.spec "fixed point computation" Test_fixed_point.tests; + Unit_test.spec "level module" Test_level_module.tests; + Unit_test.spec "qty" Test_qty.tests; + Unit_test.spec "round" Test_round_repr.tests; + Unit_test.spec "time" Test_time_repr.tests; + Unit_test.spec "receipt encodings" Test_receipt.tests; + Unit_test.spec "saturation arithmetic" Test_saturation.tests; + Unit_test.spec "gas monad" Test_gas_monad.tests; + Unit_test.spec "sc rollup storage" Test_sc_rollup_storage.tests; + Unit_test.spec "sc rollup game" Test_sc_rollup_game.tests; + Unit_test.spec "liquidity baking" Test_liquidity_baking_repr.tests; + Unit_test.spec "sc rollup wasm" Test_sc_rollup_wasm.tests; + Unit_test.spec "sc rollup arith" Test_sc_rollup_arith.tests; + Unit_test.spec "merkle list" Test_merkle_list.tests; + Unit_test.spec "sc rollup inbox" Test_sc_rollup_inbox.tests; + Unit_test.spec "skip list" Test_skip_list_repr.tests; + Unit_test.spec + "sc rollup management protocol" Test_sc_rollup_management_protocol.tests; - Unit_test.spec - (Protocol.name ^ ": Bond_id_repr.ml") - Test_bond_id_repr.tests; - Unit_test.spec - (Protocol.name ^ ": zk rollup storage") - Test_zk_rollup_storage.tests; - Unit_test.spec - (Protocol.name ^ ": Delegate_consensus_key.ml") - Test_consensus_key.tests; - Unit_test.spec - (Protocol.name ^ ": local_contexts") - Test_local_contexts.tests; - Unit_test.spec - (Protocol.name ^ ": dal slot proof") - Test_dal_slot_proof.tests; + Unit_test.spec "Bond_id_repr.ml" Test_bond_id_repr.tests; + Unit_test.spec "zk rollup storage" Test_zk_rollup_storage.tests; + Unit_test.spec "Delegate_consensus_key.ml" Test_consensus_key.tests; + Unit_test.spec "local_contexts" Test_local_contexts.tests; + Unit_test.spec "dal slot proof" Test_dal_slot_proof.tests; ] |> Lwt_main.run -- GitLab From 1d0b60dfe675515d8637348b2b9a40de5ee48cd9 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 20 Mar 2023 12:44:44 +0100 Subject: [PATCH 10/12] src/proto_016: Remove hard-coded protocol prefixes from tests --- .../test/test_dal_slot_frame_encoding.ml | 6 +- .../lib_delegate/test/test_scenario.ml | 33 ++++--- .../lib_plugin/test/test_conflict_handler.ml | 2 +- .../lib_plugin/test/test_consensus_filter.ml | 2 +- .../lib_plugin/test/test_filter_state.ml | 5 +- .../lib_plugin/test/test_plugin.ml | 2 +- .../test/integration/consensus/test_main.ml | 27 +++--- .../test/integration/gas/test_main.ml | 4 +- .../test/integration/michelson/test_main.ml | 48 +++++----- .../test/integration/operations/test_main.ml | 27 +++--- .../test/integration/test_main.ml | 14 +-- .../test/integration/validate/test_main.ml | 14 ++- .../test/pbt/liquidity_baking_pbt.ml | 5 +- .../test/pbt/saturation_fuzzing.ml | 12 +-- .../lib_protocol/test/pbt/test_bitset.ml | 2 +- .../test/pbt/test_carbonated_map.ml | 2 +- .../test/pbt/test_compare_operations.ml | 4 +- .../test/pbt/test_dal_slot_proof.ml | 5 +- .../test/pbt/test_gas_properties.ml | 2 +- .../lib_protocol/test/pbt/test_merkle_list.ml | 4 +- .../test/pbt/test_operation_encoding.ml | 2 +- .../test/pbt/test_refutation_game.ml | 2 +- .../lib_protocol/test/pbt/test_sampler.ml | 5 +- .../test/pbt/test_sc_rollup_encoding.ml | 5 +- .../test/pbt/test_sc_rollup_tick_repr.ml | 2 +- .../test/pbt/test_script_comparison.ml | 14 ++- .../lib_protocol/test/pbt/test_tez_repr.ml | 2 +- .../test/pbt/test_tx_rollup_l2_encoding.ml | 4 +- .../test/pbt/test_zk_rollup_encoding.ml | 4 +- .../lib_protocol/test/unit/test_main.ml | 96 ++++++------------- 30 files changed, 147 insertions(+), 209 deletions(-) diff --git a/src/proto_016_PtMumbai/lib_dal/test/test_dal_slot_frame_encoding.ml b/src/proto_016_PtMumbai/lib_dal/test/test_dal_slot_frame_encoding.ml index dc1f4bad73c6..5db2855c19d2 100644 --- a/src/proto_016_PtMumbai/lib_dal/test/test_dal_slot_frame_encoding.ml +++ b/src/proto_016_PtMumbai/lib_dal/test/test_dal_slot_frame_encoding.ml @@ -415,9 +415,5 @@ let () = Alcotest_lwt.run ~__FILE__ "protocol > unit" - [ - Test_helpers.Unit_test.spec - (Protocol.name ^ ": Slot_framing_protocol.ml") - tests; - ] + [Test_helpers.Unit_test.spec "Slot_framing_protocol.ml" tests] |> Lwt_main.run 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 3d4c86686331..3a959f5bc615 100644 --- a/src/proto_016_PtMumbai/lib_delegate/test/test_scenario.ml +++ b/src/proto_016_PtMumbai/lib_delegate/test/test_scenario.ml @@ -1594,22 +1594,21 @@ let () = let open Tezos_base_test_helpers.Tztest in (title, [tztest title `Quick body])) [ - (Protocol.name ^ ": reaches level 5", test_level_5); - ( Protocol.name ^ ": cannot progress without new head", - test_preendorse_on_valid ); - (Protocol.name ^ ": reset delayed pqc", test_reset_delayed_pqc); - (Protocol.name ^ ": scenario t1", test_scenario_t1); - (Protocol.name ^ ": scenario t2", test_scenario_t2); - (Protocol.name ^ ": scenario t3", test_scenario_t3); - (Protocol.name ^ ": scenario f1", test_scenario_f1); - (Protocol.name ^ ": scenario f2", test_scenario_f2); - (Protocol.name ^ ": scenario m1", test_scenario_m1); - (Protocol.name ^ ": scenario m2", test_scenario_m2); - (Protocol.name ^ ": scenario m3", test_scenario_m3); - (Protocol.name ^ ": scenario m4", test_scenario_m4); - (Protocol.name ^ ": scenario m5", test_scenario_m5); - (Protocol.name ^ ": scenario m6", test_scenario_m6); - (Protocol.name ^ ": scenario m7", test_scenario_m7); - (Protocol.name ^ ": scenario m8", test_scenario_m8); + ("reaches level 5", test_level_5); + ("cannot progress without new head", test_preendorse_on_valid); + ("reset delayed pqc", test_reset_delayed_pqc); + ("scenario t1", test_scenario_t1); + ("scenario t2", test_scenario_t2); + ("scenario t3", test_scenario_t3); + ("scenario f1", test_scenario_f1); + ("scenario f2", test_scenario_f2); + ("scenario m1", test_scenario_m1); + ("scenario m2", test_scenario_m2); + ("scenario m3", test_scenario_m3); + ("scenario m4", test_scenario_m4); + ("scenario m5", test_scenario_m5); + ("scenario m6", test_scenario_m6); + ("scenario m7", test_scenario_m7); + ("scenario m8", test_scenario_m8); ] |> Lwt_main.run diff --git a/src/proto_016_PtMumbai/lib_plugin/test/test_conflict_handler.ml b/src/proto_016_PtMumbai/lib_plugin/test/test_conflict_handler.ml index d1c17855c5a6..dfaf9ba7283e 100644 --- a/src/proto_016_PtMumbai/lib_plugin/test/test_conflict_handler.ml +++ b/src/proto_016_PtMumbai/lib_plugin/test/test_conflict_handler.ml @@ -263,7 +263,7 @@ let () = ~__FILE__ "conflict_handler" [ - ( Protocol.name ^ ": conflict_handler", + ( "conflict_handler", [ Tztest.tztest "Random operations (not both manager)" diff --git a/src/proto_016_PtMumbai/lib_plugin/test/test_consensus_filter.ml b/src/proto_016_PtMumbai/lib_plugin/test/test_consensus_filter.ml index 1445191ab587..d467b88706d6 100644 --- a/src/proto_016_PtMumbai/lib_plugin/test/test_consensus_filter.ml +++ b/src/proto_016_PtMumbai/lib_plugin/test/test_consensus_filter.ml @@ -436,7 +436,7 @@ let () = ~__FILE__ "Filter" [ - ( Protocol.name ^ ": pre_filter", + ( "pre_filter", qcheck_wrap [ test_acceptable_past_level; diff --git a/src/proto_016_PtMumbai/lib_plugin/test/test_filter_state.ml b/src/proto_016_PtMumbai/lib_plugin/test/test_filter_state.ml index b5e13fdb6947..8719292ba8aa 100644 --- a/src/proto_016_PtMumbai/lib_plugin/test/test_filter_state.ml +++ b/src/proto_016_PtMumbai/lib_plugin/test/test_filter_state.ml @@ -188,7 +188,6 @@ let () = ~__FILE__ "Filter_state" [ - (Protocol.name ^ ": add_manager_op", qcheck_wrap [test_add_manager_op]); - ( Protocol.name ^ ": remove", - qcheck_wrap [test_remove_present; test_remove_unknown] ); + ("add_manager_op", qcheck_wrap [test_add_manager_op]); + ("remove", qcheck_wrap [test_remove_present; test_remove_unknown]); ] diff --git a/src/proto_016_PtMumbai/lib_plugin/test/test_plugin.ml b/src/proto_016_PtMumbai/lib_plugin/test/test_plugin.ml index d139236a13a3..afd3b19c5cd9 100644 --- a/src/proto_016_PtMumbai/lib_plugin/test/test_plugin.ml +++ b/src/proto_016_PtMumbai/lib_plugin/test/test_plugin.ml @@ -72,7 +72,7 @@ let () = ~__FILE__ "Plugin" [ - ( Protocol.name ^ ": on_flush", + ( "on_flush", [ Tztest.tztest "[on_flush ~validation_state ...] yields an empty state " 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 index e5341ec77bb0..879aaba8faed 100644 --- 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 @@ -35,19 +35,18 @@ let () = ~__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); + ("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); ] |> 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 index 1cad429b1353..466ec8a9b063 100644 --- 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 @@ -35,7 +35,7 @@ let () = ~__FILE__ "protocol > integration > gas" [ - (Protocol.name ^ ": gas levels", Test_gas_levels.tests); - (Protocol.name ^ ": gas cost functions", Test_gas_costs.tests); + ("gas levels", Test_gas_levels.tests); + ("gas cost functions", Test_gas_costs.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 index 001c43de6c48..217d9292ba20 100644 --- 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 @@ -35,31 +35,27 @@ let () = ~__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 ^ ": timelock", Test_timelock.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); + ("global table of constants", Test_global_constants_storage.tests); + ("interpretation", Test_interpretation.tests); + ("lazy storage diff", Test_lazy_storage_diff.tests); + ("sapling", Test_sapling.tests); + ("script typed ir size", Test_script_typed_ir_size.tests); + ("temp big maps", Test_temp_big_maps.tests); + ("ticket balance key", Test_ticket_balance_key.tests); + ("ticket scanner", Test_ticket_scanner.tests); + ("ticket storage", Test_ticket_storage.tests); + ("ticket lazy storage diff", Test_ticket_lazy_storage_diff.tests); + ("ticket operations diff", Test_ticket_operations_diff.tests); + ("ticket accounting", Test_ticket_accounting.tests); + ("ticket balance", Test_ticket_balance.tests); + ("ticket manager", Test_ticket_manager.tests); + ("timelock", Test_timelock.tests); + ("typechecking", Test_typechecking.tests); + ("script cache", Test_script_cache.tests); + ("block time instructions", Test_block_time_instructions.tests); + ("annotations", Test_annotations.tests); + ("event logging", Test_contract_event.tests); + ("patched contracts", Test_patched_contracts.tests); + ("lambda normalization", Test_lambda_normalization.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 index dcb9b02326ef..b03b03f73f3c 100644 --- 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 @@ -35,19 +35,18 @@ let () = ~__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); + ("voting", Test_voting.tests); + ("origination", Test_origination.tests); + ("revelation", Test_reveal.tests); + ("transfer", Test_transfer.tests); + ("activation", Test_activation.tests); + ("paid storage increase", Test_paid_storage_increase.tests); + ("combined", Test_combined_operations.tests); + ("failing_noop operation", Test_failing_noop.tests); + ("tx rollup", Test_tx_rollup.tests); + ("sc rollup", Test_sc_rollup.tests); + ("sc rollup transfer", Test_sc_rollup_transfer.tests); + ("zk rollup", Test_zk_rollup.tests); + ("transfer ticket", Test_transfer_ticket.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 index 6e0d58de57ab..d33a670ae8d8 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/integration/test_main.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/integration/test_main.ml @@ -35,12 +35,12 @@ let () = ~__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); - (Protocol.name ^ ": sc rollup wasm", Test_sc_rollup_wasm.tests); + ("constants", Test_constants.tests); + ("liquidity baking", Test_liquidity_baking.tests); + ("storage description", Test_storage.tests); + ("storage tests", Test_storage_functions.tests); + ("token movements", Test_token.tests); + ("frozen bonds", Test_frozen_bonds.tests); + ("sc rollup wasm", Test_sc_rollup_wasm.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 index f4b9908fd886..c065057e21b7 100644 --- 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 @@ -35,13 +35,11 @@ let () = ~__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); + ("sanity checks", Test_sanity.tests); + ("mempool", Test_mempool.tests); + ("single manager validation", Test_manager_operation_validation.tests); + ("batched managers validation", Test_validation_batch.tests); + ("one-manager restriction", Test_1m_restriction.tests); + ("covalidity", Test_covalidity.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 6eb71eb3d7bf..78b0222ddc89 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 @@ -321,7 +321,6 @@ let () = ~__FILE__ "protocol > pbt > liquidity baking" [ - ( 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 d18d88741a79..62ef4773a5f1 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 @@ -192,10 +192,10 @@ let () = ~__FILE__ "protocol > pbt > saturation" [ - (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 2adf84a1978a..89315cc7f66b 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 @@ -99,7 +99,7 @@ let () = ~__FILE__ "bits" [ - ( Protocol.name ^ ": quantity", + ( "quantity", qcheck_wrap [ QCheck2.Test.make 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 ce22c3c42008..66828cb9b6d4 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 @@ -551,4 +551,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > carbonated map" - [(Protocol.name ^ ": Carbonated map", tests ~rand)] + [("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 1512fa32bc6d..b6a777e51508 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 @@ -98,6 +98,4 @@ let () = Alcotest.run ~__FILE__ "Compare operations" - [ - (Protocol.name ^ ": Compare_operations", Qcheck2_helpers.qcheck_wrap tests); - ] + [("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 5e1a35744d5a..f71e9511752a 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 @@ -219,8 +219,5 @@ let () = let dal_parameters = constants_test.dal end) in - Alcotest_lwt.run - ~__FILE__ - (Protocol.name ^ ": Dal slots refutation game") - Test.tests + Alcotest_lwt.run ~__FILE__ "Dal slots refutation game" Test.tests |> Lwt_main.run 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 9ec8f40e2d8f..f89e55d27842 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 @@ -143,4 +143,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > gas" - [(Protocol.name ^ ": gas properties", qcheck_wrap tests)] + [("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 6c47f0582bb0..5f07910c1661 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 @@ -113,13 +113,13 @@ let () = ~__FILE__ "Merkle list" [ - ( 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 3e86031acca1..8ac396d232b4 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 @@ -63,4 +63,4 @@ let () = Alcotest.run ~__FILE__ "Operation_encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap [test_operation])] + [("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 5883c3aab5d2..ec2f35d8037e 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 @@ -1830,4 +1830,4 @@ let tests = let tests = [tests; Dissection.tests] -let () = Alcotest.run ~__FILE__ (Protocol.name ^ ": Refutation_game") tests +let () = Alcotest.run ~__FILE__ "Refutation_game" tests 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 cd2b634592f8..6d7873b50f36 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 @@ -267,7 +267,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > sampling" - [ - ( Protocol.name ^ ": sampling", - qcheck_wrap [alias_float_test; alias_z_test] ); - ] + [("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 998d8ab4d6cc..a5cf5a3bb6ee 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 @@ -288,7 +288,4 @@ let tests = ] let () = - Alcotest.run - ~__FILE__ - "SC rollup encoding" - [(Protocol.name ^ ": roundtrip", qcheck_wrap tests)] + Alcotest.run ~__FILE__ "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 9f556f905684..7326e3ebbfe5 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 @@ -106,4 +106,4 @@ let () = Alcotest.run ~__FILE__ "Tick_repr" - [(Protocol.name ^ ": Tick_repr", Qcheck2_helpers.qcheck_wrap tests)] + [("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 64f5e8550195..da6f7ff0b743 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 @@ -346,12 +346,10 @@ let () = ~__FILE__ "protocol > pbt > script_comparison" [ - ( 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 b08c2775fee3..2f98491636e4 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 @@ -133,4 +133,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > tez_repr" - [(Protocol.name ^ ": Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] + [("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 9c78e11d4f9c..29a70b09ddb0 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 @@ -280,8 +280,8 @@ let () = ~__FILE__ "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 fa638fffe4b7..31b91dafa3ca 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 @@ -224,6 +224,6 @@ let () = ~__FILE__ "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/test_main.ml b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_main.ml index 868fd9e59e64..155be56bb775 100644 --- a/src/proto_016_PtMumbai/lib_protocol/test/unit/test_main.ml +++ b/src/proto_016_PtMumbai/lib_protocol/test/unit/test_main.ml @@ -50,73 +50,39 @@ let () = ~__FILE__ "protocol > unit" [ - Unit_test.spec (Protocol.name ^ ": Tez_repr.ml") Test_tez_repr.tests; + Unit_test.spec "Tez_repr.ml" Test_tez_repr.tests; + Unit_test.spec "Contract_repr.ml" Test_contract_repr.tests; + Unit_test.spec "Destination_repr.ml" Test_destination_repr.tests; + Unit_test.spec "Operation_repr.ml" Test_operation_repr.tests; Unit_test.spec - (Protocol.name ^ ": Contract_repr.ml") - Test_contract_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Destination_repr.ml") - Test_destination_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Operation_repr.ml") - Test_operation_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Global_constants_storage.ml") + "Global_constants_storage.ml" Test_global_constants_storage.tests; - Unit_test.spec (Protocol.name ^ ": fitness") Test_fitness.tests; - Unit_test.spec - (Protocol.name ^ ": fixed point computation") - Test_fixed_point.tests; - Unit_test.spec (Protocol.name ^ ": level module") Test_level_module.tests; - Unit_test.spec (Protocol.name ^ ": qty") Test_qty.tests; - Unit_test.spec (Protocol.name ^ ": round") Test_round_repr.tests; - Unit_test.spec (Protocol.name ^ ": time") Test_time_repr.tests; - Unit_test.spec (Protocol.name ^ ": receipt encodings") Test_receipt.tests; - Unit_test.spec - (Protocol.name ^ ": saturation arithmetic") - Test_saturation.tests; - Unit_test.spec (Protocol.name ^ ": gas monad") Test_gas_monad.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup storage") - Test_sc_rollup_storage.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup game") - Test_sc_rollup_game.tests; - Unit_test.spec (Protocol.name ^ ": tx rollup l2") Test_tx_rollup_l2.tests; - Unit_test.spec - (Protocol.name ^ ": tx rollup l2 apply") - Test_tx_rollup_l2_apply.tests; - Unit_test.spec - (Protocol.name ^ ": liquidity baking") - Test_liquidity_baking_repr.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup wasm") - Test_sc_rollup_wasm.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup arith") - Test_sc_rollup_arith.tests; - Unit_test.spec (Protocol.name ^ ": merkle list") Test_merkle_list.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup inbox") - Test_sc_rollup_inbox.tests; - Unit_test.spec (Protocol.name ^ ": skip list") Test_skip_list_repr.tests; - Unit_test.spec - (Protocol.name ^ ": sc rollup management protocol") + Unit_test.spec "fitness" Test_fitness.tests; + Unit_test.spec "fixed point computation" Test_fixed_point.tests; + Unit_test.spec "level module" Test_level_module.tests; + Unit_test.spec "qty" Test_qty.tests; + Unit_test.spec "round" Test_round_repr.tests; + Unit_test.spec "time" Test_time_repr.tests; + Unit_test.spec "receipt encodings" Test_receipt.tests; + Unit_test.spec "saturation arithmetic" Test_saturation.tests; + Unit_test.spec "gas monad" Test_gas_monad.tests; + Unit_test.spec "sc rollup storage" Test_sc_rollup_storage.tests; + Unit_test.spec "sc rollup game" Test_sc_rollup_game.tests; + Unit_test.spec "tx rollup l2" Test_tx_rollup_l2.tests; + Unit_test.spec "tx rollup l2 apply" Test_tx_rollup_l2_apply.tests; + Unit_test.spec "liquidity baking" Test_liquidity_baking_repr.tests; + Unit_test.spec "sc rollup wasm" Test_sc_rollup_wasm.tests; + Unit_test.spec "sc rollup arith" Test_sc_rollup_arith.tests; + Unit_test.spec "merkle list" Test_merkle_list.tests; + Unit_test.spec "sc rollup inbox" Test_sc_rollup_inbox.tests; + Unit_test.spec "skip list" Test_skip_list_repr.tests; + Unit_test.spec + "sc rollup management protocol" Test_sc_rollup_management_protocol.tests; - Unit_test.spec - (Protocol.name ^ ": Bond_id_repr.ml") - Test_bond_id_repr.tests; - Unit_test.spec - (Protocol.name ^ ": zk rollup storage") - Test_zk_rollup_storage.tests; - Unit_test.spec - (Protocol.name ^ ": Delegate_consensus_key.ml") - Test_consensus_key.tests; - Unit_test.spec - (Protocol.name ^ ": local_contexts") - Test_local_contexts.tests; - Unit_test.spec - (Protocol.name ^ ": dal slot proof") - Test_dal_slot_proof.tests; + Unit_test.spec "Bond_id_repr.ml" Test_bond_id_repr.tests; + Unit_test.spec "zk rollup storage" Test_zk_rollup_storage.tests; + Unit_test.spec "Delegate_consensus_key.ml" Test_consensus_key.tests; + Unit_test.spec "local_contexts" Test_local_contexts.tests; + Unit_test.spec "dal slot proof" Test_dal_slot_proof.tests; ] |> Lwt_main.run -- GitLab From 4b74cf13472767660e714341c8333d503a8f8e2e Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Mon, 20 Mar 2023 12:45:47 +0100 Subject: [PATCH 11/12] src/proto_015: Remove hard-coded protocol prefixes from tests --- .../lib_delegate/test/test_scenario.ml | 26 ++++---- .../lib_plugin/test/test_conflict_handler.ml | 2 +- .../lib_plugin/test/test_consensus_filter.ml | 2 +- .../lib_plugin/test/test_filter_state.ml | 5 +- .../lib_plugin/test/test_plugin.ml | 2 +- .../test/integration/consensus/test_main.ml | 27 ++++---- .../test/integration/gas/test_main.ml | 4 +- .../test/integration/michelson/test_main.ml | 46 ++++++------- .../test/integration/operations/test_main.ml | 21 +++--- .../test/integration/test_main.ml | 12 ++-- .../test/integration/validate/test_main.ml | 14 ++-- .../test/pbt/liquidity_baking_pbt.ml | 5 +- .../test/pbt/saturation_fuzzing.ml | 12 ++-- .../lib_protocol/test/pbt/test_bitset.ml | 2 +- .../test/pbt/test_carbonated_map.ml | 2 +- .../test/pbt/test_compare_operations.ml | 4 +- .../test/pbt/test_gas_properties.ml | 2 +- .../lib_protocol/test/pbt/test_merkle_list.ml | 4 +- .../lib_protocol/test/pbt/test_sampler.ml | 5 +- .../test/pbt/test_script_comparison.ml | 14 ++-- .../lib_protocol/test/pbt/test_tez_repr.ml | 2 +- .../test/pbt/test_tx_rollup_l2_encoding.ml | 4 +- .../test/pbt/test_zk_rollup_encoding.ml | 4 +- .../lib_protocol/test/unit/test_main.ml | 64 +++++++------------ 24 files changed, 124 insertions(+), 161 deletions(-) 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 ee881c2dd46d..0badabcfb563 100644 --- a/src/proto_015_PtLimaPt/lib_delegate/test/test_scenario.ml +++ b/src/proto_015_PtLimaPt/lib_delegate/test/test_scenario.ml @@ -1472,20 +1472,20 @@ let () = let open Tezos_base_test_helpers.Tztest in (title, [tztest title `Quick body])) [ - (Protocol.name ^ ": reaches level 5", test_level_5); - (Protocol.name ^ ": scenario t1", test_scenario_t1); - (Protocol.name ^ ": scenario t2", test_scenario_t2); - (Protocol.name ^ ": scenario t3", test_scenario_t3); + ("reaches level 5", test_level_5); + ("scenario t1", test_scenario_t1); + ("scenario t2", test_scenario_t2); + ("scenario t3", test_scenario_t3); (* See issue https://gitlab.com/nomadic-labs/tezos/-/issues/518 *) (* tztest "scenario f1" `Quick test_scenario_f1; *) - (Protocol.name ^ ": scenario f2", test_scenario_f2); - (Protocol.name ^ ": scenario m1", test_scenario_m1); - (Protocol.name ^ ": scenario m2", test_scenario_m2); - (Protocol.name ^ ": scenario m3", test_scenario_m3); - (Protocol.name ^ ": scenario m4", test_scenario_m4); - (Protocol.name ^ ": scenario m5", test_scenario_m5); - (Protocol.name ^ ": scenario m6", test_scenario_m6); - (Protocol.name ^ ": scenario m7", test_scenario_m7); - (Protocol.name ^ ": scenario m8", test_scenario_m8); + ("scenario f2", test_scenario_f2); + ("scenario m1", test_scenario_m1); + ("scenario m2", test_scenario_m2); + ("scenario m3", test_scenario_m3); + ("scenario m4", test_scenario_m4); + ("scenario m5", test_scenario_m5); + ("scenario m6", test_scenario_m6); + ("scenario m7", test_scenario_m7); + ("scenario m8", test_scenario_m8); ] |> Lwt_main.run diff --git a/src/proto_015_PtLimaPt/lib_plugin/test/test_conflict_handler.ml b/src/proto_015_PtLimaPt/lib_plugin/test/test_conflict_handler.ml index b03ddf977774..98daf4ca84de 100644 --- a/src/proto_015_PtLimaPt/lib_plugin/test/test_conflict_handler.ml +++ b/src/proto_015_PtLimaPt/lib_plugin/test/test_conflict_handler.ml @@ -263,7 +263,7 @@ let () = ~__FILE__ "conflict_handler" [ - ( Protocol.name ^ ": conflict_handler", + ( "conflict_handler", [ Tztest.tztest "Random operations (not both manager)" diff --git a/src/proto_015_PtLimaPt/lib_plugin/test/test_consensus_filter.ml b/src/proto_015_PtLimaPt/lib_plugin/test/test_consensus_filter.ml index 1445191ab587..d467b88706d6 100644 --- a/src/proto_015_PtLimaPt/lib_plugin/test/test_consensus_filter.ml +++ b/src/proto_015_PtLimaPt/lib_plugin/test/test_consensus_filter.ml @@ -436,7 +436,7 @@ let () = ~__FILE__ "Filter" [ - ( Protocol.name ^ ": pre_filter", + ( "pre_filter", qcheck_wrap [ test_acceptable_past_level; diff --git a/src/proto_015_PtLimaPt/lib_plugin/test/test_filter_state.ml b/src/proto_015_PtLimaPt/lib_plugin/test/test_filter_state.ml index ceec327fa278..25b798c8c9b0 100644 --- a/src/proto_015_PtLimaPt/lib_plugin/test/test_filter_state.ml +++ b/src/proto_015_PtLimaPt/lib_plugin/test/test_filter_state.ml @@ -188,7 +188,6 @@ let () = ~__FILE__ "Filter_state" [ - (Protocol.name ^ ": add_manager_op", qcheck_wrap [test_add_manager_op]); - ( Protocol.name ^ ": remove", - qcheck_wrap [test_remove_present; test_remove_unknown] ); + ("add_manager_op", qcheck_wrap [test_add_manager_op]); + ("remove", qcheck_wrap [test_remove_present; test_remove_unknown]); ] diff --git a/src/proto_015_PtLimaPt/lib_plugin/test/test_plugin.ml b/src/proto_015_PtLimaPt/lib_plugin/test/test_plugin.ml index ab7ee537350c..cd3f3815350b 100644 --- a/src/proto_015_PtLimaPt/lib_plugin/test/test_plugin.ml +++ b/src/proto_015_PtLimaPt/lib_plugin/test/test_plugin.ml @@ -72,7 +72,7 @@ let () = ~__FILE__ "Plugin" [ - ( Protocol.name ^ ": on_flush", + ( "on_flush", [ Tztest.tztest "[on_flush ~validation_state ...] yields an empty state " diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_main.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_main.ml index 34d4f8da29d4..2594ebf614e0 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_main.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/consensus/test_main.ml @@ -35,19 +35,18 @@ let () = ~__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); + ("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); ] |> Lwt_main.run diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/gas/test_main.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/gas/test_main.ml index 862e20583b52..8ee336524573 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/gas/test_main.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/gas/test_main.ml @@ -35,7 +35,7 @@ let () = ~__FILE__ "protocol > integration > gas" [ - (Protocol.name ^ ": gas levels", Test_gas_levels.tests); - (Protocol.name ^ ": gas cost functions", Test_gas_costs.tests); + ("gas levels", Test_gas_levels.tests); + ("gas cost functions", Test_gas_costs.tests); ] |> Lwt_main.run diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_main.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_main.ml index e47592aff7ed..2e945bf27c14 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_main.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/michelson/test_main.ml @@ -35,30 +35,26 @@ let () = ~__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 ^ ": timelock", Test_timelock.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); + ("global table of constants", Test_global_constants_storage.tests); + ("interpretation", Test_interpretation.tests); + ("lazy storage diff", Test_lazy_storage_diff.tests); + ("sapling", Test_sapling.tests); + ("script typed ir size", Test_script_typed_ir_size.tests); + ("temp big maps", Test_temp_big_maps.tests); + ("ticket balance key", Test_ticket_balance_key.tests); + ("ticket scanner", Test_ticket_scanner.tests); + ("ticket storage", Test_ticket_storage.tests); + ("ticket lazy storage diff", Test_ticket_lazy_storage_diff.tests); + ("ticket operations diff", Test_ticket_operations_diff.tests); + ("ticket accounting", Test_ticket_accounting.tests); + ("ticket balance", Test_ticket_balance.tests); + ("ticket manager", Test_ticket_manager.tests); + ("timelock", Test_timelock.tests); + ("typechecking", Test_typechecking.tests); + ("script cache", Test_script_cache.tests); + ("block time instructions", Test_block_time_instructions.tests); + ("annotations", Test_annotations.tests); + ("event logging", Test_contract_event.tests); + ("patched contracts", Test_patched_contracts.tests); ] |> Lwt_main.run diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/test_main.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/test_main.ml index 3c5658553cd3..1d06a8f580b4 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/test_main.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/operations/test_main.ml @@ -35,16 +35,15 @@ let () = ~__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 ^ ": zk rollup", Test_zk_rollup.tests); + ("voting", Test_voting.tests); + ("origination", Test_origination.tests); + ("revelation", Test_reveal.tests); + ("transfer", Test_transfer.tests); + ("activation", Test_activation.tests); + ("paid storage increase", Test_paid_storage_increase.tests); + ("combined", Test_combined_operations.tests); + ("failing_noop operation", Test_failing_noop.tests); + ("tx rollup", Test_tx_rollup.tests); + ("zk rollup", Test_zk_rollup.tests); ] |> Lwt_main.run diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/test_main.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/test_main.ml index 54cbc766cbe6..710965783627 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/test_main.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/test_main.ml @@ -35,11 +35,11 @@ let () = ~__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); + ("constants", Test_constants.tests); + ("liquidity baking", Test_liquidity_baking.tests); + ("storage description", Test_storage.tests); + ("storage tests", Test_storage_functions.tests); + ("token movements", Test_token.tests); + ("frozen bonds", Test_frozen_bonds.tests); ] |> Lwt_main.run diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/integration/validate/test_main.ml b/src/proto_015_PtLimaPt/lib_protocol/test/integration/validate/test_main.ml index ab292b309a3c..c793b3f29e20 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/integration/validate/test_main.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/integration/validate/test_main.ml @@ -35,13 +35,11 @@ let () = ~__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); + ("sanity checks", Test_sanity.tests); + ("mempool", Test_mempool.tests); + ("single manager validation", Test_manager_operation_validation.tests); + ("batched managers validation", Test_validation_batch.tests); + ("one-manager restriction", Test_1m_restriction.tests); + ("covalidity", Test_covalidity.tests); ] |> Lwt_main.run diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/liquidity_baking_pbt.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/liquidity_baking_pbt.ml index fe4ac035fa08..379e2f28665b 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/liquidity_baking_pbt.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/liquidity_baking_pbt.ml @@ -315,7 +315,6 @@ let _ = ~__FILE__ "protocol > pbt > liquidity baking" [ - ( 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_015_PtLimaPt/lib_protocol/test/pbt/saturation_fuzzing.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/saturation_fuzzing.ml index 1e119503a8d8..d53c4fd33eae 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/saturation_fuzzing.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/saturation_fuzzing.ml @@ -192,10 +192,10 @@ let () = ~__FILE__ "protocol > pbt > saturation" [ - (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_015_PtLimaPt/lib_protocol/test/pbt/test_bitset.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_bitset.ml index f89eb3b1ecb3..5b7faffe61e3 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_bitset.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_bitset.ml @@ -110,7 +110,7 @@ let () = ~__FILE__ "bits" [ - ( Protocol.name ^ ": quantity", + ( "quantity", qcheck_wrap [ QCheck2.Test.make diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_carbonated_map.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_carbonated_map.ml index d51f2a14cd67..44f1a282061e 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_carbonated_map.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_carbonated_map.ml @@ -551,4 +551,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > carbonated map" - [(Protocol.name ^ ": Carbonated map", tests ~rand)] + [("Carbonated map", tests ~rand)] diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_compare_operations.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_compare_operations.ml index 0623fedda4d2..adca6cbd90c2 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_compare_operations.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_compare_operations.ml @@ -98,6 +98,4 @@ let () = Alcotest.run ~__FILE__ "Compare operations" - [ - (Protocol.name ^ ": Compare_operations", Qcheck2_helpers.qcheck_wrap tests); - ] + [("Compare_operations", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_gas_properties.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_gas_properties.ml index caeebd9adbdb..0c6d38ccd8db 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_gas_properties.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_gas_properties.ml @@ -143,4 +143,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > gas" - [(Protocol.name ^ ": gas properties", qcheck_wrap tests)] + [("gas properties", qcheck_wrap tests)] diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_merkle_list.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_merkle_list.ml index b2b3162e9aa3..4dd30ce27650 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_merkle_list.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_merkle_list.ml @@ -113,13 +113,13 @@ let () = ~__FILE__ "Merkle list" [ - ( 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_015_PtLimaPt/lib_protocol/test/pbt/test_sampler.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_sampler.ml index f6abf5757f86..220358670312 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_sampler.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_sampler.ml @@ -267,7 +267,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > sampling" - [ - ( Protocol.name ^ ": sampling", - qcheck_wrap [alias_float_test; alias_z_test] ); - ] + [("sampling", qcheck_wrap [alias_float_test; alias_z_test])] diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_script_comparison.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_script_comparison.ml index 0b036240d076..5911f0e71c39 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_script_comparison.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_script_comparison.ml @@ -348,12 +348,10 @@ let () = ~__FILE__ "protocol > pbt > script_comparison" [ - ( 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_015_PtLimaPt/lib_protocol/test/pbt/test_tez_repr.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_tez_repr.ml index c6af5fbf48ed..395c8ebf44a1 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_tez_repr.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_tez_repr.ml @@ -133,4 +133,4 @@ let () = Alcotest.run ~__FILE__ "protocol > pbt > tez_repr" - [(Protocol.name ^ ": Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] + [("Tez_repr", Qcheck2_helpers.qcheck_wrap tests)] diff --git a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_tx_rollup_l2_encoding.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_tx_rollup_l2_encoding.ml index 68cdd390c9d5..44bad653903a 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_tx_rollup_l2_encoding.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_tx_rollup_l2_encoding.ml @@ -278,8 +278,8 @@ let () = ~__FILE__ "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_015_PtLimaPt/lib_protocol/test/pbt/test_zk_rollup_encoding.ml b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_zk_rollup_encoding.ml index 677b65a0d7a8..240e645d0cca 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_zk_rollup_encoding.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_zk_rollup_encoding.ml @@ -224,6 +224,6 @@ let () = ~__FILE__ "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_015_PtLimaPt/lib_protocol/test/unit/test_main.ml b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_main.ml index 13dc374241d0..07344d9ba6de 100644 --- a/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_main.ml +++ b/src/proto_015_PtLimaPt/lib_protocol/test/unit/test_main.ml @@ -50,49 +50,29 @@ let () = ~__FILE__ "protocol > unit" [ - Unit_test.spec (Protocol.name ^ ": Tez_repr.ml") Test_tez_repr.tests; + Unit_test.spec "Tez_repr.ml" Test_tez_repr.tests; + Unit_test.spec "Contract_repr.ml" Test_contract_repr.tests; + Unit_test.spec "Destination_repr.ml" Test_destination_repr.tests; + Unit_test.spec "Operation_repr.ml" Test_operation_repr.tests; Unit_test.spec - (Protocol.name ^ ": Contract_repr.ml") - Test_contract_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Destination_repr.ml") - Test_destination_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Operation_repr.ml") - Test_operation_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Global_constants_storage.ml") + "Global_constants_storage.ml" Test_global_constants_storage.tests; - Unit_test.spec (Protocol.name ^ ": fitness") Test_fitness.tests; - Unit_test.spec - (Protocol.name ^ ": fixed point computation") - Test_fixed_point.tests; - Unit_test.spec (Protocol.name ^ ": level module") Test_level_module.tests; - Unit_test.spec (Protocol.name ^ ": qty") Test_qty.tests; - Unit_test.spec (Protocol.name ^ ": round") Test_round_repr.tests; - Unit_test.spec (Protocol.name ^ ": time") Test_time_repr.tests; - Unit_test.spec (Protocol.name ^ ": receipt encodings") Test_receipt.tests; - Unit_test.spec - (Protocol.name ^ ": saturation arithmetic") - Test_saturation.tests; - Unit_test.spec (Protocol.name ^ ": gas monad") Test_gas_monad.tests; - Unit_test.spec (Protocol.name ^ ": tx rollup l2") Test_tx_rollup_l2.tests; - Unit_test.spec - (Protocol.name ^ ": tx rollup l2 apply") - Test_tx_rollup_l2_apply.tests; - Unit_test.spec - (Protocol.name ^ ": liquidity baking") - Test_liquidity_baking_repr.tests; - Unit_test.spec (Protocol.name ^ ": merkle list") Test_merkle_list.tests; - Unit_test.spec (Protocol.name ^ ": skip list") Test_skip_list_repr.tests; - Unit_test.spec - (Protocol.name ^ ": Bond_id_repr.ml") - Test_bond_id_repr.tests; - Unit_test.spec - (Protocol.name ^ ": zk rollup storage") - Test_zk_rollup_storage.tests; - Unit_test.spec - (Protocol.name ^ ": Delegate_consensus_key.ml") - Test_consensus_key.tests; + Unit_test.spec "fitness" Test_fitness.tests; + Unit_test.spec "fixed point computation" Test_fixed_point.tests; + Unit_test.spec "level module" Test_level_module.tests; + Unit_test.spec "qty" Test_qty.tests; + Unit_test.spec "round" Test_round_repr.tests; + Unit_test.spec "time" Test_time_repr.tests; + Unit_test.spec "receipt encodings" Test_receipt.tests; + Unit_test.spec "saturation arithmetic" Test_saturation.tests; + Unit_test.spec "gas monad" Test_gas_monad.tests; + Unit_test.spec "tx rollup l2" Test_tx_rollup_l2.tests; + Unit_test.spec "tx rollup l2 apply" Test_tx_rollup_l2_apply.tests; + Unit_test.spec "liquidity baking" Test_liquidity_baking_repr.tests; + Unit_test.spec "merkle list" Test_merkle_list.tests; + Unit_test.spec "skip list" Test_skip_list_repr.tests; + Unit_test.spec "Bond_id_repr.ml" Test_bond_id_repr.tests; + Unit_test.spec "zk rollup storage" Test_zk_rollup_storage.tests; + Unit_test.spec "Delegate_consensus_key.ml" Test_consensus_key.tests; ] |> Lwt_main.run -- GitLab From 1ccc2b13ed117a3fbb26a6e80feae5a221475b54 Mon Sep 17 00:00:00 2001 From: Arvid Jakobsson Date: Thu, 6 Apr 2023 17:13:52 +0200 Subject: [PATCH 12/12] wip: remove protocol prefixes for proto_017 --- .../lib_protocol/test/helpers/alcotezt/dune | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/proto_017_PtNairob/lib_protocol/test/helpers/alcotezt/dune diff --git a/src/proto_017_PtNairob/lib_protocol/test/helpers/alcotezt/dune b/src/proto_017_PtNairob/lib_protocol/test/helpers/alcotezt/dune new file mode 100644 index 000000000000..7ffbeec803b9 --- /dev/null +++ b/src/proto_017_PtNairob/lib_protocol/test/helpers/alcotezt/dune @@ -0,0 +1,15 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + +(library + (name tezos_017_PtNairob_test_helpers_alcotezt) + (public_name tezos-017-PtNairob-test-helpers.alcotezt) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-protocol-environment + tezos-protocol-017-PtNairob + octez-protocol-alcotezt) + (flags + (:standard) + -open Tezos_protocol_017_PtNairob + -open Octez_protocol_alcotezt)) -- GitLab