fixed filenames

This commit is contained in:
Anton-4 2023-12-27 15:58:03 +01:00
parent 99085b784c
commit 3210e87815
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
17 changed files with 35 additions and 42 deletions

View file

@ -16,9 +16,9 @@ jobs:
FORCE_COLOR: 1 FORCE_COLOR: 1
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: #with:
ref: "main" # ref: "main"
clean: "true" # clean: "true"
- name: on main; prepare a self-contained benchmark folder - name: on main; prepare a self-contained benchmark folder
run: nix develop -c ./ci/benchmarks/prep_folder.sh main run: nix develop -c ./ci/benchmarks/prep_folder.sh main

View file

@ -6,12 +6,6 @@ If you're not using nix, install cargo criterion:
cargo install cargo-criterion cargo install cargo-criterion
``` ```
To prevent stack overflow on the `CFold` benchmark:
```sh
ulimit -s unlimited
```
In the `crates/cli` folder execute: In the `crates/cli` folder execute:
```sh ```sh

View file

@ -976,13 +976,13 @@ mod cli_run {
// TODO fix QuicksortApp and then remove this! // TODO fix QuicksortApp and then remove this!
match roc_filename { match roc_filename {
"QuicksortApp.roc" => { "quicksortApp.roc" => {
eprintln!( eprintln!(
"WARNING: skipping testing benchmark {roc_filename} because the test is broken right now!" "WARNING: skipping testing benchmark {roc_filename} because the test is broken right now!"
); );
return; return;
} }
"TestAStar.roc" => { "testAStar.roc" => {
if cfg!(feature = "wasm32-cli-run") { if cfg!(feature = "wasm32-cli-run") {
eprintln!( eprintln!(
"WARNING: skipping testing benchmark {roc_filename} because it currently does not work on wasm32 due to dictionaries." "WARNING: skipping testing benchmark {roc_filename} because it currently does not work on wasm32 due to dictionaries."
@ -1137,20 +1137,20 @@ mod cli_run {
#[test] #[test]
#[cfg_attr(windows, ignore)] #[cfg_attr(windows, ignore)]
fn nqueens() { fn nqueens() {
test_benchmark("NQueens.roc", &["6"], "4\n", UseValgrind::Yes) test_benchmark("nQueens.roc", &["6"], "4\n", UseValgrind::Yes)
} }
#[test] #[test]
#[cfg_attr(windows, ignore)] #[cfg_attr(windows, ignore)]
fn cfold() { fn cfold() {
test_benchmark("CFold.roc", &["3"], "11 & 11\n", UseValgrind::Yes) test_benchmark("cFold.roc", &["3"], "11 & 11\n", UseValgrind::Yes)
} }
#[test] #[test]
#[cfg_attr(windows, ignore)] #[cfg_attr(windows, ignore)]
fn deriv() { fn deriv() {
test_benchmark( test_benchmark(
"Deriv.roc", "deriv.roc",
&["2"], &["2"],
"1 count: 6\n2 count: 22\n", "1 count: 6\n2 count: 22\n",
UseValgrind::Yes, UseValgrind::Yes,
@ -1160,14 +1160,14 @@ mod cli_run {
#[test] #[test]
#[cfg_attr(windows, ignore)] #[cfg_attr(windows, ignore)]
fn rbtree_ck() { fn rbtree_ck() {
test_benchmark("RBTreeCk.roc", &["100"], "10\n", UseValgrind::Yes) test_benchmark("rBTreeCk.roc", &["100"], "10\n", UseValgrind::Yes)
} }
#[test] #[test]
#[cfg_attr(windows, ignore)] #[cfg_attr(windows, ignore)]
fn rbtree_insert() { fn rbtree_insert() {
test_benchmark( test_benchmark(
"RBTreeInsert.roc", "rBTreeInsert.roc",
&[], &[],
"Node Black 0 {} Empty Empty\n", "Node Black 0 {} Empty Empty\n",
UseValgrind::Yes, UseValgrind::Yes,
@ -1179,25 +1179,25 @@ mod cli_run {
#[test] #[test]
fn rbtree_del() { fn rbtree_del() {
test_benchmark( test_benchmark(
"RBTreeDel.roc", "rBTreeDel.roc",
&["420"], &["420"],
&[],
"30\n", "30\n",
true UseValgrind::Yes,
) )
}*/ }
*/
#[test] #[test]
#[cfg_attr(windows, ignore)] #[cfg_attr(windows, ignore)]
fn astar() { fn astar() {
test_benchmark("TestAStar.roc", &[], "True\n", UseValgrind::No) test_benchmark("testAStar.roc", &[], "True\n", UseValgrind::No)
} }
#[test] #[test]
#[cfg_attr(windows, ignore)] #[cfg_attr(windows, ignore)]
fn base64() { fn base64() {
test_benchmark( test_benchmark(
"TestBase64.roc", "testBase64.roc",
&[], &[],
"encoded: SGVsbG8gV29ybGQ=\ndecoded: Hello World\n", "encoded: SGVsbG8gV29ybGQ=\ndecoded: Hello World\n",
UseValgrind::Yes, UseValgrind::Yes,

View file

@ -10,3 +10,8 @@ benchmarks/rbtree-ck
benchmarks/rbtree-insert benchmarks/rbtree-insert
benchmarks/test-astar benchmarks/test-astar
benchmarks/test-base64 benchmarks/test-base64
benchmarks/NQueens
benchmarks/cFold
benchmarks/nQueens
benchmarks/quicksortApp
benchmarks/rBTreeCk

View file

@ -248,4 +248,4 @@ del = \t, k ->
rebalanceLeft cx lx ky vy ry rebalanceLeft cx lx ky vy ry
Delmin (Del ry Bool.false) ky vy -> Delmin (Del ry Bool.false) ky vy ->
Del (Node cx lx ky vy ry) Bool.false Del (Node cx lx ky vy ry) Bool.false

File diff suppressed because one or more lines are too long

View file

@ -250,18 +250,12 @@ pub fn run_cmd<'a, I: IntoIterator<Item = &'a str>, E: IntoIterator<Item = (&'a
let cmd_str = pretty_command_string(&cmd); let cmd_str = pretty_command_string(&cmd);
dbg!(cmd
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.spawn());
let mut child = cmd let mut child = cmd
.stdin(Stdio::piped()) .stdin(Stdio::piped())
.stdout(Stdio::piped()) .stdout(Stdio::piped())
.stderr(Stdio::piped()) .stderr(Stdio::piped())
.spawn() .spawn()
.unwrap_or_else(|_| panic!("Failed to execute cmd:\n\t`{:?}`", cmd_str)); .unwrap_or_else(|err| panic!("Encountered error:\n\t{:?}\nWhile executing cmd:\n\t{:?}", err, cmd_str));
{ {
let stdin = child.stdin.as_mut().expect("Failed to open stdin"); let stdin = child.stdin.as_mut().expect("Failed to open stdin");