[go: up one dir, main page]

Alcotezt: automatically add proto tag

Context

Automatically add the proto tag based on the test file path. This is not yet ideal, it should rely on the lib tezt_tezos but I'm afraid I need to move around a lot of declarations in the manifest (whereas it's just a +1/-1 in the dune file :().

It makes it much easier to run all the tests of a given protocol.

Before:

$ dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe -- --list
+--------------+---------------------------------------------------------------------+----------+
|     FILE     |                                TITLE                                |   TAGS   |
+--------------+---------------------------------------------------------------------+----------+
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Tez_repr.ml                   | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Contract_repr.ml              | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Destination_repr.ml           | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Operation_repr.ml             | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Global_constants_storage.ml   | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: fitness                       | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: fixed point computation       | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: level module                  | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: qty                           | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: round                         | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: time                          | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: receipt encodings             | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: saturation arithmetic         | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: gas monad                     | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup storage             | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup game                | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: liquidity baking              | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup wasm                | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup arith               | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: merkle list                   | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup inbox               | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: skip list                     | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup management protocol | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Bond_id_repr.ml               | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: zk rollup storage             | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Delegate_consensus_key.ml     | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: local_contexts                | alcotezt |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: dal slot proof                | alcotezt |
+--------------+---------------------------------------------------------------------+----------+

After:

$ dune exec src/proto_017_PtNairob/lib_protocol/test/unit/main.exe -- --list
+--------------+---------------------------------------------------------------------+-------------------+
|     FILE     |                                TITLE                                |       TAGS        |
+--------------+---------------------------------------------------------------------+-------------------+
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Tez_repr.ml                   | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Contract_repr.ml              | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Destination_repr.ml           | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Operation_repr.ml             | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Global_constants_storage.ml   | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: fitness                       | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: fixed point computation       | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: level module                  | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: qty                           | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: round                         | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: time                          | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: receipt encodings             | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: saturation arithmetic         | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: gas monad                     | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup storage             | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup game                | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: liquidity baking              | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup wasm                | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup arith               | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: merkle list                   | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup inbox               | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: skip list                     | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: sc rollup management protocol | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Bond_id_repr.ml               | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: zk rollup storage             | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: Delegate_consensus_key.ml     | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: local_contexts                | alcotezt, nairobi |
| test_main.ml | protocol > unit: [Unit] 017-PtNairob: dal slot proof                | alcotezt, nairobi |
+--------------+---------------------------------------------------------------------+-------------------+

Specify related merge requests, specifically dependencies. -->

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading