Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,13 @@ async fn create_autocomplete_test_config() -> Result<String> {
/// Start the MCP server as a subprocess and return the transport
async fn start_mcp_server() -> Result<TokioChildProcess> {
let mut cmd = Command::new("cargo");
cmd.args(["run", "--bin", "terraphim_mcp_server"])
.stdin(std::process::Stdio::piped())
cmd.arg("run").arg("--bin").arg("terraphim_mcp_server");

if std::env::var_os("CI").is_some() {
cmd.arg("--features").arg("zlob");
}

cmd.stdin(std::process::Stdio::piped())
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped());

Expand Down
13 changes: 9 additions & 4 deletions crates/terraphim_mcp_server/tests/test_mcp_fixes_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ async fn test_mcp_log_separation_and_tools() -> Result<()> {
println!("🧪 Testing MCP server log separation and tool availability");

// Build the server first
let build_status = Command::new("cargo")
let mut build = Command::new("cargo");
build
.arg("build")
.arg("--package")
.arg("terraphim_mcp_server")
.status()
.await?;
.arg("terraphim_mcp_server");

if std::env::var_os("CI").is_some() {
build.arg("--features").arg("zlob");
}

let build_status = build.status().await?;

if !build_status.success() {
anyhow::bail!("Failed to build terraphim_mcp_server");
Expand Down
9 changes: 7 additions & 2 deletions crates/terraphim_mcp_server/tests/test_mcp_stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ fn test_mcp_autocomplete_via_stdio() {
// Start the MCP server
// NOTE: Don't pass --verbose here. It can enable non-JSON output on stdout,
// which breaks stdio JSON-RPC framing.
let mut child = Command::new("cargo")
.args(["run", "--"])
let mut command = Command::new("cargo");
command.arg("run");
if std::env::var_os("CI").is_some() {
command.arg("--features").arg("zlob");
}
let mut child = command
.args(["--"])
.current_dir(".")
.stdin(Stdio::piped())
.stdout(Stdio::piped())
Expand Down
9 changes: 7 additions & 2 deletions crates/terraphim_mcp_server/tests/test_tools_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ fn test_tools_list_only() {
println!("Starting MCP server test for tools list...");

// Start the MCP server
let mut child = Command::new("cargo")
.args(["run", "--", "--verbose"])
let mut command = Command::new("cargo");
command.arg("run");
if std::env::var_os("CI").is_some() {
command.arg("--features").arg("zlob");
}
let mut child = command
.args(["--", "--verbose"])
.current_dir(".")
.stdin(Stdio::piped())
.stdout(Stdio::piped())
Expand Down
Loading