Skip to content

Commit 6833734

Browse files
authored
Fix the output of 'make bench' (ocaml-ppx#1877)
1 parent aa673e2 commit 6833734

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ headers:
4646

4747
.PHONY: bench
4848
bench:
49-
@dune build @runbench
49+
@dune build bench/test/source_bench.ml
50+
@dune build bench/bench.exe
51+
@dune exec bench/bench.exe

bench/bench.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ type input =
2424
; action: [`Format | `Numeric of range] }
2525

2626
let inputs =
27-
let source_ml = Stdio.In_channel.read_all "test/source_bench.ml" in
27+
let dir = "_build/default/bench/test" in
28+
let source_ml = Stdio.In_channel.read_all (dir ^ "/source_bench.ml") in
2829
[ { name= "format:conventional"
2930
; input_name= "source.ml"
3031
; kind= Syntax.Structure

0 commit comments

Comments
 (0)