diff --git a/.gitlab/merge_request_templates/alcotezt.md b/.gitlab/merge_request_templates/alcotezt.md new file mode 100644 index 0000000000000000000000000000000000000000..6948c19febbd62f53ec2c7d53fcbdd66f4c7590f --- /dev/null +++ b/.gitlab/merge_request_templates/alcotezt.md @@ -0,0 +1,95 @@ + + + + +# Context + +Related to: !6760 and #4741. + +This MR applies the Alcotezt wrapper on the tests: `[TEST_FOLDERS]` + +This wraps the tests in a Tezt compatibility layer. In short, this +means that the above tests are now executed through Tezt, enabling an +improved UI and automated load balancing. For more info on the +Alcotezt rationale, see !6760. + +Practically, this entails that this MR will typically contain: + - Modifications to `manifest/main.ml` for the tests in question to use + the `tezt` instead of `test` registration function, and regenerate + dune and opam files. + - Extending the compatibility layer `tezt/lib_alcotezt` + - Modifying the tests in question to better fit Alcotezt + + + + +# Manually testing the MR + + + +## Locally + +Running the test: + +``` +dune exec [TEST_FOLDER]/main.exe -- --info +``` + +(passing `--info` prints individual Alcotest cases executed) + +The tests in `[TEST_FOLDER]` no longer register a `runtest` +alias. Instead, a `runtezt` alias is registered: + +``` +dune build @[TEST_FOLDER]/runtezt +``` + +When registered in manifest with the `tezt` function, the test modules +are automatically linked with the main tezt entrypoint +`tezt/tests/main.exe`. This means that one can also run the tests with: + +``` +alias tezt='dune exec tezt/tests/main.exe --' +tezt --list --file [TEST_FILE] +``` + +## In the CI + +As the tests are linked with `tezt/tests/main.exe`, they run in the CI +in the `tezt` jobs. The GitLab interface offers little +to find individual test cases in the set of tezt jobs, but you can +download the Tezt records from a pipeline on this MR +(e.g. `[PIPELINE_ID]`) and check that they contain the test in +question: + +``` +PIPELINE=[PIPELINE_ID] dune exec ./tezt/records/update.exe +cat tezt/records/*.json | jq -c 'map(select(.file=="[TEST_FILE]"))[]' +``` + +# Checklist + +- [ ] Document the interface of any function added or modified (see the [coding guidelines](https://tezos.gitlab.io/developer/guidelines.html)) +- [ ] Document any change to the user interface, including configuration parameters (see [node configuration](https://tezos.gitlab.io/user/node-configuration.html)) +- [ ] Provide automatic testing (see the [testing guide](https://tezos.gitlab.io/developer/testing.html)). +- [ ] 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). +- [x] Select suitable reviewers using the `Reviewers` field below. +- [ ] Select as `Assignee` the next person who should [take action on that MR](https://tezos.gitlab.io/developer/contributing.html#merge-request-assignees-field) + +/assign me + +/assign_reviewer @abate @arvidnl + +/label ~"test ⚒" ~tests::tezt + +/milestone %"Unit tezts / Alcotezt"