muter-mutation-testing / muter

🔎 Automated mutation testing for Swift 🕳️
MIT License
496 stars 39 forks source link

Muter cleans up after itself in response to UNIX signals #3

Closed SeanROlszewski closed 5 years ago

SeanROlszewski commented 5 years ago

Right now, if you interrupt Muter while it's running, it's most likely that a user's codebase will still contain a mutant. This issue is to improve Muter's cleanup process by registering handlers for UNIX signals.

SeanROlszewski commented 5 years ago

Relevant: https://stackoverflow.com/questions/45713819/trapping-signals-in-a-swift-command-line-application

ZevEisenberg commented 5 years ago

This could be made much easier and safer by having Muter work on a copy of the user’s code base in /tmp. And with APFS, copies should be nearly free. And even on HFS+, I don’t think you’re going to run into serious performance issues by copying the repo before mutating. You could have a flag like --no-copy to disable this for CI builds.

SeanROlszewski commented 5 years ago

That’s a great point. It’s less complex to run the testing in an environment where you’re not concerned with unintentionally leaving bugs behind. After thinking about the work involved with adding signal support for this issue, I’m thinking there’s a new (and simpler) issue around changing how Muter ensures the integrity of the codebase it’s working with. On Tue, Dec 25, 2018 at 22:24 Zev Eisenberg notifications@github.com wrote:

This could be made much easier and safer by having Muter work on a copy of the user’s code base in /tmp. And with APFS, copies should be nearly free. And even on HFS+, I don’t think you’re going to run into serious performance issues by copying the repo before mutating. You could have a flag like --no-copy to disable this for CI builds.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SeanROlszewski/muter/issues/3#issuecomment-449895960, or mute the thread https://github.com/notifications/unsubscribe-auth/ACFi8r8fobVIrvspQQ-dsCRDdy0aLIDfks5u8uvdgaJpZM4ZgjYP .

SeanROlszewski commented 5 years ago

git issue is being closed because #13 was merged in. This can be reopened in the future if this is decided to be important.