This is an archive of the discontinued LLVM Phabricator instance.

[Dexter] Add DexFinishTest command to conditionally early-exit a test program
ClosedPublic

Authored by StephenTozer on Oct 18 2021, 5:08 AM.

Details

Summary

Some programs to be tested by Dexter have inconvenient termination conditions, either terminating long after all test commands have been exhausted or never self-terminating at all. This can be fixed by editing the test source to add a new exit condition(s), but doing so may affect debug info, and the "correct" place to exit may be different across different tests for the same program.

This patch adds a command, DexFinishTest, that allows a Dexter test to be conditionally finished at a given breakpoint. This command has the same set of arguments as DexLimitSteps, except that it does not allow a line range (from_line, to_line), only a single line (on_line). When it is triggered the debugger is closed and the test is finished - this does not affect the scoring in Dexter, except in that no further step information will be gathered.

Diff Detail

Event Timeline

StephenTozer requested review of this revision.Oct 18 2021, 5:08 AM
StephenTozer created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 18 2021, 5:08 AM
Orlando accepted this revision.Oct 19 2021, 2:00 AM

LGTM, nice to see so many tests

This revision is now accepted and ready to land.Oct 19 2021, 2:00 AM
This revision was landed with ongoing or failed builds.Oct 22 2021, 11:41 AM
This revision was automatically updated to reflect the committed changes.