File tree 4 files changed +63
-2
lines changed
test/blackbox-tests/test-cases/mdx-stanza
4 files changed +63
-2
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ Unreleased
261
261
262
262
- Introduce mdx stanza 0.2, requiring mdx >= 1.9.0, with a new generic ` deps `
263
263
field and the possibility to statically link ` libraries ` in the test
264
- executable. (#3956 , fixes #3955 )
264
+ executable. (#3956 , # 5391 , fixes #3955 )
265
265
266
266
- Improve lookup of optional or disabled binaries. Previously, we'd treat every
267
267
executable with missing libraries as optional. Now, we treat make sure to
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ core_bench \
18
18
"csexp>=1.3.0" \
19
19
js_of_ocaml \
20
20
js_of_ocaml-compiler \
21
- mdx \
21
+ " mdx>=2.1.0" \
22
22
menhir \
23
23
"merlin>=3.4.0" \
24
24
ocamlfind \
Original file line number Diff line number Diff line change @@ -255,6 +255,8 @@ let gen_rules_for_single_file stanza ~sctx ~dir ~expander ~mdx_prog
255
255
Dep_conf_eval. unnamed ~expander (mdx_package_deps @ mdx_generic_deps)
256
256
in
257
257
Action_builder. with_no_targets deps
258
+ >>> Action_builder. with_no_targets
259
+ (Action_builder. env_var " MDX_RUN_NON_DETERMINISTIC" )
258
260
>>> Action_builder. with_no_targets (Action_builder. dyn_deps dyn_deps)
259
261
>>> Command. run ~dir: (Path. build dir) ~stdout_to: files.corrected
260
262
executable command_line
Original file line number Diff line number Diff line change
1
+ Dune should know about the fact that mdx reads the MDX_RUN_NON_DETERMINISTIC
2
+ variable. When using the stanza 0.2 , it is the mdx driver that reads that
3
+ variable. This is only the case since mdx 2.1 . 0.
4
+
5
+ $ cat > dune-project << EOF
6
+ > (lang dune 3.0 )
7
+ > (using mdx 0.2 )
8
+ > EOF
9
+
10
+ $ cat > dune << EOF
11
+ > (mdx (files README. md))
12
+ > EOF
13
+
14
+ $ cat > README. md << ' EOF'
15
+ > ```ocaml
16
+ > # "a";;
17
+ > ```
18
+ >
19
+ > ```ocaml non-deterministic
20
+ > # "b";;
21
+ > ```
22
+ > EOF
23
+
24
+ $ dune runtest -- auto-promote
25
+ File " README.md" , line 1 , characters 0 -0:
26
+ Error: Files _build/ default / README. md and
27
+ _build/ default /. mdx/ README. md. corrected differ.
28
+ Promoting _build/ default /. mdx/ README. md. corrected to README. md.
29
+ [1 ]
30
+
31
+ $ cat README. md
32
+ ```ocaml
33
+ # "a";;
34
+ - : string = " a"
35
+ ```
36
+
37
+ ```ocaml non-deterministic
38
+ # "b";;
39
+ ```
40
+
41
+ $ dune runtest
42
+
43
+ $ MDX_RUN_NON_DETERMINISTIC= 1 dune runtest -- auto-promote
44
+ File " README.md" , line 1 , characters 0 -0:
45
+ Error: Files _build/ default / README. md and
46
+ _build/ default /. mdx/ README. md. corrected differ.
47
+ Promoting _build/ default /. mdx/ README. md. corrected to README. md.
48
+ [1 ]
49
+
50
+ $ cat README. md
51
+ ```ocaml
52
+ # "a";;
53
+ - : string = " a"
54
+ ```
55
+
56
+ ```ocaml non-deterministic
57
+ # "b";;
58
+ - : string = " b"
59
+ ```
You can’t perform that action at this time.
0 commit comments