Add regression tests for logging machinery in Michelson interpreter
Context
It was recently found that existing regression tests don't cover logging in Michelson interpreter enough. This resulted in a few bugs that we fortunately found quickly, but which had nonetheless slipped throught the CI. It's true that changes which could impact logging aren't that common, so maybe it isn't worthwhile to run these tests in the CI, but it's still good to have them available when changes might be suspected.
These tests are written using Tezt.Regression library, even though they don't exercise Tezos binaries, but rather are linked against the protocol and call the interpreter directly. This is a novelty, which may simultaneously serve as a proof of concept for (re-)writing other tests that we have with Tezt. One annoyance is that regression output is stored in src/proto_alpha/lib_protocol/test/regressions/tezt/_regressions. Unfortunately there's no way around this for the moment except to supply an alternative path manually on the CLI whenever these tests are run. It was suggested that some dune trickery might be used to add that parameter, but it hasn't been done so far.
So far there is only a single script written and I obviously need to add a lot more. Still the OCaml code for it is more or less ready; added scripts will be detected automatically, so no major changes to what has already been written are expected.
Manually testing the MR
$ cd src/proto_alpha/lib_protocol/test/regression && dune exec ./main.exe
Checklist
-
Add more testing contracts. -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR