| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Support minimal coverage validation in tests
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds an option (-m, --min_coverage, or {cover_opts, {min_coverage,X}})
to the 'cover' command, where the value is an integer between 0 and 100.
If the total coverage during the analysis is below the value received,
the command will fail with output like:
===> Requiring 64% coverage to pass. Only 62% obtained
If the rate is correct, the command silently passes as it currently
does.
This feature allows to enforce code coverage standards in a project if
desired.
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Adds a new option `{cover_excl_apps, Apps}` to exclude apps from coverage
analysis by name.
|
|
|
|
| |
Some tricky changes in there but should be okay
|
|
|
|
| |
don't compile when resetting coverdata
|
|
|
|
| |
fixes #1327
|
|
|
|
|
| |
provider chains like `eunit, ct, proper` from misreporting cover
stats from providers later in the sequence
|
|
|
|
|
|
| |
- brings back former error handling and debug messages
- keeps the filtering of excluded mods and debug messages
- breaks up code into multiple functions and removes nesting
|
|\
| |
| |
| | |
lpgauth-cover_excl_mods
|
| | |
|
|\ \
| |/
|/| |
Fix compile error case when cover compilation
|
| |
| |
| |
| |
| |
| |
| | |
Dependent libs is required for some module when cover compiling.
So all dependencies should be available on code path.
This fixes #1148 issue.
|
|/
|
|
| |
closes #1057 and #1179
|
| |
|
| |
|
|
|
|
|
|
| |
* only try to cover compile directories that actually exist
* recover from failures where source files don't contain required
attributes for cover compilation and print warning
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
otherwise
fixes #788
|
|\
| |
| | |
remove `cover_print_enabled` and `cover_data_dir` config options and replace with `cover_opts`
|
| |
| |
| |
| | |
and replace with `cover_opts`
|
|/
|
|
|
|
| |
- Crashes in providers lib when no providers in a namespace are bare
- Making sure bareness matches semantics; i.e. a bare provider is
visible, a non-bare provider is hidden.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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
|
|
|
|
| |
generate line by line coverage reports
|
|
|
|
| |
to the appropriate `_build` dir
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
source files in the `compile` key of `module_info/1` so `rebar cover`
struggles locating source in some instances. in these cases a warning
is printed and crappy coverage info is written rather than none at all
|
| |
|
| |
|
|
`rebar.config` or via the `-c\--cover` flag given to the appropriate
task) from the `eunit` and `ct` tasks and add a `cover` task to
write coverage analysis to disk
|