Commit Graph

3 Commits

Author SHA1 Message Date
Henrik G. Olsson 6de8505906 [utils] extract split file support into helper file
Both update_verify_tests and update_generated_tests use the same utility
class for dealing with split-file tests. Extract it into a shared
helper.
2026-02-25 20:37:52 -08:00
Henrik G. Olsson 1fa1af4410 [utils] save hash of GENERATED-BY output
By hashing the output, the test updater won't trigger for failures
unrelated to the test file being outdated. That is, if the generated
test output hasn't changed, then regenerating the test surely won't fix
it. This serves two purposes:
 - it allows someone to make edits to the output (e.g. add comments) and
   not have them overwritten all the time
 - only one test updater is allowed to make updates each test failure,
   so if the generated file hasn't changed, it shouldn't prevent other
   test updaters from executing
2026-02-25 20:25:10 -08:00
Henrik G. Olsson 2eb5c22b39 [utils] add GENERATED-BY: automatic test file generation
This adds an automatic test updater that checks for GENERATED-BY:
comments containing a command whose stdout is used to populate a file,
or a split-file slice in a file.

The test updater applies the same lit substitutions as would be applied
in a RUN: line, allowing Swift tool usage in the run line.
2026-02-25 19:47:48 -08:00