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

Build fails when target file makes use of the include_str macro for reading data #366

Open
johnsaigle opened this issue Jun 19, 2024 · 3 comments

Comments

@johnsaigle
Copy link

cargo mutants appears to be unable to build and run a baseline when the unit test pulls in data from the filesystem via include_str!('../../some/path/to/test/data').

I imagine this happens because mutants is builds itself in its own directory and that messes up path resolution.

Any tips to address this?

@sourcefrog
Copy link
Owner

Can you try building with --in-place?

Is the path an relative path pointing outside of the Cargo workspace tree?

@sourcefrog
Copy link
Owner

Maybe if the baseline build fails then we should point to a doc with some debugging steps, including trying --in-place. A start on this is in https://github.com/sourcefrog/cargo-mutants/wiki/Troubleshooting.

@johnsaigle
Copy link
Author

johnsaigle commented Jun 20, 2024

Is the path an relative path pointing outside of the Cargo workspace tree?

Yes, and yes the baseline build did fail. I'll try with --in-place, thanks!

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

No branches or pull requests

2 participants