Skip to content

Commit 9fe8f02

Browse files
authored
Merge pull request #1261 from syphar/linux-default-target-tests
set default target to linux for tests so we can run the tests on non-linux machines
2 parents 4c80a04 + 901726c commit 9fe8f02

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/test/fakes.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,11 @@ impl<'a> FakeRelease<'a> {
325325
if let Some(markdown) = self.readme {
326326
fs::write(crate_dir.join("README.md"), markdown)?;
327327
}
328-
let default_target = self.default_target.unwrap_or(docsrs_metadata::HOST_TARGET);
328+
329+
// Many tests rely on the default-target being linux, so it should not
330+
// be set to docsrs_metadata::HOST_TARGET, because then tests fail on all
331+
// non-linux platforms.
332+
let default_target = self.default_target.unwrap_or("x86_64-unknown-linux-gnu");
329333
let release_id = crate::db::add_package_into_database(
330334
&mut db.conn(),
331335
&package,

0 commit comments

Comments
 (0)