diff options
-rw-r--r-- | nix/candelabra.nix | 6 | ||||
-rw-r--r-- | src/Justfile | 2 | ||||
-rw-r--r-- | src/crates/candelabra/src/cost/benchmark.rs | 6 | ||||
-rw-r--r-- | src/crates/candelabra/src/paths.rs | 11 |
4 files changed, 20 insertions, 5 deletions
diff --git a/nix/candelabra.nix b/nix/candelabra.nix index 177cd56..4cd29c6 100644 --- a/nix/candelabra.nix +++ b/nix/candelabra.nix @@ -27,7 +27,11 @@ in ".*racket_specs.*" ".*crates/library.*" ".*crates/benchmarker.*" + ".*rust-toolchain.toml.*" + ".*Cargo.toml.*" + ".*Cargo.lock.*" ]} \ --prefix PATH : ${pkgs.callPackage ./racket-env.nix inputs}/bin \ - --prefix PATH : ${toolchain}/bin; + --prefix PATH : ${toolchain}/bin \ + --prefix PATH : ${pkgs.gcc}/bin; '' diff --git a/src/Justfile b/src/Justfile index 7c31771..2daa4c2 100644 --- a/src/Justfile +++ b/src/Justfile @@ -13,7 +13,7 @@ run-all-tests: echo "Candelabra Path: {{candelabra}}" @just section-start cost-models - @IMPLS=`cargo run -- list-library 2>&1 | cut -d ']' -f 2 | grep ::`; for impl in $IMPLS; do just cost-model $impl; done + @IMPLS=`{{candelabra}} list-library 2>&1 | cut -d ']' -f 2 | grep ::`; for impl in $IMPLS; do just cost-model $impl; done @just section-end cost-models @just section-start comparisons diff --git a/src/crates/candelabra/src/cost/benchmark.rs b/src/crates/candelabra/src/cost/benchmark.rs index 17164a1..79e2a16 100644 --- a/src/crates/candelabra/src/cost/benchmark.rs +++ b/src/crates/candelabra/src/cost/benchmark.rs @@ -71,7 +71,11 @@ pub fn run_benchmarks(name: &str, paths: &Paths, lib_specs: &LibSpecs) -> Result .current_dir(crate_.path()) .env("CARGO_TARGET_DIR", &paths.target_dir) // Share target directory .stdout(Stdio::piped()) - .stderr(Stdio::null()) + .stderr(if log_enabled!(Level::Debug) { + Stdio::inherit() + } else { + Stdio::null() + }) .spawn() .context("Error running build command")?; diff --git a/src/crates/candelabra/src/paths.rs b/src/crates/candelabra/src/paths.rs index 880697b..021110b 100644 --- a/src/crates/candelabra/src/paths.rs +++ b/src/crates/candelabra/src/paths.rs @@ -1,5 +1,8 @@ use camino::Utf8PathBuf; -use std::{env, path::PathBuf}; +use std::{ + env::{self, current_dir}, + path::PathBuf, +}; /// Paths used throughout execution #[derive(Debug, Clone)] @@ -17,7 +20,11 @@ impl Paths { library_crate: base.join("crates").join("library"), library_src: base.join("crates").join("library").join("src"), benchmarker_crate: base.join("crates").join("benchmarker"), - target_dir: Utf8PathBuf::from("./target"), + target_dir: { + let mut pwd = current_dir().unwrap(); + pwd.push("target"); + pwd.try_into().unwrap() + }, base, } } |