-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdune
More file actions
43 lines (40 loc) · 1.36 KB
/
Copy pathdune
File metadata and controls
43 lines (40 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
; SPDX-License-Identifier: MPL-2.0
;
; AffineScript microbenchmarks (bench/).
;
; Visibility-only today (no merge-blocking threshold) — per
; docs/standards/TESTING.adoc §"Bench standards (visibility-only)".
; Each bench is an alcotest case wired into a dedicated executable
; under the `@bench` alias so the normal `dune runtest` gate is
; unaffected.
;
; Run with:
; just bench (per docs/standards/TESTING.adoc)
; dune runtest @bench --force
;
; Source layout:
; bench/bench_main.ml single test runner
; bench/bench_fixtures.ml shared input strings
; bench/bench_lex.ml lexer-only sweep
; bench/bench_parse.ml parser sweep
; bench/bench_typecheck.ml typecheck + quantity sweep
; bench/bench_codegen.ml wasm-codegen sweep
; `(test ...)` would auto-register bench_main under @runtest, defeating the
; visibility-only contract. Use `(executable ...)` + a dedicated `(rule
; (alias bench) ...)` so the bench is only invoked when explicitly targeted
; (`dune runtest @bench` / `just bench`). The previous `(alias bench)` field
; on `(test ...)` was rejected by dune 3.x as Unknown field.
(executable
(name bench_main)
(libraries affinescript alcotest unix)
(modules
bench_main
bench_fixtures
bench_lex
bench_parse
bench_typecheck
bench_codegen))
(rule
(alias bench)
(action
(run %{exe:bench_main.exe})))