test: Fix test binary resolution for llvm-cov

This commit is contained in:
Riz Ashraf committed 2026-09-13 19:01:06 +01:00
1 parent cf5b40ceb6
commit a87e37cb53
2 files changed
+6 -13

No files matched your search

+3 -9
View File
@@ -48,17 +48,11 @@ async fn test_full_system_e2e_performance() {
let test_port = "3031"; // Use a distinct port let test_port = "3031"; // Use a distinct port
let mut server_exe = std::env::current_exe().unwrap(); let server_exe = env!("CARGO_BIN_EXE_mcp-memory-server");
server_exe.pop(); let nvim_exe = env!("CARGO_BIN_EXE_mcp-memory-win-nvim");
server_exe.pop();
server_exe.push("mcp-memory-server.exe");
let mut nvim_exe = server_exe.clone();
nvim_exe.pop();
nvim_exe.push("mcp-memory-win-nvim.exe");
// 1. Start Server // 1. Start Server
let mut server = Command::new(&server_exe) let mut server = Command::new(server_exe)
.env("MCP_PORT", test_port) .env("MCP_PORT", test_port)
.env("MCP_MEMORY_STORE_DIR", temp_dir.to_str().unwrap()) .env("MCP_MEMORY_STORE_DIR", temp_dir.to_str().unwrap())
.stdout(Stdio::null()) .stdout(Stdio::null())
+3 -4
View File
@@ -44,10 +44,9 @@ fn read_message(stdout: &mut std::process::ChildStdout) -> Option<Value> {
#[test] #[test]
fn test_mcp_initialization_and_tools_list() { fn test_mcp_initialization_and_tools_list() {
// Determine the path to the built binary. // Determine the path to the built binary.
// cargo test automatically sets CARGO_BIN_EXE_<name> for binary targets! let nvim_exe = env!("CARGO_BIN_EXE_mcp-memory-win-nvim");
let exe_path = env!("CARGO_BIN_EXE_mcp-memory-win-nvim");
let mut child = Command::new(nvim_exe)
let mut child = Command::new(exe_path)
.stdin(Stdio::piped()) .stdin(Stdio::piped())
.stdout(Stdio::piped()) .stdout(Stdio::piped())
.stderr(Stdio::piped()) .stderr(Stdio::piped())