dtest ~master
Utility to generate main file for unit test registration and running with unit-threaded
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
dtest
###Deprecated: No longer needed with the latest version of unit-threaded
Utility using unit-threaded
to run all unit tests in a list of directories. This was written because,
although unit-threaded can
scan and run all unit tests in a given set of modules, those modules need
to be manually specified, which can be tedious. The reason for that is
that D packages are just directories and the compiler can't
read the filesystem at compile-time, so this executable does that
to write a D source file which it runs using rdmd
.
This means rdmd
must be installed for this program to work.
Usage: dtest [options] [test1] [test2]...
Options:
-h/--help: help
-t/--test: add a test directory to the list. If no test directories
are specified, then the default list is ["tests"]
-u/--unit_threaded: directory location of the unit_threaded library
-d/--debug: print debug information
-I: extra include directories to specify to rdmd
-f/--file: file name to write to
-s/--single: run the tests in one thread
-d/--debug: print debugging information from the tests
-l/--list: list all tests but do not run them
-n/--nodub: do not run dub fetch to get unit-threaded
-c/--compiler: Set the compiler (default is dmd)
This will run all unit tests encountered in the given directories
(see -t option). It does this by scanning them and writing a D source
file that imports all of them then running that source file with rdmd.
By default the source file is a randomly named temporary file but that
can be changed with the -f option. If the unit_threaded library is not
in the default search paths then it can be specified with the -u option.
If the --nodub option is not used, `dtest` defaults to using dub
to fetch unit-threaded so that the library need not be downloaded nor
have its location specified manually.
If any command-line arguments exist they will be forwarded to the
unit_threaded library and used as the names of the tests to run. If
none are specified, all of them are run.
To run all tests located in a directory called "tests":
dtest
To run all tests in dir1, dir2, etc.:
dtest -t dir1 -t dir2...
To run tests foo and bar in directory mydir:
dtest -t mydir mydir.foo mydir.bar
To run tests foo and bar in directory mydir in a single thread:
dtest -t mydir -s mydir.foo mydir.bar
- ~master released 8 years ago
- atilaneves/dtest
- github.com/atilaneves/unit-threaded
- BSD 3-clause
- Copyright © 2013, Atila Neves
- Authors:
- Dependencies:
- none
- Versions:
-
0.2.6 2015-Jun-16 0.2.5 2015-Feb-17 0.2.4 2014-May-31 0.2.3 2014-May-02 0.2.2 2014-Apr-22 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
485 downloads total
-
- Score:
- 1.0
- Short URL:
- dtest.dub.pm