File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed
test/blackbox-tests/test-cases/mdx-stanza Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ Unreleased
253253
254254- Introduce mdx stanza 0.2, requiring mdx >= 1.9.0, with a new generic ` deps `
255255 field and the possibility to statically link ` libraries ` in the test
256- executable. (#3956 , fixes #3955 )
256+ executable. (#3956 , # 5391 , fixes #3955 )
257257
258258- Improve lookup of optional or disabled binaries. Previously, we'd treat every
259259 executable with missing libraries as optional. Now, we treat make sure to
Original file line number Diff line number Diff line change @@ -258,6 +258,8 @@ let gen_rules_for_single_file stanza ~sctx ~dir ~expander ~mdx_prog
258258 Dep_conf_eval. unnamed ~expander (mdx_package_deps @ mdx_generic_deps)
259259 in
260260 Action_builder. with_no_targets deps
261+ >>> Action_builder. with_no_targets
262+ (Action_builder. env_var " MDX_RUN_NON_DETERMINISTIC" )
261263 >>> Action_builder. with_no_targets (Action_builder. dyn_deps dyn_deps)
262264 >>> Command. run ~dir: (Path. build dir) ~stdout_to: files.corrected
263265 executable command_line
Original file line number Diff line number Diff line change 1+ $ cat > dune-project << EOF
2+ > (lang dune 3.0 )
3+ > (using mdx 0.2 )
4+ > EOF
5+
6+ $ cat > dune << EOF
7+ > (mdx (files README. md))
8+ > EOF
9+
10+ $ cat > README. md << ' EOF'
11+ > ```ocaml
12+ > # "a";;
13+ > ```
14+ >
15+ > ```ocaml non-deterministic
16+ > # "b";;
17+ > ```
18+ > EOF
19+
20+ $ dune runtest -- auto-promote
21+ File " README.md" , line 1 , characters 0 -0:
22+ Error: Files _build/ default / README. md and
23+ _build/ default /. mdx/ README. md. corrected differ.
24+ Promoting _build/ default /. mdx/ README. md. corrected to README. md.
25+ [1 ]
26+
27+ $ cat README. md
28+ ```ocaml
29+ # "a";;
30+ - : string = " a"
31+ ```
32+
33+ ```ocaml non-deterministic
34+ # "b";;
35+ ```
36+
37+ $ dune runtest
38+
39+ $ MDX_RUN_NON_DETERMINISTIC= 1 dune runtest -- auto-promote
40+ File " README.md" , line 1 , characters 0 -0:
41+ Error: Files _build/ default / README. md and
42+ _build/ default /. mdx/ README. md. corrected differ.
43+ Promoting _build/ default /. mdx/ README. md. corrected to README. md.
44+ [1 ]
45+
46+ $ cat README. md
47+ ```ocaml
48+ # "a";;
49+ - : string = " a"
50+ ```
51+
52+ ```ocaml non-deterministic
53+ # "b";;
54+ - : string = " b"
55+ ```
You can’t perform that action at this time.
0 commit comments