summaryrefslogtreecommitdiff
path: root/src/rebar_prv_common_test.erl
Commit message (Collapse)AuthorAgeFilesLines
* Handle errors from ct_testspecSiri Hansen2016-12-221-3/+5
|
* Make sure ct_testspec is loadedSiri Hansen2016-12-221-0/+1
| | | | ... before calling erlang:function_exported(ct_testspec,get_tests,1).
* Add all dirs from test specSiri Hansen2016-12-201-12/+69
| | | | | | | | | | Parse given test specs and add all spec- and suite directories as extra_src_dirs in order to ensure that all these directories are copied to the _build area and the suites are compiled. Specs located in the project- or app root are explicitly copied to the _build area in order to avoid recursive copying of the complete directory tree.
* Allow using relative path to suite in project rootSiri Hansen2016-12-131-14/+1
|
* Translate path to testspecSiri Hansen2016-12-091-33/+28
| | | | | | This is a bugfix. It makes sure that the given path to a testspec is translated so common_test will pick the spec from the _build directory, and not from the source tree.
* Add directory of testspec as extra_src_dirSiri Hansen2016-12-081-8/+8
| | | | | | This is necessary in order to automatically get the testspec included as an artifact (i.e. copied to the _build dir) in the case when it is stored in another directory than 'test'.
* Improve merge of command line options and config optionsSiri Hansen2016-12-071-25/+52
| | | | | | | | | | | | | Bug: option 'spec' is not specifically handled when merging options from the command line with options from rebar.config. Due to this, if the config specifies a 'spec', then this will take precedence over any 'dir' and/or 'suite' on the command line. This commit takes special care of all options that can be used to select tests - meaning that if any of the options 'spec', 'dir', 'suite', 'group' or 'case' are specified on the command line, then all 'spec', 'dir', 'suite', 'group' and 'case' options in rebar.config will be ignored.
* Fix rebar3 dialyzer warningsFred Hebert2016-11-191-11/+4
| | | | Some tricky changes in there but should be okay
* fix "helpful" compiler spelling correctionalisdair sullivan2016-10-171-1/+1
|
* allow test specifications to be passed via the command linealisdair sullivan2016-10-171-3/+8
| | | | | | `rebar3 ct --spec foo.spec,bar.spec,baz.spec` now works also added support for the `join_specs` flag on the command line
* Some post-review changes:Alexander Sedov2016-10-111-0/+4
| | | | | - restore path after loading applications, - helpful comments.
* Avoid backward-compatibility-breaking changes.Alexander Sedov2016-10-111-3/+3
|
* Made reading sys.configs consistent with OTP specification.Alexander Sedov2016-10-111-3/+3
|
* Made Common Test load the user's applications before slurping config.Alexander Sedov2016-10-111-0/+1
|
* Typo fix.Alexander Sedov2016-08-041-1/+1
|
* add support for passing a sys_config to common testTristan Sloughter2016-06-111-1/+24
|
* Add sname, name, setcookie option in eunit, ctsoranoba2016-04-071-1/+10
|
* supported dist_node in ct and eunitsoranoba2016-04-071-0/+5
|
* allow all `ct_opts` arguments to be passed through to `ct:run_test/1`alisdair sullivan2016-04-011-2/+4
|
* move definition of 'EUNIT' macro to eunit provideralisdair sullivan2016-03-031-1/+19
| | | | add definition of 'COMMON_TEST' macro to eunit provider
* Take CT options errors and turn them to warningsFred Hebert2016-03-021-6/+9
| | | | | | | | The idea is that given we accept arbitrary config items for CT, we should similarly be able to pass unsupported options and keep things running. However for unsupported options, a warning is very useful to have.
* Merge pull request #1099 from talentdeficit/ct_includeTristan Sloughter2016-03-011-14/+30
|\ | | | | add support for common tests `include` flag
| * add support for common tests `include` flagalisdair sullivan2016-03-011-14/+30
| |
* | Merge pull request #1098 from talentdeficit/ct_warn_on_cover_specTristan Sloughter2016-03-011-1/+3
|\ \ | | | | | | error on a cover spec in ct_opts
| * | add a link to the docs about `test_spec` and `cover` in ct warningsalisdair sullivan2016-03-011-2/+2
| | |
| * | error on a cover spec in ct_optsalisdair sullivan2016-03-011-0/+2
| |/
* | in providers that don't run per app run all available hooksTristan Sloughter2016-02-281-4/+5
|/
* fix paths for multiple app projects when running ct with no --dir argumentalisdair sullivan2016-01-301-7/+13
|
* don't strip the project apps when running `ct` with just a root suite specifiedalisdair sullivan2016-01-301-2/+3
| | | | this ensures the project apps are compiled to `lib/` instead of `extras/`
* put `extra' ct test suites in `extras/apps/APPNAME' rather than `extras'alisdair sullivan2015-12-201-1/+2
| | | | this allows repeated test suite names across apps without conflicts
* allow ct suites to be specified at the root of a project (or root of app)alisdair sullivan2015-12-201-2/+27
| | | | | | | | previously rebar3 dropped suites declared at the root of the project (via `--suite=whatever_SUITE' probably) and warned. this was because the compiler would recursively copy and compile everything in the directory indicated by the test suite. this changes the copy mechanism to only copy erl source files and directories that end with `_SUITE_data' into the `extras' dir in `_build'
* whitespace cleanupalisdair sullivan2015-12-201-1/+1
|
* error on ct/eunit argument errors instead of warningalisdair sullivan2015-11-151-42/+71
|
* warn on incorrectly specified test options in `rebar.config`alisdair sullivan2015-11-141-6/+21
| | | | | | | when `ct_opts`, `eunit_tests`, `eunit_first_files`, `ct_first_files`, `erl_first_files`, `eunit_compile_opts`, `ct_compile_opts` and `erl_opts` have values that are single non-list terms warn and try wrapping them in a list when processing them in the `eunit` and `ct` providers
* Optionally disable readable outputFred Hebert2015-11-131-10/+26
|
* Prettify all of common test output.Fred Hebert2015-11-131-2/+19
| | | | | | | | | | This uses cth_readable to: - silence error_logger output to the shell unless a test fails - silence ct:pal output to the shell unless a test fails I have currently not baked in any way to disable this behaviour, but I figured if it is required, there is time to do it before the final 3.0.0 release.
* calculate coverage info as late as possible in ct provider executionalisdair sullivan2015-11-051-3/+4
|
* add warning about `auto_compile`alisdair sullivan2015-11-021-3/+10
|
* reenable support for most command line options and rename `ct_tests` to ↵alisdair sullivan2015-11-011-8/+35
| | | | `ct_opts`
* support atom suites in `ct_tests`alisdair sullivan2015-11-011-17/+29
|
* refactor `rebar_prv_common_test`alisdair sullivan2015-11-011-373/+311
| | | | | | | | * remove partial support for ct `test_spec` until it can be done properly and warn if `test_spec` is present in test opts * use new compiler functionality to reduce complexity of provider * reduce command line options available to those that can be supported properly
* add an option to soft purge rather than purge old codealisdair sullivan2015-11-011-1/+1
| | | | | at the cost of some SASL warnings this prevents rebar3 from terminating processes when reloading their code before running tests
* refactor `rebar_erlc_compiler`alisdair sullivan2015-10-261-43/+1
| | | | | | | | | | | | | | | | | | | * modify compiler interface to work on either application objects or directories containing source files * compile all sources in `src_dirs` to the application `ebin` dir and all sources in `extra_src_dirs` to a directory mirroring it's position in the app's `_build` directory. for example, `apps/foo/more` would compile to `_build/default/lib/foo/more` for `extra_src_dirs` in the root of a project with multiple applications (so orphan directories that don't "belong" to an application) compile to `_build/default/extras/more` * copy directories specified in `extra_src_dirs` into the `_build` directory so tools like `ct` and `xref` that expect source to be in a particular location still work * clean compiled artifacts from all `extra_src_dirs` * alter `eunit`, `ct` and `cover` to work with the new directory structure * billions of new tests
* cover compile beams compiled for ct/eunit seperately from beams compiled ↵alisdair sullivan2015-09-111-0/+1
| | | | | | otherwise fixes #788
* fix run_all_hooks call for ct provider, no need to pass appinfoTristan Sloughter2015-09-081-2/+2
|
* Merge pull request #769 from surik/cover_spec_optionFred Hebert2015-09-051-0/+2
|\ | | | | Fix cover_spec options for ct
| * Fix cover_spec options for ctYury Gargay2015-09-031-0/+2
| |
* | wip: move state into app_infoTristan Sloughter2015-08-311-3/+3
|/
* symlink ct test dirs rather than copyalisdair sullivan2015-08-261-2/+4
|
* use correct rebar_state for a dep, not the top level stateTristan Sloughter2015-08-161-4/+4
|