summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* eunit in 19.3 errors if `init_per_*` isn't paired with `end_per_*`alisdair sullivan2017-03-181-1/+4
|
* 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.
* More fixes for bad calls to find_appsFred Hebert2017-02-261-2/+2
|
* Fix default .app.src file for rebar_app_infoFred Hebert2017-02-241-6/+23
| | | | | | | The finding of the file was done based on an assumed 'src' path which may not be correct. This patch instead replaces the value with a lookup in configured paths and returns the first that matches to an existing file.
* Fix detection of src_dirs in unknown apps/depsFred Hebert2017-02-231-2/+38
| | | | | First find the rebar.config file, and if any data is found, check for src_dirs config. If nothing is there or no app is found, default to src/
* Add respect for src_dirs option in app_discoverFred Hebert2017-02-191-3/+38
| | | | | This lets people who use custom directories layout without leaving the .app.src in src/ to still see their app build.
* use proper skips in compiler tests that use unavailable functionsalisdair sullivan2017-02-051-17/+29
|
* Merge pull request #1463 from varnerac/cover_exclude_appsFred Hebert2017-01-301-6/+13
|\ | | | | Allow exclusion of apps in cover
| * Allow exclusion of apps in coverDrew Varner2017-01-301-6/+13
| | | | | | | | | | Adds a new option `{cover_excl_apps, Apps}` to exclude apps from coverage analysis by name.
* | Make test work on all OTPsFred Hebert2017-01-291-1/+4
| |
* | Add regression for #1410Fred Hebert2017-01-291-1/+33
| |
* | comment `ERL_COMPILER_OPTIONS` testsalisdair sullivan2017-01-281-0/+9
| |
* | consider `ERL_COMPILER_OPTIONS` when recompilingalisdair sullivan2017-01-281-5/+93
| | | | | | | | | | | | on 19.x forward the compiler should now take into consideration the value of the environment variable `ERL_COMPILER_OPTIONS` when deciding whether or not to recompile a module
* | Survive EDoc crashesFred Hebert2017-01-2713-1/+293
| | | | | | | | | | | | | | | | | | | | | | Instead of a hard crash, display an error message indicating which app failed. We can't report the exact failure; only EDoc does it to stdout itself and we can't capture it. Pre/Post hooks are run properly despite the failure, as per escript and compile providers.
* | Rework test to work and pass on linuxFred Hebert2017-01-271-7/+11
| | | | | | | | to be roundtripped again to windows.
* | Fix mv command on windowsFred Hebert2017-01-271-2/+184
|/ | | | | | | Requires changing a bunch of arguments for xerocopy since it does not allow to rename while copying. Lots of tests added
* 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.
* Added regression tests for PR 1398Ted Burghart2016-12-051-2/+102
|
* Fully clean up after test utils for proxyFred Hebert2016-12-011-4/+5
|
* 1394: fixed typoArtem Pervin2016-12-011-4/+4
|
* 1394: fixed typoArtem Pervin2016-12-011-3/+3
|
* 1394: restore original proxy spec after testsArtem Pervin2016-12-011-6/+21
|
* 1394: refined export list and testsArtem Pervin2016-12-011-2/+7
|
* 1394: one more testArtem Pervin2016-12-011-0/+3
|
* 1394: fixed typosArtem Pervin2016-11-301-2/+2
|
* 1394: fixed typoArtem Pervin2016-11-301-2/+2
|
* 1394: added fix for rebar_utils, moved setting of http_options into ↵Artem Pervin2016-11-301-2/+16
| | | | init_config, added unit tests
* Add 'recursive' optionSiri Hansen2016-11-212-5/+103
| | | | | | | | | | | | The option {recursive,boolean()} can now be set pr directory in 'src_dirs' and 'extra_src_dirs', and on top level in the new 'erlc_compiler' option. Example config: {erlc_compiler,[{recursive,false}]}. {src_dirs,[{"src",[{recursive,true}]}]}. This will cause recursive compilation within the "src" directory, but not in any other directoires.
* Add exclude_apps/mods, plt_extra_mods, base_plt_mods configJames Fish2016-11-031-2/+36
| | | | | | | * exclude_apps - never use applications for PLT/analysis * base_plt_mods - add modules to base PLT (overrules exclude_apps) * plt_extra_mods - add modules to PLT (overrules exclude_apps) * exclude_mods - never use modules for PLT/analysis (overrules all)
* 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
* Prevent crashes in `rebar3 as` with no tasksFred Hebert2016-10-171-1/+16
| | | | checks on hd(...) and so on could not handle empty lists
* Merge pull request #1337 from ferd/support-aliasingalisdair sullivan2016-10-133-16/+129
|\ | | | | Properly support package aliasing and alt names
| * Track package hash in memory index, add hash testFred Hebert2016-10-041-1/+43
| | | | | | | | | | | | | | | | | | | | This adds tracking of package hash in the in-memory index rather than the current `undefined' values. According to the test added, this is not necessary for transitive package dep hash chcking, but does result in a more complete index search result when doing app lookups, and could yield some optimizations on hash checks by checking from the index structure before fetching a package.
| * Add transitive alias testsFred Hebert2016-10-041-7/+75
| |
| * Update existing tests to use new index structureFred Hebert2016-10-031-1/+4
| |
| * Properly support package aliasing and alt namesFred Hebert2016-09-271-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aliasing only had a bit of ad-hoc support in rebar3, and various issues have encountered problems related to the package names not mapping properly with the application name. One such issue is https://github.com/erlang/rebar3/issues/1290 The problem has been hard to find because it only impacts transitive dependencies (not top-level ones) of other packages. The root cause for this is that the application name was not being tracked by rebar3's internal index, only the package name and its version were. When a given application was a package app, the data for the application name would be reconstructed from the lock file, but only if it were a top-level app or a dependency of a source application where parsing the lock file is necessary to know what comes next. When a transitive dependency of a package dependency was fetched, we instead read its dependencies directly from the in-memory package index within rebar3. This caused us to only read the package name and version, and lost all information regarding application name. This worked fine for most cases since for the vast majority of packages, the package name matches the app name, but failed for all aliases, which would then be moved to directories that wouldn't match the app name. This in turn broke some aspects of code analysis (in Dialyzer), or other functionality relying on static paths, such as including .hrl files from dependencies. This patch reformats the internal storage format of dependencies to align with the internal one used by rebar3, so that the app name can be carried along with the package name and its version. The fix can only work once `rebar3 update` is called so the index is rebuilt internally, and will the file cached on disk will be incompatible with older rebar3 versions. Currently, the following is not covered: - Tests - Including the package hashes of dependencies so they may match what is in a lock file -- they're being `undefined` instead, which may break some lookups. The previous format did not lend itself to hashing in the same way, and it is possible transitive deps were not being tracked properly, or worked by respecting the current package hierarchy. This will require further analysis For now this commit can allow reviewing and discussion.
* | Fix private includes when compiling in test profileFred Hebert2016-09-301-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When an include file is set in a private path (i.e. src/), the rebar3 compiler would not add them to the {i, Path} params -- only include/ and the project root were being added. This meant that when some extra source directories were added to the compile job, such as test/ when running under the test profile, the private include paths could not be shared with the test module. This patch fixes the issues (and adds tests) for such a specific case by adding all the configured include paths to the {i, Path} erl_opts arguments, yielding successful compile runs.
* | Add support for behaviors, and not just behavioursBrujo Benavides2016-09-281-1/+1
|/
* allow using an alternate regex to locate test modules during eunit runsalisdair sullivan2016-09-201-1/+25
| | | | | | | | {`eunit_test_regex`, Regex}` will use the supplied `Regex` instead of the default to locate tests in test dirs. note this matches only the filename, not the path. the regex is applied to all test dirs, recursively fixes #1331
* recompile all files when a parse transform given as an opt needs updatingalisdair sullivan2016-09-201-2/+103
| | | | | | | | | there's no way to detect which files actually rely on a parse transform passed to the compiler via the options (as opposed to `-compile(..)` so if any parse transforms are in modules that need recompiling just recompile the world fixes #1328
* Ignore mv warningsDavid de Boer2016-09-151-2/+10
| | | | | | | In some cases, mv will throw a warning, while still moving the files correctly and returning a 0 return code: "mv: can't preserve ownership of ... Permission denied".
* r15 proof cover tests``alisdair sullivan2016-08-271-1/+2
|
* use `cover:analyse(cover:modules())` for tests instead of `cover:analyse()`alisdair sullivan2016-08-271-1/+1
| | | | `cover:analyse/0` didn't exist pre-otp18
* reset accumulated coverdata on writing out to disk. this preventsalisdair sullivan2016-08-271-2/+19
| | | | | provider chains like `eunit, ct, proper` from misreporting cover stats from providers later in the sequence
* Add test suite for cover_excl_mods optionFred Hebert2016-08-271-2/+28
|