diff options
author | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2017-03-28 23:40:24 +0100 |
---|---|---|
committer | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2017-03-29 22:37:05 +0100 |
commit | 0b404c4125cf464c99bd369bcba1ded30d1eba2d (patch) | |
tree | 3ac79f75e229d6f4a2c41676d3a37ebbe97f68a1 /eclass/rebar.eclass | |
parent | dev-python/pygments: arm64 stable. (diff) | |
download | gentoo-0b404c4125cf464c99bd369bcba1ded30d1eba2d.tar.gz gentoo-0b404c4125cf464c99bd369bcba1ded30d1eba2d.tar.bz2 gentoo-0b404c4125cf464c99bd369bcba1ded30d1eba2d.zip |
rebar.eclass: Disable coverage in test phase
This is a workaround for failing coverage. Coverage is not relevant in
this context, so there's no harm to disable it, although the issue
should be fixed.
Diffstat (limited to 'eclass/rebar.eclass')
-rw-r--r-- | eclass/rebar.eclass | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass index 3ffe5630d778..3620153f8c31 100644 --- a/eclass/rebar.eclass +++ b/eclass/rebar.eclass @@ -78,6 +78,22 @@ _rebar_find_dep() { echo "${result}" } +# @FUNCTION: rebar_disable_coverage +# @USAGE: [<rebar_config>] +# @DESCRIPTION: +# Disable coverage in rebar.config. This is a workaround for failing coverage. +# Coverage is not relevant in this context, so there's no harm to disable it, +# although the issue should be fixed. +rebar_disable_coverage() { + debug-print-function ${FUNCNAME} "${@}" + + local rebar_config="${1:-rebar.config}" + + sed -e 's/{cover_enabled, true}/{cover_enabled, false}/' \ + -i "${rebar_config}" \ + || die "failed to disable coverage in ${rebar_config}" +} + # @FUNCTION: erebar # @USAGE: <targets> # @DESCRIPTION: @@ -183,7 +199,10 @@ rebar_src_prepare() { default rebar_set_vsn - [[ -f rebar.config ]] && rebar_remove_deps + if [[ -f rebar.config ]]; then + rebar_disable_coverage + rebar_remove_deps + fi } # @FUNCTION: rebar_src_configure |