summaryrefslogtreecommitdiff
path: root/test/rebar_ct_SUITE.erl
Commit message (Collapse)AuthorAgeFilesLines
* add eunit and ct option to set coverdata file nameTristan Sloughter2017-12-041-1/+26
|
* OTP-21 readiness, Full Unicode supportFred Hebert2017-11-161-1/+1
| | | | | | | | | | | | This replaces all deprecated function usage by alternative ones based on a version switch enacted at compile time, preventing all warnings. This will likely introduce some possible runtime errors in using a Rebar3 compiled on OTP-20 or OTP-21 back in versions 19 and earlier, but we can't really work around that. A bunch of dependencies have been updated to support OTP-21 without warnings as well.
* fix sys config mergingTristan Sloughter2017-09-011-1/+11
|
* Unicode support in all the placesFred Hebert2017-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done through 3 main change groups: - replacing `~s` by `~ts` in format strings, so that strings that contain unicode are properly printed rather than crashing - adding the `unicode` argument to all function of the `re` module to ensure transformations on strings containing unicode data are valid instead of crashing (see issue #1302) - replacing `ec_cnv:to_binary/1` and `ec_cnv:to_list/1` with matching functions in `rebar_utils`. The last point has been done, rather than modifying and updating erlware commons, because binary and list conversions can be a contentious subject. For example, if what is being handled is actually bytes from a given binary stream, then forcing a byte-oriented interpretation of the data can corrupt it. As such, it does not appear safe to modify erlware commons' conversion functions since it may not be safe for all its users. Instead, rebar3 reimplements a subset of them (only converting atoms and chardata, ignoring numbers) with the explicit purpose of handling unicode string data. Tests were left as unchanged as possible. This may impact the ability to run rebar3's own suites in a unicode path, but respects a principle of least change for such a large patch.
* add ct compile_only test, checks for compiled appTristan Sloughter2017-07-141-2/+20
|
* Allow single test spec in ct_optsSiri Hansen2017-03-061-2/+39
| | | | | | The option {spec,Specs} is allowed in ct_opts, but rebar_prv_common_test:test_dirs did not take into account that Specs could also be a string only, i.e. not a list of strings.
* Handle errors from ct_testspecSiri Hansen2016-12-221-0/+47
|
* Add all dirs from test specSiri Hansen2016-12-201-4/+99
| | | | | | | | | | 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-2/+53
|
* Translate path to testspecSiri Hansen2016-12-091-4/+23
| | | | | | 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-4/+24
| | | | | | 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-2/+84
| | | | | | | | | | | | | 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.
* allow test specifications to be passed via the command linealisdair sullivan2016-10-171-19/+35
| | | | | | `rebar3 ct --spec foo.spec,bar.spec,baz.spec` now works also added support for the `join_specs` flag on the command line
* add support for passing a sys_config to common testTristan Sloughter2016-06-111-3/+45
|
* adjust `data_dir_correct` test in ct suitealisdair sullivan2016-05-231-1/+1
| | | | don't bother checking the profile in the path to the data dir
* move definition of 'EUNIT' macro to eunit provideralisdair sullivan2016-03-031-4/+28
| | | | add definition of 'COMMON_TEST' macro to eunit provider
* Take CT options errors and turn them to warningsFred Hebert2016-03-021-7/+7
| | | | | | | | 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-3/+27
|\ | | | | add support for common tests `include` flag
| * add support for common tests `include` flagalisdair sullivan2016-03-011-3/+27
| |
* | 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-1/+19
|/
* fix paths for multiple app projects when running ct with no --dir argumentalisdair sullivan2016-01-301-5/+6
|
* add test for foo_SUITE_data filesalisdair sullivan2015-12-201-2/+8
|
* put `extra' ct test suites in `extras/apps/APPNAME' rather than `extras'alisdair sullivan2015-12-201-1/+44
| | | | 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-1/+45
| | | | | | | | 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'
* error on ct/eunit argument errors instead of warningalisdair sullivan2015-11-151-10/+68
|
* calculate coverage info as late as possible in ct provider executionalisdair sullivan2015-11-051-2/+36
|
* reenable support for most command line options and rename `ct_tests` to ↵alisdair sullivan2015-11-011-3/+400
| | | | `ct_opts`
* refactor `rebar_prv_common_test`alisdair sullivan2015-11-011-167/+144
| | | | | | | | * 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
* refactor `rebar_erlc_compiler`alisdair sullivan2015-10-261-0/+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
* add comment for `data_dir' test in `rebar_ct_SUITE'alisdair sullivan2015-09-141-0/+1
|
* test for ensuring `data_dir` is set correctly in ct configsalisdair sullivan2015-09-141-4/+14
| | | | | | this test almost certainly only fails under very limited circumstances limiting it's utility. it is known to fail with some versions of rebar3 when this test is run via `rebar3 ct --cover`
* delete all symlinks when copying from project files to `_build` treealisdair sullivan2015-05-091-2/+34
| | | | | | to prevent any data from being overwritten fixes #395
* modify `ct` provider to copy selected directories and compile themalisdair sullivan2015-04-031-0/+520
alongside their source (ie, if `some_tests` is a directory that contains test suites beams resulting from compiling them will be placed in `some_tests` in the appropriate `_build` directory