Skip to content

Commit e5eca61

Browse files
authored
flambda-backend: Add documentation for testing targets to HACKING docs (#1436)
1 parent f1835c4 commit e5eca61

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

HACKING.jst.adoc

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,25 @@ where the test file or test dir are specified with respect to the
5454
$ make -f Makefile.jst test-one TEST=typing-local/local.ml
5555
$ make -f Makefile.jst test-one DIR=typing-local
5656

57+
Likewise, you can use `promote-one` to accept the diff from a failed
58+
test:
59+
60+
$ make -f Makefile.jst promote-one TEST=typing-local/local.ml
61+
$ make -f Makefile.jst promote-one DIR=typing-local
62+
63+
If you've run some series of tests and would like to accept the diff
64+
from all failed tests in that run, use `promote-failed`:
65+
66+
$ make -f Makefile.jst promote-failed
67+
68+
To run just one test without running a full dune build, you can use
69+
`*-no-rebuild` versions of `test-one` and `promote-one`. Note that these
70+
targets won't pick up changes you've made to compiler code, though they will
71+
faithfully pick up changes you've made to test files.
72+
73+
$ make -f Makefile.jst test-one-no-rebuild TEST=typing-local/local.ml
74+
$ make -f Makefile.jst promote-one-no-rebuild DIR=typing-local
75+
5776
## Debugging
5877

5978
We make several custom printers available so that we can print more values in
@@ -97,7 +116,7 @@ Remember to check that the newly installed switch is being used:
97116
4.14.1 ocaml-base-compiler.4.14.1 4.14.1
98117
-> 4.14.1-fp ocaml-option-fp.1,ocaml-variants.4.14.1+options 4.14.1-fp
99118

100-
Then build the compiler - the following command will build the compiler using the opam switch, then use the newly-built compiler to build itself.
119+
Then build the compiler — the following command will build the compiler using the opam switch, then use the newly-built compiler to build itself.
101120

102121
$ make -f Makefile.jst compiler
103122

0 commit comments

Comments
 (0)