Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add search for a default expected file and include for libsodium #278

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
1 change: 1 addition & 0 deletions benchmarks/libsodium/default.stdout.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
10 changes: 8 additions & 2 deletions crates/cli/src/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,14 @@ impl BenchmarkCommand {
.with_context(|| "expected the benchmark file to have an extension")?
.to_str()
.with_context(|| "expected the benchmark file to have a printable name")?;
let stdout_expected = wasm_file_dir.join(format!("{}.stdout.expected", benchmark_name));
let stderr_expected = wasm_file_dir.join(format!("{}.stderr.expected", benchmark_name));
let mut stdout_expected = wasm_file_dir.join(format!("{}.stdout.expected", benchmark_name));
if !stdout_expected.exists() {
stdout_expected = wasm_file_dir.join(format!("{}.stdout.expected", "default"));
jlb6740 marked this conversation as resolved.
Show resolved Hide resolved
}
let mut stderr_expected = wasm_file_dir.join(format!("{}.stderr.expected", benchmark_name));
if !stderr_expected.exists() {
stderr_expected = wasm_file_dir.join(format!("{}.stderr.expected", "default"));
jlb6740 marked this conversation as resolved.
Show resolved Hide resolved
}

compare_output_file(wasm_file, stdout, &stdout_expected)?;
compare_output_file(wasm_file, stderr, &stderr_expected)?;
Expand Down
Loading