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

Integrate integration tests in a single binary #459

Closed
wants to merge 1 commit into from

Conversation

max-sixty
Copy link
Collaborator

This looks like a big diff but is actually quite small! It moves the tests to a single binary as per https://matklad.github.io/2021/02/27/delete-cargo-integration-tests.html. We've used this pattern quite successfully in PRQL.

Running time sh -c 'touch src/lib.rs; cargo test --tests --all-features':

  • 3.96 secs on master
  • 2.21 secs on proposed

...so not such a proportional difference that this we absolutely have to merge this, but high in relative space. It also makes the test output smoother / less jittery when running tests in a loop fwiw.

FYI the only test I didn't put into the single binary was test_clash_detection.rs, because that seems to want to be alone.

@max-sixty max-sixty force-pushed the single-test-binary branch from 47d2c31 to d9baad2 Compare March 7, 2024 20:27
@max-sixty max-sixty force-pushed the single-test-binary branch from d9baad2 to 2739a20 Compare March 7, 2024 20:29
@mitsuhiko
Copy link
Owner

I will close this. Not because I don't want to do it, but it's at the moment too much mental overhead to go ahead with this change.

@mitsuhiko mitsuhiko closed this Mar 27, 2024
max-sixty added a commit to max-sixty/insta that referenced this pull request Sep 22, 2024
Not as extreme as mitsuhiko#459, but consolidates a few files that were separate binaries and 1-2 functions.
max-sixty added a commit that referenced this pull request Sep 22, 2024
Not as extreme as #459, but
consolidates a few files that were separate binaries and 1-2 functions.
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.

2 participants