test: Revert broken env! macro for bin resolution

This commit is contained in:
Riz Ashraf committed 2026-09-13 19:02:46 +01:00
1 parent a87e37cb53
commit a9a861abe1
2 files changed
+14 -5

No files matched your search

+9 -3
View File
@@ -48,11 +48,17 @@ async fn test_full_system_e2e_performance() {
let test_port = "3031"; // Use a distinct port let test_port = "3031"; // Use a distinct port
let server_exe = env!("CARGO_BIN_EXE_mcp-memory-server"); let mut server_exe = std::env::current_exe().unwrap();
let nvim_exe = env!("CARGO_BIN_EXE_mcp-memory-win-nvim"); server_exe.pop();
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())
+5 -2
View File
@@ -44,9 +44,12 @@ 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.
let nvim_exe = env!("CARGO_BIN_EXE_mcp-memory-win-nvim"); let mut nvim_exe = std::env::current_exe().unwrap();
nvim_exe.pop();
nvim_exe.pop();
nvim_exe.push("mcp-memory-win-nvim.exe");
let mut child = Command::new(nvim_exe) let mut child = Command::new(&nvim_exe)
.stdin(Stdio::piped()) .stdin(Stdio::piped())
.stdout(Stdio::piped()) .stdout(Stdio::piped())
.stderr(Stdio::piped()) .stderr(Stdio::piped())