diff --git a/src/docbuilder/rustwide_builder.rs b/src/docbuilder/rustwide_builder.rs index 21e950322..b0167a6ab 100644 --- a/src/docbuilder/rustwide_builder.rs +++ b/src/docbuilder/rustwide_builder.rs @@ -914,6 +914,7 @@ mod tests { storage.store_one(&old_source_file, Vec::new())?; let mut builder = RustwideBuilder::init(env).unwrap(); + builder.update_toolchain()?; assert!(builder.build_package(crate_, version, PackageKind::CratesIo)?); // check release record in the db (default and other targets) @@ -1039,6 +1040,7 @@ mod tests { storage.store_one(&old_source_file, Vec::new())?; let mut builder = RustwideBuilder::init(env).unwrap(); + builder.update_toolchain()?; assert!(!builder.build_package(crate_, version, PackageKind::CratesIo)?); // check release record in the db (default and other targets) @@ -1086,6 +1088,7 @@ mod tests { let crate_ = "thiserror-impl"; let version = "1.0.26"; let mut builder = RustwideBuilder::init(env).unwrap(); + builder.update_toolchain()?; assert!(builder.build_package(crate_, version, PackageKind::CratesIo)?); let storage = env.storage(); @@ -1109,6 +1112,7 @@ mod tests { let crate_ = "windows-win"; let version = "2.4.1"; let mut builder = RustwideBuilder::init(env).unwrap(); + builder.update_toolchain()?; if builder.toolchain.as_ci().is_some() { return Ok(()); } @@ -1158,6 +1162,7 @@ mod tests { let crate_ = "docs_rs_test_incorrect_lockfile"; let version = "0.1.2"; let mut builder = RustwideBuilder::init(env).unwrap(); + builder.update_toolchain()?; assert!(builder.build_package(crate_, version, PackageKind::CratesIo)?); Ok(()) @@ -1180,6 +1185,7 @@ mod tests { let crate_ = "docs_rs_test_incorrect_lockfile"; let version = "0.2.0"; let mut builder = RustwideBuilder::init(env).unwrap(); + builder.update_toolchain()?; assert!(builder.build_package(crate_, version, PackageKind::CratesIo)?); Ok(()) @@ -1193,6 +1199,7 @@ mod tests { let crate_ = "proc-macro2"; let version = "1.0.33"; let mut builder = RustwideBuilder::init(env).unwrap(); + builder.update_toolchain()?; assert!(builder.build_package(crate_, version, PackageKind::CratesIo)?); Ok(()) }); @@ -1205,6 +1212,7 @@ mod tests { let crate_ = "serde"; let version = "1.0.152"; let mut builder = RustwideBuilder::init(env).unwrap(); + builder.update_toolchain()?; assert!(builder.build_package(crate_, version, PackageKind::CratesIo)?); let mut conn = env.db().conn(); @@ -1231,6 +1239,7 @@ mod tests { let crate_ = "stylish-core"; let version = "0.1.1"; let mut builder = RustwideBuilder::init(env).unwrap(); + builder.update_toolchain()?; assert!(builder.build_package(crate_, version, PackageKind::CratesIo)?); let mut conn = env.db().conn(); @@ -1254,8 +1263,9 @@ mod tests { #[ignore] fn test_build_std() { wrapper(|env| { - assert!(RustwideBuilder::init(env)? - .build_local_package(Path::new("tests/crates/build-std"))?); + let mut builder = RustwideBuilder::init(env)?; + builder.update_toolchain()?; + assert!(builder.build_local_package(Path::new("tests/crates/build-std"))?); Ok(()) }) }