Skip to content

Commit a351921

Browse files
committed
workaround cargo issue
1 parent 440248c commit a351921

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ci/svd2rust-regress/src/svd_test.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ impl TestCase {
191191
self.name(),
192192
chip_dir.display()
193193
);
194+
// XXX: Workaround for https://github.com/rust-lang/cargo/issues/6009#issuecomment-1925445245
195+
let manifest_path = crate::get_cargo_workspace().join("Cargo.toml");
196+
let workspace_toml =
197+
fs::read(&manifest_path).context("failed to read workspace Cargo.toml")?;
194198
Command::new("cargo")
195199
.env("USER", user)
196200
.arg("init")
@@ -201,6 +205,9 @@ impl TestCase {
201205
.arg(&chip_dir)
202206
.capture_outputs(true, "cargo init", None, None, &[])
203207
.with_context(|| "Failed to cargo init")?;
208+
std::fs::write(manifest_path, workspace_toml)
209+
.context("failed to write workspace Cargo.toml")?;
210+
204211
let svd_toml = path_helper_base(&chip_dir, &["Cargo.toml"]);
205212
let mut file = OpenOptions::new()
206213
.write(true)

0 commit comments

Comments
 (0)