1DUB-TEST(1)                The D Language Foundation               DUB-TEST(1)
2
3
4

NAME

6       dub - Package and build management system for D
7

SYNOPSIS

9       dub  test [<package>[@<version-spec>]] OPTIONS...  [-- <application ar‐
10       guments...>]
11

DESCRIPTION

13       Builds the package and executes all contained unit tests.
14
15
16
17       If no explicit configuration is given, an existing "unittest"  configu‐
18       ration will be preferred for testing. If none exists, the first library
19       type configuration will be used, and if that doesn't exist either,  the
20       first executable configuration is chosen.
21
22
23
24       When  a  custom main file (--main-file) is specified, only library con‐
25       figurations can be used. Otherwise, depending on the type  of  the  se‐
26       lected  configuration,  either  an existing main file will be used (and
27       needs to be properly adjusted to just run  the  unit  tests  for  'ver‐
28       sion(unittest)'),  or DUB will generate one for library type configura‐
29       tions.
30
31
32
33       Finally, if the package contains a dependency to the "tested"  package,
34       the  automatically  generated  main  file  will  use it to run the unit
35       tests.
36

OPTIONS

38       --main-file=VALUE
39              Specifies a custom file containing the main()  function  to  use
40              for running the tests.
41
42       --combined
43              Tries to build the whole project in a single compiler run.
44
45       --parallel
46              Runs multiple compiler instances in parallel, if possible.
47
48       -f,    Forces a recompilation even if the target is up to date
49
50       --coverage
51              Enables code coverage statistics to be generated.
52
53       -b,    Specifies  the  type  of build to perform. Note that setting the
54              DFLAGS environment variable will override the  build  type  with
55              custom flags.  Possible names:
56                debug   (default),  plain,  release,  release-debug,  release-
57              nobounds,  unittest,  profile,  profile-gc,  docs,  ddox,   cov,
58              unittest-cov, syntax and custom types
59
60       -c,    Builds  the  specified  configuration. Configurations can be de‐
61              fined in dub.json
62
63       --override-config=VALUE
64              Uses the specified configuration for a certain  dependency.  Can
65              be  specified multiple times.  Format: --override-config=<depen‐
66              dency>/<config>
67
68       --compiler=VALUE
69              Specifies the compiler binary to use (can be a path).  Arbitrary
70              pre-  and suffixes to the identifiers below are recognized (e.g.
71              ldc2 or dmd-2.063) and matched to the proper compiler type:
72                dmd, gdc, ldc, gdmd, ldmd
73
74       -a,    Force a different architecture (e.g. x86 or x86_64)
75
76       -d,    Define the specified debug version identifier  when  building  -
77              can be used multiple times
78
79       --nodeps
80              Do not resolve missing dependencies before building
81
82       --build-mode=VALUE
83              Specifies  the  way  the  compiler and linker are invoked. Valid
84              values:
85                separate (default), allAtOnce, singleFile
86
87       --single
88              Treats the package name as a filename. The file must  contain  a
89              package recipe comment.
90
91       --force-remove
92              Deprecated option that does nothing.
93
94       --filter-versions
95              [Experimental]  Filter  version  identifiers  and  debug version
96              identifiers to improve build cache efficiency.
97

FILES

99       dub.sdl, dub.json
100

AUTHOR

102       Copyright (c) 1999-2022 by The D Language Foundation
103

ONLINE DOCUMENTATION

105http://code.dlang.org/docs/commandlinehttp://code.dlang.org/docs/commandline
106

SEE ALSO

108       dmd(1), dub(1)
109
110
111
112The D Language Foundation         2022-01-20                       DUB-TEST(1)
Impressum