Alcotezt-UX: fix invocation headers
Related issue #5084 (closed)
Invocation headers
- Test files have traditionally contained a "test header", as described here: https://tezos.gitlab.io/developer/testing.html#conventions, including an invocation header.
- During the project, we've broken most of the invocation headers. Here's an example of a broken header: https://gitlab.com/tezos/tezos/blob/master/src/proto_016_PtMumbai/lib_client/test/test_client_proto_context.ml#L29
The current fix is to rewrite it as:
dune exec [TEST_FOLDER]/main.exe
These are the files that have been changed from alcotest to alcotezt that there headers need to update.
Updating invocations automatically
The script fix-invocations.sh at https://gitlab.com/-/snippets/2517981 can be used to update invocation headers of all detected test targets in a given folder (recursively). Run fix-invocations.sh --help for more information.
Testing invocations automatically
The script test-invocations.sh at https://gitlab.com/-/snippets/2517157 can be used to check that invocations headers are correct, or at least that do not fail immediately when executed. It finds all the invocation headers in a given folder (recursively), and "tests" that they work by executing them for a limited time. Run test-invocations.sh --help for more information.
Non-protocol tests
-
lib_base/test -
lib_clic/test -
lib_client_base/test -
lib_client_base_unix/test -
lib_context/test -
lib_crypto/test -
lib_crypto/test-unix -
lib_error_monad/test -
lib_mockup/test -
lib_protocol_environment/test_shell_context -
lib_protocol_environment/test -
lib_proxy/test -
lib_proxy/test-helpers/shell_services/test
-
lib_requester/test -
lib_rpc_http/test -
lib_shell/test -
lib_shell_services/test -
lib_signer_backends/test -
lib_signer_backends/unix/test -
lib_stdlib/test -
lib_stdlib/test-unix -
lib_stdlib_unix/test -
lib_workers/test
-
lib_proxy_server_config/test -
lib_p2p/tezt -
lib_layer2_store/test
These files will be updated together with the translation:
Alcotezt translation not merge yet:
- [ ]
lib_p2p/test (not merge), !7997 (merged)- [ ]
lib_tree_encoding/test (not merge)- [ ]
lib_store/unix/test (not merge)- [ ]
lib_version/test (not merge )- [ ]
lib_scoru_wasm/test (not merge, no headers, copyright)
, !7988 (merged)- [ ]
lib_scoru_wasm/fast/test (not merge, no header), !7988 (merged)- [ ] lib/hacl/test (not merge) !7698 (merged)
Folders that have no headers originally. Adding them in this MR: !8140 (merged)
-
lib_benchmark/test(no headers) -
lib_lwt_result_stdlib/test(no headers) -
lib_lazy_containers/test(no headers) -
lib_webassembly/tests(no copyright, no header) -
lib_sapling/test(no copyright, no headers) -
lib_crypto_dal/test(no copyright, no headers)
Protocol tests that have no headers and/or no copyright:
-
proto_015_PtLimaPt/lib_benchmark/test -
proto_016_PtMumbai/lib_benchmark/test -
proto_alpha/lib_benchmark/test -
proto_015_PtLimaPt/lib_delegate/test -
proto_016_PtMumbai/lib_delegate/test -
proto_alpha/lib_delegate/test
Protocol tests
-
proto_015_PtLimaPt/lib_client/test -
proto_016_PtMumbai/lib_client/test -
proto_alpha/lib_client/test -
proto_015_PtLimaPt/lib_plugin/test -
proto_016_PtMumbai/lib_plugin/test -
proto_alpha/lib_plugin/test -
proto_015_PtLimaPt/lib_protocol/test/pbt -
proto_016_PtMumbai/lib_protocol/test/pbt -
proto_alpha/lib_protocol/test/pbt
-
proto_015_PtLimaPt/lib_protocol/test/integration/consensus -
proto_016_PtMumbai/lib_protocol/test/integration/consensus -
proto_alpha/lib_protocol/test/integration/consensus -
proto_015_PtLimaPt/lib_protocol/test/integration/gas -
proto_016_PtMumbai/lib_protocol/test/integration/gas -
proto_alpha/lib_protocol/test/integration/gas -
proto_015_PtLimaPt/lib_protocol/test/integration/operations -
proto_016_PtMumbai/lib_protocol/test/integration/operations -
proto_alpha/lib_protocol/test/integration/operations
-
proto_015_PtLimaPt/lib_protocol/test/integration/michelson -
proto_016_PtMumbai/lib_protocol/test/integration/michelson -
proto_alpha/lib_protocol/test/integration/michelson
-
proto_015_PtLimaPt/lib_protocol/test/integration/validate -
proto_016_PtMumbai/lib_protocol/test/integration/validate -
proto_alpha/lib_protocol/test/integration/validate -
proto_015_PtLimaPt/lib_protocol/test/integration -
proto_016_PtMumbai/lib_protocol/test/integration -
proto_alpha/lib_protocol/test/integration
-
proto_015_PtLimaPt/lib_protocol/test/unit -
proto_016_PtMumbai/lib_protocol/test/unit -
proto_alpha/lib_protocol/test/unit -
proto_015_PtLimaPt/lib_protocol/test/regression -
proto_016_PtMumbai/lib_protocol/test/regression -
proto_alpha/lib_protocol/test/regression -
proto_016_PtMumbai/lib_dal/test -
proto_alpha/lib_dal/test -
proto_alpha/lib_dac_plugin/test