Skip to content

Add Test.current_test_tags and Test.current_test_has_tag

Romain requested to merge romain-current-test into master

Description / Motivation

This proposal makes the list of tags of the current test accessible from the test itself easily.

The idea would be, in tezos/tezos, to use this as follows:

  • add Tag.node = "node"
  • prevent running octez-node if not (Test.current_test_has_tag "node")
  • modify the CI to only run tests with tag node if the node was modified

The latter is a bit tricky because the actual condition should rather be:

  • the test is an integration test that only tests executables
  • and it should be run if any of those executables have been modified

So I'm not completely sure that this proposal would really work. But we can discuss it here.

How to Test the MR Manually

There is a test, so run dune runtest.

Checklist

  • Update CHANGES.md. No need to document changes to documentation and tests.
  • Make sure all new values, types etc. are documented in .mli files and that the generated documentation looks ok.
  • Add tests in test/, if relevant.

Merge request reports