Skip to content

set default target to linux for tests so we can run the tests on non-linux machines #1261

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

Merged
merged 2 commits into from
Jan 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/test/fakes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,11 @@ impl<'a> FakeRelease<'a> {
if let Some(markdown) = self.readme {
fs::write(crate_dir.join("README.md"), markdown)?;
}
let default_target = self.default_target.unwrap_or(docsrs_metadata::HOST_TARGET);

// Many tests rely on the default-target being linux, so it should not
// be set to docsrs_metadata::HOST_TARGET, because then tests fail on all
// non-linux platforms.
let default_target = self.default_target.unwrap_or("x86_64-unknown-linux-gnu");
let release_id = crate::db::add_package_into_database(
&mut db.conn(),
&package,
Expand Down