Skip to content

Commit 573d5a2

Browse files
committed
Fix integration tests for build dir layout v2
1 parent d3df105 commit 573d5a2

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

tests/integration_tests.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::{
2-
env::{self, consts::EXE_SUFFIX},
32
process::{Command, Stdio},
43
str::from_utf8,
54
};
@@ -40,20 +39,7 @@ impl<'a> Cmd<'a> {
4039

4140
#[track_caller]
4241
fn assert(&self, success: bool) {
43-
let rustlings_bin = {
44-
let mut path = env::current_exe().unwrap();
45-
// Pop test binary name
46-
path.pop();
47-
// Pop `/deps`
48-
path.pop();
49-
50-
path.push("rustlings");
51-
let mut path = path.into_os_string();
52-
path.push(EXE_SUFFIX);
53-
path
54-
};
55-
56-
let mut cmd = Command::new(rustlings_bin);
42+
let mut cmd = Command::new(env!("CARGO_BIN_EXE_rustlings"));
5743

5844
if let Some(current_dir) = self.current_dir {
5945
cmd.current_dir(current_dir);

0 commit comments

Comments
 (0)