Write generated tests to OUT_DIR instead of repo working dir #235
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the build script to write generated integration tests to the
OUT_DIR
in accordance to The Cargo Book :Additionally, the current method of writing tests to the repo working directory during builds causes issues with hermetic build systems that need the source to be hashable and hence immutable. Such systems require that any artifacts created during the build process are written outside the source directory into a designated output location. Projects using this library as a direct dependency can work around by overriding the default feature set (which is a bit awkward). But for transitive dependencies this is fairly problematic.
I've attached a log from running the integration tests to demonstrate that they can and are still being run from the output directory: test-output.log
Another run, but injecting a fault into the snippets to demonstrate that it runs against the snippets from the repo and not empty modules or extraneous code: fault-injection.log
All Submissions:
dev
branch. Did you create your branch fromdev
?P.S. Might be helpful to include the link to CONTRIBUTING in the PR template in checkbox 2