Commit graph

20 commits

Author SHA1 Message Date
Evan Vigil-McClanahan
ba466e2d38 Manually clean up paths
Using code:set_path/1 with very large paths is very slow on larger
projects.  On my mid-sized project, it seems to take around .4s per
call.  Emulating the call with direct path removal (using
code:del_path/1) seems to be quite a lot faster.
2014-08-18 13:56:19 -07:00
Sergey Savenko
93689703c1 Add qualified name tests specification (see #118)
Augment 'tests' option of 'rebar eunit' command with ability to specify
tests to run using module-qualified names. This change also forced me
to change the way modules for coverage and for testing itself are
selected - module-qualified tests specifications are now taken into
consideration. Extend tests to cover new functionality. Update
dialyzer_reference accordingly.
2014-05-29 22:38:14 +04:00
Oliver Ferrigni
d893708563 Fix file handling on windows for tests
Running tests on windows creates false positive due to setup failures
not executing all tests.  Checking for tmp_dir was failing on
subsequent runs.  Added cases to tmp_dir creation to delete preexisting
tmp_dirs in .eunit directory.
2013-01-14 15:16:13 -06:00
Shunichi Shinohara
22b703efa8 eunit: analyze coverage only for cover compiled modules
This change fixes #310.
2012-09-13 22:30:30 +02:00
Tuncer Ayaz
3c0d97bf2c Cleanup and comment 2012-08-20 13:55:55 +02:00
Roberto Ostinelli
60516dc406 Fix tests= option not running generator tests 2012-08-20 12:58:34 +02:00
Roberto Ostinelli
fa6618f2b4 Add experimental tests= filter without eunit suites 2012-08-20 12:58:31 +02:00
Roberto Ostinelli
69dc9ec933 Add experimental tests= filter for eunit suites 2012-08-11 23:08:21 +02:00
Tuncer Ayaz
e47d643ea3 Use separate dirs for eunit and qc 2012-08-09 18:37:26 +02:00
Tuncer Ayaz
e75a97ad33 Add 'qc' cmd and rename eunit-compile to test-compile 2012-07-23 16:22:06 +02:00
Slava Yurin
22dec4cbb7 Fix test/rebar_eunit_tests.erl 2012-06-29 12:41:22 +02:00
Tuncer Ayaz
4f41e742d3 rebar_eunit_tests: avoid repetition 2011-08-07 16:21:43 +02:00
Tuncer Ayaz
e3fe1c6903 rebar_eunit_tests: check return values 2011-08-07 16:21:40 +02:00
Tuncer Ayaz
5f2930b701 Fix whitespace errors in unit tests 2011-08-05 01:52:33 +02:00
Tuncer Ayaz
c466076ffb Clean up emacs file local variables 2011-01-31 17:55:36 +01:00
Tuncer Ayaz
b18194e24d Fix file existence checks 2011-01-29 17:37:15 +01:00
Tuncer Ayaz
e4036cbe56 Apply Tidier suggestions 2011-01-13 17:39:14 +01:00
Juhani Rankimies
80c065191f Port rebar_eunit_tests to Windows 2010-10-27 11:39:12 -06:00
Chris Bernard
4825353a23 Fix incorrect coverage count when prod modules include EUnit header.
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.
2010-05-15 15:09:45 -04:00
Chris Bernard
25538e071f Fixed 3 bugs in rebar_eunit. Added EUnit tests to capture them.
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.
2010-03-04 20:53:12 -05:00