Gentoo Archives: gentoo-dev

From: "Hanno Böck" <hanno@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH] rebar.eclass: Run tests with new code
Date: Sat, 02 May 2020 17:03:47
Message-Id: 20200502190256.44e108fb@computer
1 Due to an update of dev-erlang/fast_tls I noticed an issue in the rebar
2 eclass with tests.
3
4 It seems the way the eclass currently works it is running tests with
5 the library installed in the system, not the code just compiled.
6
7 This is obviously not what we want and it also obviously can fail if
8 the new tests use features that aren't present in the old version in
9 the system.
10
11 The patch below fixes this and runs tests with libs from the current
12 directory.
13
14 Closes: https://bugs.gentoo.org/720448
15 Signed-off-by: Hanno Böck <hanno@g.o>
16 ---
17
18 diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
19 index 92dd16b08..f9849f0ff 100644
20 --- a/eclass/rebar.eclass
21 +++ b/eclass/rebar.eclass
22 @@ -105,6 +105,9 @@ erebar() {
23 (( $# > 0 )) || die "erebar: at least one target is required"
24
25 local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
26 + if [ "$1" = "eunit" ]; then
27 + local -x ERL_LIBS="."
28 + fi
29 rebar -v skip_deps=true "$@" || die -n "rebar $@ failed"
30 }
31
32
33
34 --
35 Hanno Böck
36 https://hboeck.de/

Replies

Subject Author
Re: [gentoo-dev] [PATCH] rebar.eclass: Run tests with new code David Seifert <soap@g.o>