Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental test code changed by a diff #162

Closed
wants to merge 20 commits into from

Conversation

sourcefrog
Copy link
Owner

Given a diff (e.g. of uncommitted or unmerged changes) test only mutants that intersect with changed regions.

Copy link

linear bot commented Nov 11, 2023

MUT-39 Incremental test changes in a diff

Elsewhere:

https://mull.readthedocs.io/en/0.21.0/IncrementalMutationTesting.html

Later: automatically run git diff to get the diff?

  • Find (or write?) some Rust library to parse the diff into lines
  • Take a diff as an option
  • Explore/document how to use this with diff?
  • Filter mutants that intersect with any of the "after" line numbers?
  • Check the "after" of the diff matches the current source; maybe warn if it does not because the diff might be out of sync with the source?

Maybe/later:

  • Automatically run git to get the diff?

I thought about reading only affected files, but in general we have to parse many of them to find sub-modules. I guess we could read affected modules or those that are plausibly parents of them… In general it seems very cheap.

@sourcefrog sourcefrog marked this pull request as ready for review November 13, 2023 01:14
sourcefrog added a commit that referenced this pull request Nov 13, 2023
@sourcefrog sourcefrog closed this Nov 13, 2023
@sourcefrog
Copy link
Owner Author

merged in 9e2833d

@sourcefrog sourcefrog deleted the mut-39-incremental-test-changes-in-a-diff branch January 16, 2024 16:21
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