| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Previous patch erroneously assumed that cover:start() returned
{already_started,Pid} in the cases where cover was already started. We
now turn {error,{already_started,Pid}} into {ok, Pid} and return
{error, Reason} if we encounter an error we do not know about, this
will cause a nice and violent badmatch to stop everything.
|
|
|
|
|
|
|
|
|
| |
The cover module calls io:format and io:fwrite directly for several types of
informational messages and warnings. When using meck to mock covered modules
these warnings are triggered and can cause severe polution of the test output.
We can avoid this by starting cover explicitly then setting the group_leader
of that process to a file handle.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows the 'suite' argument to eunit to be a comma separated
list of modules to test instead of being a single module. This allows
fine-grained testing when one test suite interferes with another and its
not clear which suite is causing the problem. It also lets you run the
test suite in a different order for a similar reason.
The other enhancement is to add a new eunit parameter; 'skip_app' which
like 'app' is a comma separated list of modules to skip testing on. This
parameter is only applied if the app parameter is not passed. Its
purpose is to avoid forcing you to specify all the apps to test if you
only want to skip a handful and there are many apps to test.
|
|
|
|
|
| |
Add no_debug_info option.
Remove debug_info=1 option.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The eunit_dir() does use the ?EUNIT_DIR macro internally, but it also builds, what I guess is, an absolute path, which might be better :) At least it's more consistent.
|
|
|
|
|
|
| |
path.
Normally the ebin directory doesn't contain any source files. Therefore it won't be kept in the repository by, at least, mercurial and also maybe git unless you put some .keep file in it or do some other hack. The ebin directory is created by rebar compile, but if rebar eunit is called before rebar compile, you end up with a {'EXIT', {{badmatch,{error,bad_directory}},...}. Another approach would be not to match cod:add_pathz(ebin_dir()) with ok, but I think this is an ok solution as well.
|
| |
|
|
|
|
|
|
| |
Add a coverage report similar to the one output to index.html except
that it is output to the terminal if the new rebar.conf option
'cover_print_enabled' is set to true.
|
| |
|
|
|
|
| |
Uses code:which or cover:is_compiled to get path the beam for chunks
|
| |
|
|
|
|
|
| |
--HG--
extra : rebase_source : 2f2b819e209a912424c328dd57ec5e00268d40bc
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Modules that include the EUnit header get an implicit test/0 fun,
which cover considers a runnable line, but eunit:(TestRepresentation)
never calls. Result: prod modules with tests can never reach 100%
coverage. Ironic. In this case, fix it by decrementing the NotCovered
counter returned by cover:analyze/3.
|
| |
|
|
|
|
| |
properly (ick!)
|
| |
|
|\ |
|
|/ |
|
|
|
|
| |
with code loading stuffs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. When running the eunit command with the convention of putting
tests in "*_tests" modules, eunit would run those tests twice. This
is because: 1) eunit:test/1 will naturally look for foo's tests both
in foo, and in foo_tests, and 2) eunit:test/1 was being folded over
all project modules. The fix is to filter "*_tests" modules from the
list passed to eunit:test/1.
2. When running the eunit command with cover enabled and tests in a
'test' directory, cover would error because it couldn't find the
source code for those tests. This is because cover:analyze/3 will
only find module source in "." and "../src". This is hard-coded in
cover :-(. Since cover shouldn't be calculating code coverage on test
code anyway, the fix is to not fold cover:analyze/3 over
non-production code.
3. When running the eunit command with cover enabled and a test suite
defined, cover would only attempt to calculate coverage on the the
test suite itself. This was because only the suite was passed to
cover:analyze/3. The fix is to fold cover:analyze/3 over all the
production code, filtering out the suite module if it is defined.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
eg. rebar eunit -- runs all tests in all modules
rebar eunit suite=foo -- only runs tests in foo.erl/foo_tests.erl
Added an entry to .hgignore to avoid .swp files (created by VIM).
|
|/
|
|
| |
applications; begin including -spec annotations
|
| |
|
|
|
|
| |
system
|
|
|
|
| |
provide better modularity/reusability for other systems
|
| |
|
| |
|
| |
|
|
|
|
| |
added parameter to do_compile for passing a function that can extra the list of includes from a file
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|