Skip to content

Conversation

@hnrklssn
Copy link
Member

@hnrklssn hnrklssn commented Nov 8, 2025

This adds a lit plugin wrapping the core of update-verify-tests. When
lit is invoked with --update-tests it will call the plugin, which checks
if the failure is due to a -verify mismatch. If it is, it tries to
repair the test. If the source file was originally created by
split-file, the changes are propagated to the parent file.

No tests are added, because I don't want to run nested llvm-lit tests
in Swift's test suite, but the core functionality is tested through
update-verify-tests.py.

This is based on top of #85390, only the last commit belongs to this PR.

`expected-expansion` can be a bit unergonomic to use, because it requires
pointing out not only the line, but also the column (which is not always
obvious), and the nested diagnostics have to refer to absolute lines
that aren't present in the source file. This makes both creating and
updating these test cases easier through automation.
This fixes a bug that was introduced where two diagnostics on the same
line, with the same content, would be emitted separately if they
occurred on separate columns. This despite the fact that neither of
these checks specify the column when emitted. The checks are now
properly merged again.
@hnrklssn
Copy link
Member Author

hnrklssn commented Nov 8, 2025

@swift-ci please smoke test

This adds a lit plugin wrapping the core of update-verify-tests. When
lit is invoked with --update-tests it will call the plugin, which checks
if the failure is due to a -verify mismatch. If it is, it tries to
repair the test. If the source file was originally created by
split-file, the changes are propagated to the parent file.

No tests are added, because I don't want to run nested llvm-lit tests
in Swift's test suite, but the core functionality is tested through
update-verify-tests.py.
@hnrklssn hnrklssn force-pushed the update-verify-tests-litplugin branch from 843ff8c to f1b504b Compare November 8, 2025 04:14
@hnrklssn
Copy link
Member Author

hnrklssn commented Nov 8, 2025

@swift-ci please smoke test

@hnrklssn
Copy link
Member Author

hnrklssn commented Nov 9, 2025

@swift-ci please smoke test windows platform

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.

1 participant