Skip to content

Conversation

@fsoikin
Copy link
Member

@fsoikin fsoikin commented Jul 17, 2023

The original implementation in #137 was a bit lazy: due to accidental complexity, it was very hard to return the whole test tree if the execution was stopped on first failure. However, down the stack it turned out that we do need the full tree after all, so this PR makes it happen.

Instead of a downstream filtering pipe, the failFast option is now checked during the tree traversal, and a mutable cell is used to indicate when the execution ought to stop. When that mutable flag is set, the tree traversal itself still runs to the end, producing the full tree, even though the actual example execution gets skipped. Accordingly, in that case, skipped tests will show up in the results as "pending".

The mutable cell is used instead of a, say, StateT, because of parallelization, which doesn't support StateT.

@fsoikin fsoikin force-pushed the better-fail-fast branch from 057a655 to b780539 Compare July 17, 2023 14:00
@fsoikin fsoikin force-pushed the better-fail-fast branch from b780539 to 6c75fe4 Compare July 17, 2023 14:01
@fsoikin fsoikin merged commit c4453b2 into master Jul 17, 2023
@fsoikin fsoikin deleted the better-fail-fast branch July 17, 2023 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants