From 573d5a2acd5a6541c459b228d994e5281b764684 Mon Sep 17 00:00:00 2001 From: mo8it Date: Tue, 17 Mar 2026 11:56:36 +0100 Subject: [PATCH] Fix integration tests for build dir layout v2 --- tests/integration_tests.rs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index c7119914..91d0536e 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -1,5 +1,4 @@ use std::{ - env::{self, consts::EXE_SUFFIX}, process::{Command, Stdio}, str::from_utf8, }; @@ -40,20 +39,7 @@ impl<'a> Cmd<'a> { #[track_caller] fn assert(&self, success: bool) { - let rustlings_bin = { - let mut path = env::current_exe().unwrap(); - // Pop test binary name - path.pop(); - // Pop `/deps` - path.pop(); - - path.push("rustlings"); - let mut path = path.into_os_string(); - path.push(EXE_SUFFIX); - path - }; - - let mut cmd = Command::new(rustlings_bin); + let mut cmd = Command::new(env!("CARGO_BIN_EXE_rustlings")); if let Some(current_dir) = self.current_dir { cmd.current_dir(current_dir);