From d115d0e406f0f2d4c9e9d1678d68a19c3c89016f Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Thu, 3 Nov 2022 14:43:51 +0100 Subject: [PATCH 1/2] Tezt: add octez-alcotezt --- .gitlab/ci/jobs/packaging/opam_package.yml | 2 + dune-project | 1 + manifest/main.ml | 14 ++ opam/octez-alcotezt.opam | 20 ++ tezt/lib_alcotezt/alcotest.ml | 277 +++++++++++++++++++++ tezt/lib_alcotezt/alcotest.mli | 144 +++++++++++ tezt/lib_alcotezt/alcotest_lwt.ml | 64 +++++ tezt/lib_alcotezt/alcotest_lwt.mli | 67 +++++ tezt/lib_alcotezt/dune | 10 + 9 files changed, 599 insertions(+) create mode 100644 opam/octez-alcotezt.opam create mode 100644 tezt/lib_alcotezt/alcotest.ml create mode 100644 tezt/lib_alcotezt/alcotest.mli create mode 100644 tezt/lib_alcotezt/alcotest_lwt.ml create mode 100644 tezt/lib_alcotezt/alcotest_lwt.mli create mode 100644 tezt/lib_alcotezt/dune diff --git a/.gitlab/ci/jobs/packaging/opam_package.yml b/.gitlab/ci/jobs/packaging/opam_package.yml index f6fcfbcd0571..b8b74e648172 100644 --- a/.gitlab/ci/jobs/packaging/opam_package.yml +++ b/.gitlab/ci/jobs/packaging/opam_package.yml @@ -215,6 +215,8 @@ opam:octez-accuser-PtMumbai: # Ignoring unreleased package octez-accuser-alpha. +# Ignoring unreleased package octez-alcotezt. + opam:octez-baker-PtLimaPt: extends: - .opam_template diff --git a/dune-project b/dune-project index 906e7b839ec1..894273ec81a6 100644 --- a/dune-project +++ b/dune-project @@ -6,6 +6,7 @@ (package (name octez-accuser-PtLimaPt)) (package (name octez-accuser-PtMumbai)) (package (name octez-accuser-alpha)) +(package (name octez-alcotezt)) (package (name octez-baker-PtLimaPt)) (package (name octez-baker-PtMumbai)) (package (name octez-baker-alpha)) diff --git a/manifest/main.ml b/manifest/main.ml index 850c548927b8..9b4f75a3af0e 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -389,6 +389,20 @@ let tezt_core_lib = let tezt_js_lib = external_sublib tezt_lib ~js_compatible:true "tezt.js" +(* The main module [Octez_alcotest] is [open_] so that one can replace + the [alcotest] dependency with [alcotezt] and it just works. + If we use [~internal_name:"alcotest"] here, it would also work, + except in cases where the real Alcotest is also a dependency. *) +let _alcotezt = + public_lib + "octez-alcotezt" + ~path:"tezt/lib_alcotezt" + ~synopsis: + "Provide the interface of Alcotest for Octez, but with Tezt as backend" + ~js_compatible:true + ~deps:[tezt_core_lib] + |> open_ + let tezt ~opam ~path ?js_compatible ?modes ?(deps = []) ?dep_globs ?dep_files ?synopsis ?opam_with_test l = tezt_without_tezt_lib_dependency diff --git a/opam/octez-alcotezt.opam b/opam/octez-alcotezt.opam new file mode 100644 index 000000000000..92de02f5e009 --- /dev/null +++ b/opam/octez-alcotezt.opam @@ -0,0 +1,20 @@ +# 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" } + "tezt" { >= "3.0.0" } +] +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, but with Tezt as backend" diff --git a/tezt/lib_alcotezt/alcotest.ml b/tezt/lib_alcotezt/alcotest.ml new file mode 100644 index 000000000000..b7789ee10525 --- /dev/null +++ b/tezt/lib_alcotezt/alcotest.ml @@ -0,0 +1,277 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +open Tezt_core + +type return = unit + +type speed_level = [`Quick | `Slow] + +type 'a test_case = string * speed_level * ('a -> return) + +let test_case name speed_level body = (name, speed_level, body) + +exception Test_error + +type 'a test = string * 'a test_case list + +let run library_name tests = + tests + |> List.iter @@ fun (test_name, test_cases) -> + Test.register + ~__FILE__:library_name + ~title:(library_name ^ ": " ^ test_name) + ~tags:["alcotest"] + @@ fun () -> + (test_cases + |> List.iter @@ fun (test_case_name, speed_level, body) -> + match speed_level with + | `Slow when Cli.get_bool ~default:false "quick" -> + Log.info "Skipped test: %s" test_case_name + | `Slow | `Quick -> + Log.info "Test: %s" test_case_name ; + body ()) ; + Base.unit + +type 'a testable = (module Tezt_core.Check.EQUALABLE with type t = 'a) + +let testable (type a) (pp : Format.formatter -> a -> return) + (eq : a -> a -> bool) : a testable = + (module struct + type t = a + + let pp = pp + + let equal = eq + end) + +let pp (type a) (t : a testable) = + let module T = (val t) in + T.pp + +let equal (type a) (t : a testable) = + let module T = (val t) in + T.equal + +let string : string testable = + (module struct + include String + + let pp = Format.pp_print_string + end) + +let bool : bool testable = + (module struct + include Bool + + let pp = Format.pp_print_bool + end) + +let bytes : bytes testable = + (module struct + include Bytes + + let pp = Format.pp_print_bytes + end) + +let int64 : int64 testable = + (module struct + include Int64 + + let equal = Int64.equal + + let pp fmt i = Format.pp_print_string fmt (Int64.to_string i) + end) + +let int32 : int32 testable = + (module struct + include Int32 + + let equal = Int32.equal + + let pp fmt i = Format.pp_print_string fmt (Int32.to_string i) + end) + +let int : int testable = + (module struct + type t = int + + let equal = ( = ) + + let pp = Format.pp_print_int + end) + +let float eps : float testable = + (module struct + type t = float + + let isnan f = FP_nan = classify_float f + + let equal x y = + (isnan x && isnan y) + (* compare infinities *) + || x = y + || abs_float (x -. y) <= eps + + let pp = Format.pp_print_float + end) + +let result (type a e) (ok : a testable) (error : e testable) : + (a, e) result testable = + let module Ok = (val ok) in + let module Error = (val error) in + (module struct + type t = (a, e) result + + let pp fmt = function + | Ok x -> Format.fprintf fmt "@[Ok@ (%a)@]" Ok.pp x + | Error x -> Format.fprintf fmt "@[Error@ (%a)@]" Error.pp x + + let equal = Result.equal ~ok:Ok.equal ~error:Error.equal + end) + +let pp_list ?(left = "[") ?(right = "]") pp_item fmt list = + Format.pp_print_string fmt left ; + if list <> [] then ( + Format.pp_open_box fmt 1 ; + Format.pp_print_char fmt ' ' ; + let pp_sep fmt () = + Format.pp_print_char fmt ';' ; + Format.pp_print_space fmt () + in + Format.pp_print_list ~pp_sep pp_item fmt list ; + Format.pp_print_char fmt ' ' ; + Format.pp_close_box fmt ()) ; + Format.pp_print_string fmt right + +let list (type a) (el : a testable) : a list testable = + let module El = (val el) in + (module struct + type t = a list + + let pp fmt = pp_list El.pp fmt + + let equal = List.equal El.equal + end) + +let array (type a) (el : a testable) : a array testable = + let module El = (val el) in + (module struct + type t = a array + + let pp fmt a = + let l = Array.to_list a in + pp_list ~left:"[|" ~right:"|]" El.pp fmt l + + let equal = Array.for_all2 El.equal + end) + +let pair (type a b) (el1 : a testable) (el2 : b testable) : (a * b) testable = + let module El1 = (val el1) in + let module El2 = (val el2) in + (module struct + type t = a * b + + let pp fmt (a, b) = Format.fprintf fmt "(%a,%a)" El1.pp a El2.pp b + + let equal (a1, b1) (a2, b2) = El1.equal a1 a2 && El2.equal b1 b2 + end) + +let triple (type a b c) (el1 : a testable) (el2 : b testable) (el3 : c testable) + : (a * b * c) testable = + let module El1 = (val el1) in + let module El2 = (val el2) in + let module El3 = (val el3) in + (module struct + type t = a * b * c + + let pp fmt (a, b, c) = + Format.fprintf fmt "(%a,%a,%a)" El1.pp a El2.pp b El3.pp c + + let equal (a1, b1, c1) (a2, b2, c2) = + El1.equal a1 a2 && El2.equal b1 b2 && El3.equal c1 c2 + end) + +let option (type a) (value : a testable) : a option testable = + let module Value = (val value) in + (module struct + type t = a option + + let pp fmt = function + | Some v -> Format.fprintf fmt "@[Some@ (%a)@]" Value.pp v + | None -> Format.fprintf fmt "@[None@]" + + let equal = Option.equal Value.equal + end) + +let check testable msg expected actual = + Check.(expected = actual) + (Check.equalable_module testable) + ~error_msg:(msg ^ ": expected %L, got %R") + +let check' t ~msg ~expected ~actual = check t msg expected actual + +let check_raises msg exn f = + let collect_exception f = + try + f () ; + None + with e -> Some e + in + match collect_exception f with + | None -> + Test.fail + "[check_raises] %s: expecting %s, got nothing." + msg + (Printexc.to_string exn) + | Some e -> + if e <> exn then + Test.fail + "[check_raises] %s: expecting %s, got %s." + msg + (Printexc.to_string exn) + (Printexc.to_string e) + +let fail message = Test.fail "%s" message + +let failf x = Format.kasprintf fail x + +(* Some Octez tests use Format.eprintf directly. + Not even in the tests but in the libraries themselves. + We redirect the output to Tezt.Log. + + Ideally we would do the same for the Printf module, which is in particular + called by QCheck_alcotest to print the seed, but the Printf module cannot + redirect its output... *) +let redirect_formatter fmt = + let buffer = Buffer.create 256 in + Format.pp_set_formatter_output_functions fmt (Buffer.add_substring buffer) + @@ fun () -> + Log.debug "%s" (String.trim (Buffer.contents buffer)) ; + Buffer.clear buffer + +let () = + redirect_formatter Format.std_formatter ; + redirect_formatter Format.err_formatter diff --git a/tezt/lib_alcotezt/alcotest.mli b/tezt/lib_alcotezt/alcotest.mli new file mode 100644 index 000000000000..5b4462969f8d --- /dev/null +++ b/tezt/lib_alcotezt/alcotest.mli @@ -0,0 +1,144 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(** Wrapper to run Alcotest tests with Tezt as a backend. *) + +(** This module provides a subset of the interface of the [Alcotest] module + of the real Alcotest library. But instead of using Alcotest to run the tests, + it uses Tezt. This allows to transition from Alcotest to Tezt without + having to actually change the code. In turn, this allows to benefit from + Tezt features such as auto-balancing in the CI. One can then use Tezt's + modules in the test, to gradually migrate the test to Tezt and stop using + this wrapper. + + This module is intended as a way to help transition from Alcotest to Tezt, + not to use both at the same time forever. First use Alcotezt to have the test + runnable using Tezt, as a quick win to get auto-balancing etc. Then stop using + Alcotest functions and migrate existing calls at the pace that is convenient + for you. *) + +(** Return type for tests. *) +type return = unit + +(** Speed levels. + + In Alcotest, one can ask not to run slow tests with [-q] from the command-line. + In Tezt, the equivalent is [-a quick]. *) +type speed_level = [`Quick | `Slow] + +(** Test cases. + + The name of the Alcotest test case appears in Tezt's logs, + but it is not used in the Tezt test title, nor as a tag. *) +type 'a test_case = string * speed_level * ('a -> return) + +(** Make a test case. *) +val test_case : string -> speed_level -> ('a -> return) -> 'a test_case + +(** Can be raised to fail a test. *) +exception Test_error + +(** Tests. + + In Tezt, the name of the test is used as the title of the test. *) +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 : string -> unit test list -> return + +(** Values that can be tested with {!check}. *) +type 'a testable = (module Tezt_core.Check.EQUALABLE with type t = 'a) + +(** [testable pp eq] is a new {!type-testable} with the pretty-printer [pp] and + equality [eq]. *) +val testable : + (Format.formatter -> 'a -> unit) -> ('a -> 'a -> bool) -> 'a testable + +(** [pp t] is [t]'s pretty-printer. *) +val pp : 'a testable -> Format.formatter -> 'a -> return + +(** [equal t] is [t]'s equality. *) +val equal : 'a testable -> 'a -> 'a -> bool + +(** The [string] testable type. *) +val string : string testable + +(** The boolean testable type. *) +val bool : bool testable + +(** The bytes testable type. *) +val bytes : bytes testable + +(** The int64 testable type. *) +val int64 : int64 testable + +(** The int32 testable type. *) +val int32 : int32 testable + +(** The int testable type. *) +val int : int testable + +(** The float testable type. *) +val float : float -> float testable + +(** The list testable type. *) +val list : 'a testable -> 'a list testable + +(** The array testable type. *) +val array : 'a testable -> 'a array testable + +(** The pair testable type. *) +val pair : 'a testable -> 'b testable -> ('a * 'b) testable + +(** The triple testable type. *) +val triple : + 'a testable -> 'b testable -> 'c testable -> ('a * 'b * 'c) testable + +(** The result testable type. *) +val result : 'a testable -> 'e testable -> ('a, 'e) result testable + +(** The option testable type. *) +val option : 'a testable -> 'a option testable + +(** Check that two values are equal. + + In Tezt, this becomes [Check.(=)] where [~error_msg] is + [msg ^ ": expected %L, got %R"] where [msg] is the [string] given to [check]. *) +val check : 'a testable -> string -> 'a -> 'a -> return + +(** Check that two values are equal (labeled variant of {!check}). *) +val check' : 'a testable -> msg:string -> expected:'a -> actual:'a -> return + +(** Check that an exception is raised. *) +val check_raises : string -> exn -> (unit -> unit) -> return + +(** Fail the current test (string version). *) +val fail : string -> 'a + +(** Fail the current test (format version). *) +val failf : ('a, Format.formatter, return, 'b) format4 -> 'a diff --git a/tezt/lib_alcotezt/alcotest_lwt.ml b/tezt/lib_alcotezt/alcotest_lwt.ml new file mode 100644 index 000000000000..72e3a809576f --- /dev/null +++ b/tezt/lib_alcotezt/alcotest_lwt.ml @@ -0,0 +1,64 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +open Tezt_core +open Tezt_core.Base + +type return = unit Lwt.t + +type speed_level = [`Quick | `Slow] + +type 'a test_case = string * speed_level * ('a -> return) + +let test_case name speed_level body = + (* Not sure this is the right way to create the switch, maybe it should have + a larger scope. *) + let body args = Lwt_switch.with_switch (fun sw -> body sw args) in + (name, speed_level, body) + +let test_case_sync name speed_level body = + let body arg = + body arg ; + unit + in + (name, speed_level, body) + +type 'a test = string * 'a test_case list + +let run library_name tests = + (tests + |> List.iter @@ fun (test_name, test_cases) -> + Test.register ~__FILE__:library_name ~title:test_name ~tags:["alcotest"] + @@ fun () -> + test_cases + |> Lwt_list.iter_s @@ fun (test_case_name, speed_level, body) -> + match speed_level with + | `Slow when Cli.get_bool ~default:false "quick" -> + Log.info "Skipped test: %s" test_case_name ; + unit + | `Slow | `Quick -> + Log.info "Test: %s" test_case_name ; + body ()) ; + unit diff --git a/tezt/lib_alcotezt/alcotest_lwt.mli b/tezt/lib_alcotezt/alcotest_lwt.mli new file mode 100644 index 000000000000..06c1af33f154 --- /dev/null +++ b/tezt/lib_alcotezt/alcotest_lwt.mli @@ -0,0 +1,67 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(** Wrapper to run Alcotest tests with Tezt as a backend. *) + +(** This module provides a subset of the interface of the [Alcotest] module + of the real Alcotest library. But instead of using Alcotest to run the tests, + it uses Tezt. This allows to transition from Alcotest to Tezt without + having to actually change the code. In turn, this allows to benefit from + Tezt features such as auto-balancing in the CI. One can then use Tezt's + modules in the test, to gradually migrate the test to Tezt and stop using + this wrapper. *) + +(** Return type for tests. *) +type return = unit Lwt.t + +(** Speed levels. + + In Alcotest, one can ask not to run slow tests with [-q] from the command-line. + In Tezt, the equivalent is [-a quick]. *) +type speed_level = [`Quick | `Slow] + +(** Test cases. + + The name of the Alcotest test case appears in Tezt's logs, + but it is not used in the Tezt test title, nor as a tag. *) +type 'a test_case = string * speed_level * ('a -> return) + +(** Make a test case. *) +val test_case : + string -> speed_level -> (Lwt_switch.t -> 'a -> return) -> 'a test_case + +(** Make a test case (out of Lwt). *) +val test_case_sync : string -> speed_level -> ('a -> unit) -> 'a test_case + +(** Tests. + + In Tezt, the name of the test is used as the title of the test. *) +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 : string -> unit test list -> return diff --git a/tezt/lib_alcotezt/dune b/tezt/lib_alcotezt/dune new file mode 100644 index 000000000000..a89575f1e1e2 --- /dev/null +++ b/tezt/lib_alcotezt/dune @@ -0,0 +1,10 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + +(library + (name octez_alcotezt) + (public_name octez-alcotezt) + (instrumentation (backend bisect_ppx)) + (libraries + tezt.core) + (js_of_ocaml)) -- GitLab From e5d967897cd8bdb19ce42b9605eb85065e41a62c Mon Sep 17 00:00:00 2001 From: Pietro Abate Date: Tue, 31 Jan 2023 15:44:52 +0100 Subject: [PATCH 2/2] Manifest: make octez-alcotezt a release package --- .gitlab/ci/jobs/packaging/opam_package.yml | 7 ++++++- manifest/main.ml | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/jobs/packaging/opam_package.yml b/.gitlab/ci/jobs/packaging/opam_package.yml index b8b74e648172..26d10ded91d9 100644 --- a/.gitlab/ci/jobs/packaging/opam_package.yml +++ b/.gitlab/ci/jobs/packaging/opam_package.yml @@ -215,7 +215,12 @@ opam:octez-accuser-PtMumbai: # Ignoring unreleased package octez-accuser-alpha. -# Ignoring unreleased package octez-alcotezt. +opam:octez-alcotezt: + extends: + - .opam_template + - .rules_template__trigger_opam_batch_7 + variables: + package: octez-alcotezt opam:octez-baker-PtLimaPt: extends: diff --git a/manifest/main.ml b/manifest/main.ml index 9b4f75a3af0e..ebaf2d2b1e56 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -397,6 +397,12 @@ let _alcotezt = public_lib "octez-alcotezt" ~path:"tezt/lib_alcotezt" + (* TODO: https://gitlab.com/tezos/tezos/-/issues/4727 + + we mark "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, but with Tezt as backend" ~js_compatible:true -- GitLab