Skip to content

Be able to select tests according to their duration or memory usage

What

This MR adds TSL expressions like memory >= 100000 or duration < 60.

Why

Being able to select tests according to their duration or memory usage is useful:

  • to explore the list of tests (with --list --from-records);
  • to split tests to have some of them run in more powerful runners than others.

How

We extend the test selection language with int and float predicates. We provide the usual comparison operators. We extend the TSL tests to test those new features.

Manually testing the MR

There are unit tests, so you can check the CI or run:

dune runtest

To test manually, generate records with:

dune exec test/unix/main.exe -- --record-mem-peak --record record.json -j 2 --mem-poll-frequency 10000

Then play with the feature with queries like:

dune exec test/unix/main.exe -- --list --from-record record.json 'memory > 5000000 && duration > 1'

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

Loading