From d4f76fc9b847c0bb3ece67599b1fc2d96e0ca42b Mon Sep 17 00:00:00 2001 From: Sventimir Date: Fri, 20 May 2022 15:07:35 +0200 Subject: [PATCH] Proto/Test: restore regression tests for interpreter logging. These tests we erroneously disabled in an earlier commit. --- manifest/main.ml | 27 +++++++++++++++++++ opam/tezos-protocol-alpha-tests.opam | 1 + .../lib_protocol/test/regression/dune | 27 +++++++++++++++++++ .../lib_protocol/test/regression/tezt/dune | 1 + 4 files changed, 56 insertions(+) create mode 100644 src/proto_alpha/lib_protocol/test/regression/dune create mode 100644 src/proto_alpha/lib_protocol/test/regression/tezt/dune diff --git a/manifest/main.ml b/manifest/main.ml index a104e3d13994..97885d79d4f9 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -2997,6 +2997,29 @@ end = struct ~action:(run_exe "main" ["test"; "Unit"]); ] in + let _regresssion = + if N.(number >= 014) then + Some + (test + "main" + ~path: + (sf + "src/proto_%s/lib_protocol/test/regression" + name_underscore) + ~opam:(sf "tezos-protocol-%s-tests" name_dash) + ~deps: + [ + tezt; + tezos_base |> open_ ~m:"TzPervasives"; + main |> open_; + client |> if_some |> open_; + plugin |> if_some |> open_; + test_helpers |> if_some |> open_; + tezos_micheline |> open_; + ] + ~dep_globs:["contracts/*"; "tezt/_regressions/*"]) + else None + in () let make ~template_version ~name_dash ~name_underscore ~number () = @@ -4775,6 +4798,10 @@ let exclude filename = (* Dune files in src/proto_*/parameters only have a (copy_files) stanza (no library / executable / test). *) | "src" :: maybe_proto :: "parameters" :: _ when is_proto_ maybe_proto -> true + (* This dune file does not contain any targets, only a dirs stanza. *) + | ["src"; maybe_proto; "lib_protocol"; "test"; "regression"; "tezt"; "dune"] + when is_proto_ maybe_proto -> + true (* The following directory has a very specific structure that would be hard to port to the manifest. Also, it is not released, and is not a dependency for releases as it is an opt-in instrumentation. *) diff --git a/opam/tezos-protocol-alpha-tests.opam b/opam/tezos-protocol-alpha-tests.opam index 24cf61c2e30c..276216d25a0d 100644 --- a/opam/tezos-protocol-alpha-tests.opam +++ b/opam/tezos-protocol-alpha-tests.opam @@ -28,6 +28,7 @@ depends: [ "tezos-protocol-environment" {with-test} "tezos-stdlib-unix" {with-test} "tezos-stdlib" {with-test} + "tezt" {with-test} ] build: [ ["rm" "-r" "vendors"] diff --git a/src/proto_alpha/lib_protocol/test/regression/dune b/src/proto_alpha/lib_protocol/test/regression/dune new file mode 100644 index 000000000000..03227ca9d865 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/regression/dune @@ -0,0 +1,27 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + +(executable + (name main) + (libraries + tezt + tezos-base + tezos-protocol-alpha + tezos-client-alpha + tezos-protocol-plugin-alpha + tezos-alpha-test-helpers + tezos-micheline) + (flags + (:standard + -open Tezos_base.TzPervasives + -open Tezos_protocol_alpha + -open Tezos_client_alpha + -open Tezos_protocol_plugin_alpha + -open Tezos_alpha_test_helpers + -open Tezos_micheline))) + +(rule + (alias runtest) + (package tezos-protocol-alpha-tests) + (deps (glob_files contracts/*) (glob_files tezt/_regressions/*)) + (action (run %{dep:./main.exe}))) diff --git a/src/proto_alpha/lib_protocol/test/regression/tezt/dune b/src/proto_alpha/lib_protocol/test/regression/tezt/dune new file mode 100644 index 000000000000..e73910ff8342 --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/regression/tezt/dune @@ -0,0 +1 @@ +(dirs :standard _regressions) -- GitLab