|
|
@ -51,6 +51,7 @@ do(State) -> |
|
|
|
do(State, Tests) -> |
|
|
|
?INFO("Performing EUnit tests...", []), |
|
|
|
|
|
|
|
setup_name(State), |
|
|
|
rebar_utils:update_code(rebar_state:code_paths(State, all_deps), [soft_purge]), |
|
|
|
|
|
|
|
%% Run eunit provider prehooks |
|
|
@ -106,6 +107,10 @@ format_error({error, Error}) -> |
|
|
|
%% Internal functions |
|
|
|
%% =================================================================== |
|
|
|
|
|
|
|
setup_name(State) -> |
|
|
|
{Long, Short, Opts} = rebar_dist_utils:find_options(State), |
|
|
|
rebar_dist_utils:either(Long, Short, Opts). |
|
|
|
|
|
|
|
prepare_tests(State) -> |
|
|
|
%% parse and translate command line tests |
|
|
|
CmdTests = resolve_tests(State), |
|
|
@ -479,11 +484,17 @@ eunit_opts(_State) -> |
|
|
|
{file, $f, "file", string, help(file)}, |
|
|
|
{module, $m, "module", string, help(module)}, |
|
|
|
{suite, $s, "suite", string, help(module)}, |
|
|
|
{verbose, $v, "verbose", boolean, help(verbose)}]. |
|
|
|
|
|
|
|
help(app) -> "Comma separated list of application test suites to run. Equivalent to `[{application, App}]`."; |
|
|
|
help(cover) -> "Generate cover data. Defaults to false."; |
|
|
|
help(dir) -> "Comma separated list of dirs to load tests from. Equivalent to `[{dir, Dir}]`."; |
|
|
|
help(file) -> "Comma separated list of files to load tests from. Equivalent to `[{file, File}]`."; |
|
|
|
help(module) -> "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`."; |
|
|
|
help(verbose) -> "Verbose output. Defaults to false.". |
|
|
|
{verbose, $v, "verbose", boolean, help(verbose)}, |
|
|
|
{name, undefined, "name", atom, help(name)}, |
|
|
|
{sname, undefined, "sname", atom, help(sname)}, |
|
|
|
{setcookie, undefined, "setcookie", atom, help(setcookie)}]. |
|
|
|
|
|
|
|
help(app) -> "Comma separated list of application test suites to run. Equivalent to `[{application, App}]`."; |
|
|
|
help(cover) -> "Generate cover data. Defaults to false."; |
|
|
|
help(dir) -> "Comma separated list of dirs to load tests from. Equivalent to `[{dir, Dir}]`."; |
|
|
|
help(file) -> "Comma separated list of files to load tests from. Equivalent to `[{file, File}]`."; |
|
|
|
help(module) -> "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`."; |
|
|
|
help(verbose) -> "Verbose output. Defaults to false."; |
|
|
|
help(name) -> "Gives a long name to the node"; |
|
|
|
help(sname) -> "Gives a short name to the node"; |
|
|
|
help(setcookie) -> "Sets the cookie if the node is distributed". |