bench: mv input files to bench/input

only used by input crate, avoid cluttering bench dir
This commit is contained in:
Noah Hellman 2023-04-10 11:38:32 +02:00
parent bee3d5d747
commit 5de8543bb0
3 changed files with 3 additions and 3 deletions

View file

@ -49,7 +49,7 @@ bench:
git submodule update --init modules/djot.js
for f in $$(find modules/djot.js/bench -name '*.dj' | xargs basename -a); do \
dst=$$(echo $$f | sed 's/-/_/g'); \
ln -fs ../modules/djot.js/bench/$$f bench/$$dst; \
ln -fs ../../modules/djot.js/bench/$$f bench/input/$$dst; \
done
cov: suite suite_bench

View file

@ -1,7 +1,7 @@
use std::io::Write;
fn main() {
let inputs = std::fs::read_dir("..")
let inputs = std::fs::read_dir(".")
.unwrap()
.filter_map(|entry| {
let entry = entry.ok()?;
@ -9,7 +9,7 @@ fn main() {
if let Some(name) = name.strip_suffix(".dj") {
if entry.file_type().map_or(false, |ty| !ty.is_dir()) {
let input = std::fs::read_to_string(
std::path::Path::new("..").join(entry.file_name()),
std::path::Path::new(".").join(entry.file_name()),
)
.ok()?;
return Some((name.to_string(), input));