summaryrefslogtreecommitdiff
path: root/src/rebar_eunit.erl
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix for destruction of config app vars on resetJeremy Raymond2012-02-151-1/+36
|
* Fix whitespace errorsTuncer Ayaz2012-01-171-12/+13
|
* Delete existing erl files in ?EUNIT_DIRFrancis Joanis2012-01-171-0/+21
| | | | | | Before copying the .erl files to the .eunit directory ensure that they are deleted if they already exist. This prevents EACCES errors to happen when trying to re-copy .erl files that are read-only.
* Don't kill any inet_gethost_native after eunitTomas Abrahamsson2011-12-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid error reports like this one: prompt$ rebar eunit ==> dummy (eunit) Test passed. =ERROR REPORT==== 29-Dec-2011::23:22:11 === ** Generic server inet_gethost_native_sup terminating ** Last message in was {'EXIT',<0.62.0>,killed} ** When Server state == {state,inet_gethost_native,undefined,<0.62.0>, {local,inet_gethost_native_sup}} ** Reason for termination == ** killed Previously, it could happen if an eunit test did something that required a name lookup, like in this example: -module(dummy_tests). -include_lib("eunit/include/eunit.hrl"). x_test() -> {ok, _Hostent} = inet:gethostbyname(localhost). The inet_gethost_native is a process, started on demand, under a supervisor_bridge under the kernel_sup, but it is not a gen_server process or the like, so it has nothing in '$ancestors' in its process dictionary to indicate it is part of kernel.
* Universally support apps=/skip_apps=Tuncer Ayaz2011-12-121-34/+1
|
* Stop applications before killing extra processesKlas Johansson2011-11-021-3/+4
| | | | | | This means that applications get a chance to shut down themselves, before rebar will start killing their processes. This avoids ERROR REPORTS from application supervisors.
* Remove modules that fail coverage from the listJon Meredith2011-10-141-4/+4
|
* Fix cover_init call to use correct module listTuncer Ayaz2011-09-011-1/+1
|
* Keep *_tests not automatically included by eunitJoseph Wayne Norton2011-09-011-9/+16
|
* Fix R13 compatibility (auto imported monitor/2)Alfonso De Gregorio2011-08-281-1/+1
|
* Fix Dialyzer warningsTuncer Ayaz2011-08-251-12/+12
|
* Merge slf-eunit-process-isolation2 branchScott Lystig Fritchie2011-08-241-0/+148
|\
| * Check $ancestors for kernel OTP app processes to not killScott Lystig Fritchie2011-08-241-9/+22
| |
| * Add comments on pids not to killScott Lystig Fritchie2011-08-231-0/+4
| |
| * Portability via filename:join/1Scott Lystig Fritchie2011-08-231-2/+3
| |
| * Replace sleep with pause_until_net_kernel_stopped()Scott Lystig Fritchie2011-08-231-1/+17
| |
| * EUnit: reset vm state after test runScott Lystig Fritchie2011-08-111-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | Added new property to `eunit_opts` option list: reset_after_eunit::boolean() - default = true. If true, try to "reset" VM state to approximate state prior to running the EUnit tests: * Stop net_kernel if it was started * Stop OTP applications not running before EUnit tests were run * Kill processes not running before EUnit tests were run * Reset OTP application environment variables
* | Apply Tidier suggestionsTuncer Ayaz2011-08-201-8/+8
|/
* Fix handling of {already_started,Pid} from cover:startDavid Reid2011-08-101-2/+10
| | | | | | | | 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.
* Redirect cover module output to .eunit/cover.logDavid Reid2011-08-051-3/+22
| | | | | | | | | 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.
* Fix eunit regression (reported-by Alexander Dorofeev)Andrew Thompson2011-04-231-1/+4
|
* New eunit param skip_app, allow suite to be a listAndrew Thompson2011-04-061-8/+25
| | | | | | | | | | | | | | 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.
* Make debug_info defaultTuncer Ayaz2011-03-301-2/+2
| | | | | Add no_debug_info option. Remove debug_info=1 option.
* Fix regression (thanks Anthony Molinaro)Tuncer Ayaz2011-03-071-4/+5
|
* Add PropEr supportTuncer Ayaz2011-02-161-17/+24
|
* Remove export_all directiveTuncer Ayaz2011-02-131-3/+2
|
* Add eunit_first_files optionJoseph Wayne Norton2011-02-131-1/+4
|
* Clean up codeTuncer Ayaz2011-02-061-26/+40
|
* Clean up emacs file local variablesTuncer Ayaz2011-01-311-1/+1
|
* Fix file existence checksTuncer Ayaz2011-01-131-1/+1
|
* Tidier improvementsKostis Sagonas2010-10-261-5/+4
|
* Use eunit_dir() instead of ?EUNIT_DIR since the function exists.Oscar Hellström2010-08-241-1/+1
| | | | 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.
* Make sure *both* .eunit and ebin directory exists before setting up the code ↵Oscar Hellström2010-08-241-1/+2
| | | | | | 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.
* Dialyzer related cleanupsKostis Sagonas2010-10-101-15/+20
|
* Add optional eunit coverage report to terminalAndrew Thompson2010-10-061-2/+32
| | | | | | 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.
* Fix dialyzer warning for call to code:which/1Tuncer Ayaz2010-09-291-1/+2
|
* beam_lib:chunks needs abs path to beam.Russell Brown2010-07-041-1/+8
| | | | Uses code:which or cover:is_compiled to get path the beam for chunks
* Fix up code path for eunit so that parse transforms in eunit tests work properlyDave Smith2010-06-281-29/+24
|
* Only skip eunit on apps IIF the app= parameter is specifiedDave Smith2010-06-251-7/+14
| | | | | --HG-- extra : rebase_source : 2f2b819e209a912424c328dd57ec5e00268d40bc
* Correct typoTuncer Ayaz2010-06-231-2/+2
|
* Change console message to debug message (more appropriate)Dave Smith2010-06-221-1/+1
|
* Adding support for restricting eunit to a specific applicationDave Smith2010-06-221-1/+13
|
* Fix incorrect coverage count when prod modules include EUnit header.Chris Bernard2010-05-151-1/+31
| | | | | | | | 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.
* Taught eunit/coverage to split the src module coverage stats from any test code.Jon Meredith2010-05-031-19/+32
|
* Copy all source files for eunit to .eunit directory so that cover works ↵Dave Smith2010-05-031-1/+1
| | | | properly (ick!)
* Copy src files to .eunit so that cover can always find themJeremy Raymond2010-04-221-0/+6
|
* Merging w/ mainlineDave Smith2010-04-231-3/+2
|\
| * Reuse rebar_utils:get_cwd/0Tuncer Ayaz2010-04-211-2/+1
|/
* Make sure to add .eunit as an absolute directory so that we avoid weirdness ↵Dave Smith2010-04-161-1/+5
| | | | with code loading stuffs.
* Fixed 3 bugs in rebar_eunit. Added EUnit tests to capture them.Chris Bernard2010-03-041-10/+11
| | | | | | | | | | | | | | | | | | | | | | | 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.