[go: up one dir, main page]

Alcotezt: merge [@runtezt] into [@runtest]

Context

Rework of !7968 (closed), @raphael-proust wrote the code.

This MR gets rid of the runtezt alias and uses the traditional runtest alias instead.

The original reason for not attaching Tezt tests to the runtest is it would make them run twice in the CI:

  • Once when we build @runtest in jobs like unit:non-proto-x86_64
  • Once in the Tezt jobs

This MR fixes this issue by attaching the Tezt tests to runtest alias but qualified with an enabled_if that deactivates the tests if they run in the CI (detected through a new RUNTEZTALIAS environment variable). We then set RUNTEZTALIAS to false globally in the CI. However, we still want the Tezt tests to run in the opam package tests where we test the --with-test option of opam install. Therefore, we set RUNTEZTALIAS to true in those jobs.

We also switch from using the executable(s) stanza for test executables. Instead, we use the test(s) stanza, so that tests are automatically attached to the runtest alias. To adapt to this change, some executables which are arguable not automated tests switched manifest constructor form test(s) to private_exe (in the last commit).

Manually testing the MR

  • Try dune runtest --force @src/lib_clic/test/ while setting the environment variable RUNTEZTALIAS to true or false. No tests should run when RUNTEZTALIAS=false.

  • Tezt tests should be running locally in the runtest alias: dune runtest --force @src/lib_clic/test/

  • Tezt tests should not be running in the unit:* jobs

  • Tezt tests should be running in the opam:* jobs (see e.g. opam:tezos-clic)

  • Tezt tests should be running in the OCaml opam CI (hard to check before release)

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
Edited by Arvid Jakobsson

Merge request reports

Loading