Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/cgdb/
Date: Wed, 03 Apr 2019 06:50:24
Message-Id: 1554274207.6a058bfd996599ead9fe3e50f802ccd088bd0a73.mgorny@gentoo
1 commit: 6a058bfd996599ead9fe3e50f802ccd088bd0a73
2 Author: nado <nado <AT> troglodyte <DOT> be>
3 AuthorDate: Thu Jul 19 15:57:25 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 3 06:50:07 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a058bfd
7
8 dev-util/cgdb: run tests in `dtach` + EAPI bump
9
10 cgdb needs interactive shell for testing its ncurses UI
11
12 Closes: https://bugs.gentoo.org/654986
13 Package-Manager: Portage-2.3.43, Repoman-2.3.10
14 Signed-off-by: Corentin `nado` Pazdera <nado <AT> troglodyte.be>
15 Closes: https://github.com/gentoo/gentoo/pull/9288
16 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
17
18 .../{cgdb-0.7.0.ebuild => cgdb-0.7.0-r1.ebuild} | 31 ++++++++++++++++----
19 dev-util/cgdb/cgdb-9999.ebuild | 33 +++++++++++++++++-----
20 2 files changed, 51 insertions(+), 13 deletions(-)
21
22 diff --git a/dev-util/cgdb/cgdb-0.7.0.ebuild b/dev-util/cgdb/cgdb-0.7.0-r1.ebuild
23 similarity index 56%
24 rename from dev-util/cgdb/cgdb-0.7.0.ebuild
25 rename to dev-util/cgdb/cgdb-0.7.0-r1.ebuild
26 index f1e40470f22..b4fe338de7f 100644
27 --- a/dev-util/cgdb/cgdb-0.7.0.ebuild
28 +++ b/dev-util/cgdb/cgdb-0.7.0-r1.ebuild
29 @@ -1,7 +1,7 @@
30 -# Copyright 1999-2017 Gentoo Foundation
31 +# Copyright 1999-2018 Gentoo Foundation
32 # Distributed under the terms of the GNU General Public License v2
33
34 -EAPI=6
35 +EAPI=7
36
37 if [[ ${PV} = *9999* ]]; then
38 inherit git-r3
39 @@ -20,15 +20,18 @@ LICENSE="GPL-2"
40 SLOT="0"
41 IUSE="test"
42
43 -COMMONDEPEND="
44 +DEPEND="
45 sys-libs/ncurses:0=
46 sys-libs/readline:0="
47
48 -DEPEND="${COMMONDEPEND}
49 - test? ( dev-util/dejagnu )"
50 +BDEPEND="
51 + test? (
52 + dev-util/dejagnu
53 + app-misc/dtach
54 + )"
55
56 RDEPEND="
57 - ${COMMONDEPEND}
58 + ${DEPEND}
59 sys-devel/gdb"
60
61 DOCS=( AUTHORS ChangeLog FAQ INSTALL NEWS README.md )
62 @@ -38,6 +41,22 @@ src_prepare() {
63 ./autogen.sh || die
64 }
65
66 +multilib_src_test() {
67 + # Tests need an interactive shell, #654986
68 +
69 + # real-time output of the log ;-)
70 + touch "${T}/dtach-test.log" || die
71 + tail -f "${T}/dtach-test.log" &
72 + local tail_pid=${!}
73 +
74 + nonfatal dtach -N "${T}/dtach.sock" \
75 + bash -c 'emake check &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
76 +
77 + kill "${tail_pid}"
78 + [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
79 + [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
80 +}
81 +
82 multilib_src_configure() {
83 ECONF_SOURCE="${S}" econf
84 }
85
86 diff --git a/dev-util/cgdb/cgdb-9999.ebuild b/dev-util/cgdb/cgdb-9999.ebuild
87 index 5a5dd25473f..b4fe338de7f 100644
88 --- a/dev-util/cgdb/cgdb-9999.ebuild
89 +++ b/dev-util/cgdb/cgdb-9999.ebuild
90 @@ -1,7 +1,7 @@
91 -# Copyright 1999-2017 Gentoo Foundation
92 +# Copyright 1999-2018 Gentoo Foundation
93 # Distributed under the terms of the GNU General Public License v2
94
95 -EAPI=6
96 +EAPI=7
97
98 if [[ ${PV} = *9999* ]]; then
99 inherit git-r3
100 @@ -20,24 +20,43 @@ LICENSE="GPL-2"
101 SLOT="0"
102 IUSE="test"
103
104 -COMMONDEPEND="
105 +DEPEND="
106 sys-libs/ncurses:0=
107 sys-libs/readline:0="
108
109 -DEPEND="${COMMONDEPEND}
110 - test? ( dev-util/dejagnu )"
111 +BDEPEND="
112 + test? (
113 + dev-util/dejagnu
114 + app-misc/dtach
115 + )"
116
117 RDEPEND="
118 - ${COMMONDEPEND}
119 + ${DEPEND}
120 sys-devel/gdb"
121
122 -DOCS=( AUTHORS ChangeLog INSTALL NEWS README.md FAQ )
123 +DOCS=( AUTHORS ChangeLog FAQ INSTALL NEWS README.md )
124
125 src_prepare() {
126 default
127 ./autogen.sh || die
128 }
129
130 +multilib_src_test() {
131 + # Tests need an interactive shell, #654986
132 +
133 + # real-time output of the log ;-)
134 + touch "${T}/dtach-test.log" || die
135 + tail -f "${T}/dtach-test.log" &
136 + local tail_pid=${!}
137 +
138 + nonfatal dtach -N "${T}/dtach.sock" \
139 + bash -c 'emake check &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
140 +
141 + kill "${tail_pid}"
142 + [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
143 + [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
144 +}
145 +
146 multilib_src_configure() {
147 ECONF_SOURCE="${S}" econf
148 }