mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-03-30 19:19:19 +00:00
Fix integration tests for build dir layout v2
This commit is contained in:
parent
d3df105167
commit
573d5a2acd
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user