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

Use CARGO_BIN_EXE instead of hardcoded path for tests #98

Merged
merged 1 commit into from
Oct 12, 2020
Merged

Use CARGO_BIN_EXE instead of hardcoded path for tests #98

merged 1 commit into from
Oct 12, 2020

Conversation

orhun
Copy link
Contributor

@orhun orhun commented Oct 12, 2020

tests/auth.rs and tests/filters.rs contains the following path constant for running the binary in tests.

const SUCKIT: &'static str = "target/debug/suckit";

This seems to work with cargo test since it builds the binary in target/debug directory.
But in the cargo test --release case, those tests fail since the binary is located in target/release

This pull request removes the hardcoded path constant and uses the CARGO_BIN_EXE_<name> environment variable for finding the correct binary path. (See rust-lang/cargo#7697 for more information)

Copy link
Collaborator

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks!

Copy link
Owner

@Skallwar Skallwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@Skallwar Skallwar merged commit d9c17d9 into Skallwar:master Oct 12, 2020
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.

3 participants