1DUNE-RUNTEST(1)                   Dune Manual                  DUNE-RUNTEST(1)
2
3
4

NAME

6       dune-runtest - Run tests.
7

SYNOPSIS

9       dune runtest [OPTION]… [DIR]…
10

DESCRIPTION

12       This is a short-hand for calling:
13
14         dune build @runtest
15

OPTIONS

17       --action-stderr-on-success=VAL
18           Same as --action-stdout-on-success but for the standard output for
19           error messages. A good default for large mono-repositories is
20           --action-stdout-on-success=swallow
21           --action-stderr-on-success=must-be-empty. This ensures that a
22           successful build has a "clean" empty output.
23
24       --action-stdout-on-success=VAL
25           Specify how to deal with the standard output of actions when they
26           succeed. Possible values are: print to just print it to Dune's
27           output, swallow to completely ignore it and must-be-empty to
28           enforce that the action printed nothing. With must-be-empty, Dune
29           will consider that the action failed if it printed something to its
30           standard output. The default is print.
31
32       --build-info
33           Show build information.
34
35       --error-reporting=VAL (absent=deterministic)
36           Controls when the build errors are reported. early - report errors
37           as soon as they are discovered. deterministic - report errors at
38           the end of the build in a deterministic order. twice - report each
39           error twice: once as soon as the error is discovered and then again
40           at the end of the build, in a deterministic order.
41
42       -f, --force
43           Force actions associated to aliases to be re-executed even if their
44           dependencies haven't changed.
45
46       --file-watcher=VAL (absent=automatic)
47           Mechanism to detect changes in the source. Automatic to make dune
48           run an external program to detect changes. Manual to notify dune
49           that files have changed manually."
50
51       --passive-watch-mode
52           Similar to [--watch], but only start a build when instructed
53           externally by an RPC.
54
55       --react-to-insignificant-changes
56           react to insignificant file system changes; this is only useful for
57           benchmarking dune
58
59       --sandbox=VAL (absent DUNE_SANDBOX env)
60           Sandboxing mode to use by default. Some actions require a certain
61           sandboxing mode, so they will ignore this setting. The allowed
62           values are: none, symlink, copy, hardlink.
63
64       -w, --watch
65           Instead of terminating build after completion, wait continuously
66           for file changes.
67
68       --wait-for-filesystem-clock
69           Dune digest file contents for better incrementally. These digests
70           are themselves cached. In some cases, Dune needs to drop some
71           digest cache entries in order for things to be reliable. This
72           option makes Dune wait for the file system clock to advance so that
73           it doesn't need to drop anything. You should probably not care
74           about this option; it is mostly useful for Dune developers to make
75           Dune tests of the digest cache more reproducible.
76

COMMON OPTIONS

