* [gentoo-commits] repo/gentoo:dev-erlang-bumps commit in: eclass/
@ 2017-03-28 22:42 Amadeusz Piotr Żołnowski
0 siblings, 0 replies; only message in thread
From: Amadeusz Piotr Żołnowski @ 2017-03-28 22:42 UTC (permalink / raw
To: gentoo-commits
commit: 7e79e1c7415935d306e6c548e9068fc659837ac9
Author: Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 28 22:40:24 2017 +0000
Commit: Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
CommitDate: Tue Mar 28 22:40:24 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e79e1c7
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.
eclass/rebar.eclass | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index 3ffe5630d77..c1dc609b128 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-28 22:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 22:42 [gentoo-commits] repo/gentoo:dev-erlang-bumps commit in: eclass/ Amadeusz Piotr Żołnowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox