llvm-project
6c3f18eb - [Utils] Adds support for diff based tests to lit's --update-tests (#154147)

Commit
24 days ago
[Utils] Adds support for diff based tests to lit's --update-tests (#154147) This adds an updater to lit's --update-tests flag with support for `diff`. If a RUN line containing the `diff` command fails, this function will use heuristics to try to deduce which file is the "reference" file, and copy the contents of the other file to the reference. If it cannot deduce which file is the reference file, it does nothing. The heuristics are currently: - does one of the files end in .expected while the other does not? Then the .expected file is the reference. - does one of the file paths contain the substring ".tmp" while the other does not? Then the file not containing ".tmp" is the reference. This matches cases where one file path is constructed using the `%t` substitution.
Author
Parents
Loading