78       These options are common to all commands.
79
80       --always-show-command-line
81           Always show the full command lines of programs executed by dune
82
83       --auto-promote
84           Automatically promote files. This is similar to running dune
85           promote after the build.
86
87       --build-dir=FILE (absent DUNE_BUILD_DIR env)
88           Specified build directory. _build if unspecified
89
90       --cache=VAL (absent DUNE_CACHE env)
91           Enable or disable Dune cache (either enabled or disabled). Default
92           is `disabled'.
93
94       --cache-check-probability=VAL (absent DUNE_CACHE_CHECK_PROBABILITY env)
95           Check build reproducibility by re-executing randomly chosen rules
96           and comparing their results with those stored in Dune cache. Note:
97           by increasing the probability of such checks you slow down the
98           build. The default probability is zero, i.e. no rules are checked.
99
100       --cache-storage-mode=VAL (absent DUNE_CACHE_STORAGE_MODE env)
101           Dune cache storage mode (one of auto, hardlink or copy). Default is
102           `auto'.
103
104       --config-file=FILE
105           Load this configuration file instead of the default one.
106
107       --debug-artifact-substitution
108           Print debugging info about artifact substitution
109
110       --debug-backtraces
111           Always print exception backtraces.
112
113       --debug-cache=VAL
114           Show debug messages on cache misses for the given cache layers.
115           Value is a comma-separated list of cache layer names. All available
116           cache layers: shared,workspace-local,fs.
117
118       --debug-dependency-path
119           In case of error, print the dependency path from the targets on the
120           command line to the rule that failed.
121
122       --debug-digests
123           Explain why Dune decides to re-digest some files
124
125       --debug-load-dir
126           Print debugging info about directory loading
127
128       --debug-store-digest-preimage
129           Store digest preimage for all computed digests, so that it's
130           possible to reverse them later, for debugging. The digests are
131           stored in the shared cache (see --cache flag) as values, even if
132           cache is otherwise disabled. This should be used only for
133           debugging, since it's slow and it litters the shared cache.
134
135       --default-target=TARGET (absent=@@default)
136           Set the default target that when none is specified to dune build.
137
138       --diff-command=VAL (absent DUNE_DIFF_COMMAND env)
139           Shell command to use to diff files. Use - to disable printing the
140           diff.
141
142       --disable-promotion (absent DUNE_DISABLE_PROMOTION env)
143           Disable all promotion rules
144
145       --display=MODE
146           Control the display mode of Dune. See dune-config(5) for more
147           details. Valid values for this option are One of progress, verbose,
148           short or quiet
149
150       --dump-memo-graph=FILE
151           Dumps the dependency graph to a file after the build is complete
152
153       --dump-memo-graph-format=FORMAT (absent=gexf)
154           File format to be used when dumping dependency graph
155
156       --dump-memo-graph-with-timing
157           With --dump-memo-graph, will re-run each cached node in the Memo
158           graph after building and include the runtime in the output. Since
159           all nodes contain a cached value, this will measure just the
160           runtime of each node
161
162       --help[=FMT] (default=auto)
163           Show this help in format FMT. The value FMT must be one of auto,
164           pager, groff or plain. With auto, the format is pager or plain
165           whenever the TERM env var is dumb or undefined.
166
167       --ignore-promoted-rules
168           Ignore rules with (mode promote), except ones with (only ...). The
169           variable %{ignoring_promoted_rules} in dune files reflects whether
170           this option was passed or not.
171
172       --instrument-with=BACKENDS (absent DUNE_INSTRUMENT_WITH env)
173           "Enable instrumentation by BACKENDS. BACKENDS is a comma-separated
174           list of library names, each one of which must declare an
175           instrumentation backend.
176
177       -j JOBS
178           Run no more than JOBS commands simultaneously.
179
180       --no-buffer
181           Do not buffer the output of commands executed by dune. By default
182           dune buffers the output of subcommands, in order to prevent
183           interleaving when multiple commands are executed in parallel.
184           However, this can be an issue when debugging long running tests.
185           With --no-buffer, commands have direct access to the terminal. Note
186           that as a result their output won't be captured in the log file.
187           You should use this option in conjunction with -j 1, to avoid
188           interleaving. Additionally you should use --verbose as well, to
189           make sure that commands are printed before they are being executed.
190
191       --no-config
192           Do not load the configuration file
193
194       --no-print-directory
195           Suppress "Entering directory" messages
196
197       --only-packages=PACKAGES
198           Ignore stanzas referring to a package that is not in PACKAGES.
199           PACKAGES is a comma-separated list of package names. Note that this
200           has the same effect as deleting the relevant stanzas from dune
201           files. It is mostly meant for releases. During development, it is
202           likely that what you want instead is to build a particular
203           <package>.install target.
204
205       -p PACKAGES, --for-release-of-packages=PACKAGES (required)
206           Shorthand for --release --only-packages PACKAGE. You must use this
207           option in your <package>.opam files, in order to build only what's
208           necessary when your project contains multiple packages as well as
209           getting reproducible builds.
210
211       --print-metrics
212           Print out various performance metrics after every build
213
214       --profile=VAL (absent DUNE_PROFILE env)
215           Select the build profile, for instance dev or release. The default
216           is dev.
217
218       --promote-install-files[=VAL] (default=true)
219           Promote the generated <package>.install files to the source tree
220
221       --release
222           Put dune into a reproducible release mode. This is in fact a
223           shorthand for --root . --ignore-promoted-rules --no-config
224           --profile release --always-show-command-line
225           --promote-install-files --default-target @install
226           --require-dune-project-file. You should use this option for release
227           builds. For instance, you must use this option in your
228           <package>.opam files. Except if you already use -p, as -p implies
229           this option.
230
231       --require-dune-project-file[=VAL] (default=true)
232           Fail if a dune-project file is missing.
233
234       --root=DIR
235           Use this directory as workspace root instead of guessing it. Note
236           that this option doesn't change the interpretation of targets given
237           on the command line. It is only intended for scripts.
238
239       --store-orig-source-dir (absent DUNE_STORE_ORIG_SOURCE_DIR env)
240           Store original source location in dune-package metadata
241
242       --terminal-persistence=MODE
243           Changes how the log of build results are displayed to the console
244           between rebuilds while in --watch mode. Supported modes: preserve,
245           clear-on-rebuild, clear-on-rebuild-and-flush-history.
246
247       --trace-file=FILE
248           Output trace data in catapult format (compatible with
249           chrome://tracing)
250
251       --verbose
252           Same as --display verbose
253
254       --version
255           Show version information.
256
257       --workspace=FILE (absent DUNE_WORKSPACE env)
258           Use this specific workspace file instead of looking it up.
259
260       -x VAL
261           Cross-compile using this toolchain.
262

MORE HELP

264       Use `dune COMMAND --help' for help on a single command.
265

EXIT STATUS

267       runtest exits with the following status:
268
269       0   on success.
270
271       123 on indiscriminate errors reported on standard error.
272
273       124 on command line parsing errors.
274
275       125 on unexpected internal errors (bugs).
276

ENVIRONMENT

278       These environment variables affect the execution of runtest:
279
280       CLICOLOR
281           If different than 0, ANSI colors are supported and should be used
282           when the program isn’t piped. If equal to 0, don’t output ANSI
283           color escape codes
284
285       CLICOLOR_FORCE
286           If different than 0, ANSI colors should be enabled no matter what.
287
288       DUNE_BUILD_DIR
289           Specified build directory. _build if unspecified
290
291       DUNE_CACHE
292           Enable or disable Dune cache (either enabled or disabled). Default
293           is `disabled'.
294
295       DUNE_CACHE_CHECK_PROBABILITY
296           Check build reproducibility by re-executing randomly chosen rules
297           and comparing their results with those stored in Dune cache. Note:
298           by increasing the probability of such checks you slow down the
299           build. The default probability is zero, i.e. no rules are checked.
300
301       DUNE_CACHE_STORAGE_MODE
302           Dune cache storage mode (one of auto, hardlink or copy). Default is
303           `auto'.
304
305       DUNE_DIFF_COMMAND
306           Shell command to use to diff files. Use - to disable printing the
307           diff.
308
309       DUNE_DISABLE_PROMOTION
310           Disable all promotion rules
311
312       DUNE_INSTRUMENT_WITH
313           "Enable instrumentation by BACKENDS. BACKENDS is a comma-separated
314           list of library names, each one of which must declare an
315           instrumentation backend.
316
317       DUNE_PROFILE
318           Build profile. dev if unspecified or release if -p is set.
319
320       DUNE_SANDBOX
321           Sandboxing mode to use by default. (see --sandbox)
322
323       DUNE_STORE_ORIG_SOURCE_DIR
324           Store original source location in dune-package metadata
325
326       DUNE_WORKSPACE
327           Use this specific workspace file instead of looking it up.
328

BUGS

330       Check bug reports at https://github.com/ocaml/dune/issues
331

SEE ALSO

333       dune(1)
334

EXAMPLES

336       1.  Run all tests in the current source tree (including those that
337           passed on the last run):
338
339             dune runtest --force
340
341       2.  Run tests sequentially without output buffering:
342
343             dune runtest --no-buffer -j 1
344
345
346
347Dune n/a                                                       DUNE-RUNTEST(1)
Impressum