Manifezt: Refine glob for running Tezt scenarios on kernel changes

What

Currently, Manifezt does not run the Tezt tests of Etherlink when the kernel is modified. Take, for instance, the following snippet

; ORIGIN=upstrseam manifest/manifest --manifezt etherlink/kernel_evm/evm_evaluation/src/evalhost.rs
false

Why

This one is a bit complicated. It is actually the conjunction of two factors (as far as I can tell)

  1. The dep_globs field of _tezt_etherlink is wrong to begin with: the paths should be relative to etherlink/tezt/tests, not the root of the repository
  2. Manifezt does not support properly wildcard. See this comment in the Manifest code.
     For now, this is an overapproximation because we do not want to implement
     the whole glob syntax. Special characters are only special after the last "/",
     so we can ignore what is after "/" and just check if something changed in
     the directory.

I’m not totally sure about the claim that the current implementation is an overapproximation. I am under the impression it’s a bit more complicated than that and entries like path/*/*.rs will just be dropped (but I might be wrong).

How

Anyway, to fix this, we first fix the relativeness of the paths. Additionally, we declare the content of etherlink/kernel_evm as a dependency for _tezt_etherlink. This is most surely an approximation, but I think we can live with it.

Manually testing the MR

Using the command from the first section, the result should now be the one expected.

; ORIGIN=upstrseam manifest/manifest --manifezt etherlink/kernel_evm/evm_evaluation/src/evalhost.rs
file = "etherlink/tezt/tests/evm_rollup.ml" || file = "etherlink/tezt/tests/evm_sequencer.ml"

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 Thomas Letan

Merge request reports

Loading