Skip to content

Ocamltest tests that trigger upon failure of a previous action #13248

@OlivierNicole

Description

@OlivierNicole

In ocamltest tests, it would be useful to have a concept of test blocks that are triggered upon failure of a previous action. For instance, you can currently trigger a test only on macOS using:

macos;
{
  ...
}

However, to trigger a test on non-macOS configs, you would need to modify ocamltest to add a new “builtin action” not-macos, which doesn’t exist at time of writing. But maybe we could do something like:

macos;
{
  (* Executed on macOS *)
}
!{
  (* Executed on non-macOS *)
}

Conceptually, both { } and !{ } denote chlidren nodes, but !{ } nodes would be triggered upon failure of the parent action.

Having this would allow to avoid having both windows and not-windows in the “bulitin actions”.

Let me know if I’m missing something.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions