mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-11 18:58:24 +03:00
Remove remaining usages of cli_testing_examples folder
This commit is contained in:
parent
40b2b908f4
commit
ae6516d54f
@ -87,7 +87,10 @@ fn do_all_benches(nr_repeat_benchmarks: usize) -> HashSet<String> {
|
|||||||
return HashSet::new();
|
return HashSet::new();
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("\n\nDoing benchmarks {:?} times to reduce flukes.\n\n", nr_repeat_benchmarks);
|
println!(
|
||||||
|
"\n\nDoing benchmarks {:?} times to reduce flukes.\n\n",
|
||||||
|
nr_repeat_benchmarks
|
||||||
|
);
|
||||||
|
|
||||||
for _ in 1..nr_repeat_benchmarks {
|
for _ in 1..nr_repeat_benchmarks {
|
||||||
delete_old_bench_results();
|
delete_old_bench_results();
|
||||||
@ -111,19 +114,16 @@ fn do_all_benches(nr_repeat_benchmarks: usize) -> HashSet<String> {
|
|||||||
|
|
||||||
// returns Vec with names of regressed benchmarks
|
// returns Vec with names of regressed benchmarks
|
||||||
fn do_benchmark(branch_name: &'static str) -> HashSet<String> {
|
fn do_benchmark(branch_name: &'static str) -> HashSet<String> {
|
||||||
let mut bench_cmd =
|
let mut bench_cmd = Command::new(format!(
|
||||||
Command::new(format!(
|
|
||||||
"./bench-folder-{}/target/release/deps/time_bench",
|
"./bench-folder-{}/target/release/deps/time_bench",
|
||||||
branch_name
|
branch_name
|
||||||
));
|
));
|
||||||
|
|
||||||
let bench_cmd_w_args =
|
let bench_cmd_w_args = bench_cmd.args(&["--bench", "--noplot"]);
|
||||||
bench_cmd.args(&["--bench", "--noplot"]);
|
|
||||||
|
|
||||||
let bench_cmd_as_str = format!("{bench_cmd_w_args:?}");
|
let bench_cmd_as_str = format!("{bench_cmd_w_args:?}");
|
||||||
|
|
||||||
let mut bench_cmd_child =
|
let mut bench_cmd_child = bench_cmd_w_args
|
||||||
bench_cmd_w_args
|
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.stderr(Stdio::inherit())
|
.stderr(Stdio::inherit())
|
||||||
.spawn()
|
.spawn()
|
||||||
@ -163,8 +163,7 @@ fn do_benchmark(branch_name: &'static str) -> HashSet<String> {
|
|||||||
"Error: time-bench execution failed with exit code {}.\n\
|
"Error: time-bench execution failed with exit code {}.\n\
|
||||||
See output above for error info.\n\
|
See output above for error info.\n\
|
||||||
Command was:\n\t{}",
|
Command was:\n\t{}",
|
||||||
exit_status,
|
exit_status, bench_cmd_as_str
|
||||||
bench_cmd_as_str
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +264,7 @@ fn calc_hashes_for_folder(benches_path_str: &str) -> HashMap<String, String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn check_if_bench_executables_changed() -> bool {
|
fn check_if_bench_executables_changed() -> bool {
|
||||||
let bench_folder_str = "/crates/cli_testing_examples/benchmarks/";
|
let bench_folder_str = "/crates/cli/tests/benchmarks/";
|
||||||
|
|
||||||
let main_benches_path_str = [BENCH_FOLDER_MAIN, bench_folder_str].join("");
|
let main_benches_path_str = [BENCH_FOLDER_MAIN, bench_folder_str].join("");
|
||||||
|
|
||||||
|
@ -11,11 +11,11 @@ BENCH_SUFFIX=$1
|
|||||||
|
|
||||||
cargo criterion -V
|
cargo criterion -V
|
||||||
cd crates/cli && cargo criterion --no-run && cd ../..
|
cd crates/cli && cargo criterion --no-run && cd ../..
|
||||||
mkdir -p bench-folder/crates/cli_testing_examples/benchmarks
|
mkdir -p bench-folder/crates/cli/tests/benchmarks
|
||||||
mkdir -p bench-folder/crates/compiler/builtins/bitcode/src
|
mkdir -p bench-folder/crates/compiler/builtins/bitcode/src
|
||||||
mkdir -p bench-folder/target/release/deps
|
mkdir -p bench-folder/target/release/deps
|
||||||
cp "crates/cli_testing_examples/benchmarks/"*".roc" bench-folder/crates/cli_testing_examples/benchmarks/
|
cp "crates/cli/tests/benchmarks/"*".roc" bench-folder/crates/cli/tests/benchmarks/
|
||||||
cp -r crates/cli_testing_examples/benchmarks/platform bench-folder/crates/cli_testing_examples/benchmarks/
|
cp -r crates/cli/tests/benchmarks/platform bench-folder/crates/cli/tests/benchmarks/
|
||||||
cp crates/compiler/builtins/bitcode/src/str.zig bench-folder/crates/compiler/builtins/bitcode/src
|
cp crates/compiler/builtins/bitcode/src/str.zig bench-folder/crates/compiler/builtins/bitcode/src
|
||||||
cp target/release/roc bench-folder/target/release
|
cp target/release/roc bench-folder/target/release
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -300,7 +300,7 @@ pub fn build_zig_host_wasm32(
|
|||||||
"c",
|
"c",
|
||||||
"-target",
|
"-target",
|
||||||
"wasm32-wasi",
|
"wasm32-wasi",
|
||||||
// "-femit-llvm-ir=/home/folkertdev/roc/roc/crates/cli_testing_examples/benchmarks/platform/host.ll",
|
// "-femit-llvm-ir=/home/folkertdev/roc/roc/crates/cli/tests/benchmarks/platform/host.ll",
|
||||||
"-fPIC",
|
"-fPIC",
|
||||||
"-fstrip",
|
"-fstrip",
|
||||||
]);
|
]);
|
||||||
@ -1241,7 +1241,7 @@ fn link_wasm32(
|
|||||||
"ReleaseSmall",
|
"ReleaseSmall",
|
||||||
"-rdynamic",
|
"-rdynamic",
|
||||||
// useful for debugging
|
// useful for debugging
|
||||||
// "-femit-llvm-ir=/home/folkertdev/roc/roc/crates/cli_testing_examples/benchmarks/platform/host.ll",
|
// "-femit-llvm-ir=/home/folkertdev/roc/roc/crates/cli/tests/benchmarks/platform/host.ll",
|
||||||
])
|
])
|
||||||
.spawn()?;
|
.spawn()?;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ cd examples
|
|||||||
roc dev helloWorld.roc
|
roc dev helloWorld.roc
|
||||||
```
|
```
|
||||||
|
|
||||||
[crates/cli_testing_examples/benchmarks](https://github.com/roc-lang/roc/tree/main/crates/cli_testing_examples/benchmarks) contains more examples.
|
[crates/cli/tests/benchmarks](https://github.com/roc-lang/roc/tree/main/crates/cli/tests/benchmarks) contains more examples.
|
||||||
|
|
||||||
|
|
||||||
## Getting Involved
|
## Getting Involved
|
||||||
|
Loading…
Reference in New Issue
Block a user