updated benchmarks to new ExecCli

This commit is contained in:
Anton-4 2024-10-25 20:45:59 +02:00
parent 745c99f321
commit 82beb35d3f
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
25 changed files with 40 additions and 90 deletions

View file

@ -812,10 +812,7 @@ mod cli_tests {
BUILD_PLATFORM_HOST.call_once(|| {
let cli_build = ExecCli::new(
CMD_BUILD,
file_from_root(
"crates/cli/tests/test-projects/benchmarks/platform",
"app.roc",
),
file_from_root("crates/cli/tests/benchmarks/platform", "app.roc"),
)
.arg(BUILD_HOST_FLAG)
.arg(SUPPRESS_BUILD_HOST_WARNING_FLAG)
@ -839,7 +836,7 @@ mod cli_tests {
stdin: Option<&'static str>,
use_valgrind: UseValgrind,
) {
let dir_name = "crates/cli/tests/test-projects/benchmarks";
let dir_name = "crates/cli/tests/benchmarks";
let roc_file_path = file_from_root(dir_name, roc_filename);
build_platform_host();

File diff suppressed because one or more lines are too long

View file

@ -14,7 +14,7 @@ const LINKER_FLAG: &str = concatcp!("--", roc_cli::FLAG_LINKER, "=", "legacy");
#[derive(Debug, Clone)]
pub struct ExecCli {
sub_command: &'static str, // build, dev, test...
roc_file_path: PathBuf,
pub roc_file_path: PathBuf,
args: Vec<OsString>,
}
@ -73,7 +73,7 @@ impl ExecCli {
}
}
fn check_build_and_run(
pub fn check_build_and_run(
&self,
expected_output: &'static str,
with_valgrind: bool,
@ -100,7 +100,7 @@ impl ExecCli {
}
// run executable produced by e.g. `roc build`
fn run_executable(
pub fn run_executable(
&self,
with_valgrind: bool,
app_stdin_opt: Option<&str>,