Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 8b74603

Browse files
committed
Update to work on beta
Cargo's output directory has a slightly different structure, so finding a sibling executable is a little different than before
1 parent 2a27aa2 commit 8b74603

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/smoke.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ impl ItmDump {
2020
pub fn new() -> ItmDump {
2121
let td = TempDir::new("itmdump").unwrap();
2222
let path = td.path().join("fifo");
23-
let mut child = Command::new(env::current_exe()
24-
.unwrap()
25-
.parent()
26-
.unwrap()
27-
.join("itmdump"))
23+
let mut me = env::current_exe().unwrap();
24+
me.pop();
25+
if me.ends_with("deps") {
26+
me.pop();
27+
}
28+
let mut child = Command::new(me.join("itmdump"))
2829
.arg(&path)
2930
.stdout(Stdio::piped())
3031
.spawn()

0 commit comments

Comments
 (0)