Skip to content

Commit

Permalink
chore(sequencer_node): compile the node, not the entire project
Browse files Browse the repository at this point in the history
commit-id:7f25ebe8
  • Loading branch information
Itay-Tsabary-Starkware committed Nov 25, 2024
1 parent 798be68 commit 1ce1e89
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/starknet_sequencer_node/src/test_utils/compilation.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand All @@ -17,14 +18,13 @@ pub enum NodeCompilationError {

/// Compiles the node using `cargo build` for testing purposes.
fn compile_node() -> io::Result<ExitStatus> {
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())
Expand Down

0 comments on commit 1ce1e89

Please sign in to comment.