summaryrefslogtreecommitdiff
path: root/src/rebar_eunit.erl
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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.
* Refactor eunit and covertheiw2010-02-191-106/+93
|
* Merging with OJ's branchDave Smith2010-02-131-3/+36
|\
| * Added support for the speficiation of test suite namesOJ Reeves2010-02-031-4/+35
| | | | | | | | | | | | | | 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).
* | Provide package support for eunit; build_plt now includes listed ↵theiw2010-02-051-12/+17
|/ | | | applications; begin including -spec annotations
* [mq]: eunit-fixOJ Reeves2010-01-091-1/+1
|
* Another round of refactoring to yield better flexiblity in the base_compiler ↵Dave Smith2010-01-031-15/+6
| | | | system
* Refactor of compilation logic to enable support for package modules and ↵Dave Smith2010-01-021-5/+10
| | | | provide better modularity/reusability for other systems
* Added vi modeline/emacs local variables to file headersTuncer Ayaz2009-12-311-0/+2
|
* Deleted trailing whitespaceTuncer Ayaz2009-12-301-11/+11
|
* add hrl-triggered recompiling to 'eunit' build as wellBryan Fink2009-12-211-1/+1
|
* recompile files if their "includes" have changedBryan Fink2009-12-211-1/+1
| | | | added parameter to do_compile for passing a function that can extra the list of includes from a file
* Run eunit in .eunit dir to ensure any created/temporary files are created thereDave Smith2009-12-141-0/+8
|
* Fixing number of warnings and bugletsDave Smith2009-12-141-6/+6
|
* Add support for coverage generationDave Smith2009-12-091-2/+103
|
* Remove unnecessary debug in _core; adding EQC flag for eunit buildsDave Smith2009-12-081-2/+24
|
* Refactoring eunit to support in-module testsDave Smith2009-12-071-79/+44
|