From cc3cb41f341e0d81559e07847113f83b20316e18 Mon Sep 17 00:00:00 2001 From: Yihau Chen Date: Wed, 6 Sep 2023 01:20:42 +0800 Subject: [PATCH 1/3] ci: remove -f from cargo install rustfilt (#33143) (cherry picked from commit 3a91d3cc6a2e11ca77904c77e6b281e0c3aef4c0) # Conflicts: # sdk/cargo-build-sbf/tests/crates.rs --- sdk/cargo-build-sbf/tests/crates.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/cargo-build-sbf/tests/crates.rs b/sdk/cargo-build-sbf/tests/crates.rs index 6fb6ad625a8a27..0fd04df854b8de 100644 --- a/sdk/cargo-build-sbf/tests/crates.rs +++ b/sdk/cargo-build-sbf/tests/crates.rs @@ -64,6 +64,7 @@ fn test_build() { #[serial] fn test_dump() { // This test requires rustfilt. +<<<<<<< HEAD assert!(Command::new("cargo") .args(["install", "-f", "rustfilt"]) .status() @@ -71,6 +72,13 @@ fn test_dump() { .success()); let output = run_cargo_build("noop", &["--dump"], "test_dump"); assert!(output.status.success()); +======= + assert_cmd::Command::new("cargo") + .args(["install", "rustfilt"]) + .assert() + .success(); + run_cargo_build("noop", &["--dump"], false); +>>>>>>> 3a91d3cc6a (ci: remove -f from cargo install rustfilt (#33143)) let cwd = env::current_dir().expect("Unable to get current working directory"); let dump = cwd .join("tests") From f4eb4a3715d8baa71b08a805a8b71dc553ca55e3 Mon Sep 17 00:00:00 2001 From: yihau Date: Wed, 6 Sep 2023 01:26:49 +0800 Subject: [PATCH 2/3] fix conflict --- sdk/cargo-build-sbf/tests/crates.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sdk/cargo-build-sbf/tests/crates.rs b/sdk/cargo-build-sbf/tests/crates.rs index 0fd04df854b8de..b6b220eaa20be2 100644 --- a/sdk/cargo-build-sbf/tests/crates.rs +++ b/sdk/cargo-build-sbf/tests/crates.rs @@ -64,21 +64,12 @@ fn test_build() { #[serial] fn test_dump() { // This test requires rustfilt. -<<<<<<< HEAD assert!(Command::new("cargo") - .args(["install", "-f", "rustfilt"]) + .args(["install", "rustfilt"]) .status() .expect("Unable to install rustfilt required for --dump option") .success()); let output = run_cargo_build("noop", &["--dump"], "test_dump"); - assert!(output.status.success()); -======= - assert_cmd::Command::new("cargo") - .args(["install", "rustfilt"]) - .assert() - .success(); - run_cargo_build("noop", &["--dump"], false); ->>>>>>> 3a91d3cc6a (ci: remove -f from cargo install rustfilt (#33143)) let cwd = env::current_dir().expect("Unable to get current working directory"); let dump = cwd .join("tests") From e4a424ee6e4fb64e8e4e997203d581e245127e20 Mon Sep 17 00:00:00 2001 From: yihau Date: Wed, 6 Sep 2023 01:28:12 +0800 Subject: [PATCH 3/3] fix conflict --- sdk/cargo-build-sbf/tests/crates.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/cargo-build-sbf/tests/crates.rs b/sdk/cargo-build-sbf/tests/crates.rs index b6b220eaa20be2..618d6c06f914d8 100644 --- a/sdk/cargo-build-sbf/tests/crates.rs +++ b/sdk/cargo-build-sbf/tests/crates.rs @@ -70,6 +70,7 @@ fn test_dump() { .expect("Unable to install rustfilt required for --dump option") .success()); let output = run_cargo_build("noop", &["--dump"], "test_dump"); + assert!(output.status.success()); let cwd = env::current_dir().expect("Unable to get current working directory"); let dump = cwd .join("tests")