From 1ce1e8902b73873bcd7f1627351185d158c71c21 Mon Sep 17 00:00:00 2001 From: Itay Tsabary Date: Mon, 25 Nov 2024 11:46:10 +0200 Subject: [PATCH] chore(sequencer_node): compile the node, not the entire project commit-id:7f25ebe8 --- .../src/test_utils/compilation.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/starknet_sequencer_node/src/test_utils/compilation.rs b/crates/starknet_sequencer_node/src/test_utils/compilation.rs index 645fe536aee..c58c40ff454 100644 --- a/crates/starknet_sequencer_node/src/test_utils/compilation.rs +++ b/crates/starknet_sequencer_node/src/test_utils/compilation.rs @@ -1,6 +1,7 @@ -use std::process::{Command, ExitStatus, Stdio}; -use std::{env, io}; +use std::io; +use std::process::{ExitStatus, Stdio}; +use infra_utils::command::create_shell_command; use tracing::info; #[cfg(test)] @@ -17,14 +18,13 @@ pub enum NodeCompilationError { /// Compiles the node using `cargo build` for testing purposes. fn compile_node() -> io::Result { - info!("Compiling the project"); - // Get the current working directory for the project - let project_path = env::current_dir().expect("Failed to get current directory"); + info!("Compiling the starknet_sequencer_node binary"); // Run `cargo build` to compile the project - let compilation_result = Command::new("cargo") + let compilation_result = create_shell_command("cargo") .arg("build") - .current_dir(&project_path) + .arg("--bin") + .arg("starknet_sequencer_node") .arg("--quiet") .stderr(Stdio::inherit()) .stdout(Stdio::inherit())