(config: &ExecutorConfig)
| 2 | use crate::prelude::*; |
| 3 | |
| 4 | pub fn get_bench_command(config: &ExecutorConfig) -> Result<String> { |
| 5 | let bench_command = &config.command.trim(); |
| 6 | |
| 7 | if bench_command.is_empty() { |
| 8 | bail!("The bench command is empty"); |
| 9 | } |
| 10 | |
| 11 | Ok(bench_command |
| 12 | // Fixes a compatibility issue with cargo 1.66+ running directly under valgrind <3.20 |
| 13 | .replace("cargo codspeed", "cargo-codspeed")) |
| 14 | } |
| 15 | |
| 16 | #[cfg(test)] |
| 17 | mod tests { |
no test coverage detected