Skip to content

Commit

Permalink
tests: don't use hardcoded executable path
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen authored and oconnor663 committed Nov 3, 2024
1 parent e5f01f8 commit d7fed73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions bao_bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ rayon = ["blake3/rayon"]
[dependencies]
arrayref = "0.3.5"
bao = { path = "..", version = "0.12" }
assert_cmd = "2.0.16"
blake3 = "1.0.0"
docopt = "1.1.0"
failure = "0.1.5"
Expand Down
8 changes: 2 additions & 6 deletions bao_bin/tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use duct::cmd;
use rand::prelude::*;
use std::env::consts::EXE_EXTENSION;
use std::fs;
use std::path::{Path, PathBuf};
use std::path::PathBuf;
use std::sync::Once;
use tempfile::tempdir;

Expand All @@ -15,10 +14,7 @@ pub fn bao_exe() -> PathBuf {
.expect("build failed");
});

Path::new("target")
.join("debug")
.join("bao")
.with_extension(EXE_EXTENSION)
assert_cmd::cargo::cargo_bin("bao")
}

#[test]
Expand Down

0 comments on commit d7fed73

Please sign in to comment.