commit:     34d394a19857f932f8b11102807a412231217d5b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 26 05:53:29 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 26 06:10:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34d394a1

sys-devel/gdb: sync live (notably, run unittests)

Running the unittests is better than nothing.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/gdb/gdb-13.0.90_p20230126.ebuild | 14 +++++------
 sys-devel/gdb/gdb-9999.ebuild              | 37 ++++++++++++++++--------------
 2 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/sys-devel/gdb/gdb-13.0.90_p20230126.ebuild 
b/sys-devel/gdb/gdb-13.0.90_p20230126.ebuild
index a73bb774a873..a79f0ab1957d 100644
--- a/sys-devel/gdb/gdb-13.0.90_p20230126.ebuild
+++ b/sys-devel/gdb/gdb-13.0.90_p20230126.ebuild
@@ -41,11 +41,15 @@ case ${PV} in
                ;;
 esac
 
+PATCH_DEV=""
+PATCH_VER=""
 DESCRIPTION="GNU debugger"
 HOMEPAGE="https://sourceware.org/gdb/";
-SRC_URI="${SRC_URI}
-       
${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz}
-       ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
+SRC_URI="
+       ${SRC_URI}
+       
${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz}
+       ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
+"
 
 LICENSE="GPL-3+ LGPL-2.1+"
 SLOT="0"
@@ -278,10 +282,6 @@ src_install() {
                dodoc gdbserver/README
        fi
 
-       if [[ -n ${PATCH_VER} ]] ; then
-               dodoc "${WORKDIR}"/extra/gdbinit.sample
-       fi
-
        # Remove shared info pages
        rm -f 
"${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
 

diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild
index 5a1837450675..a79f0ab1957d 100644
--- a/sys-devel/gdb/gdb-9999.ebuild
+++ b/sys-devel/gdb/gdb-9999.ebuild
@@ -41,11 +41,15 @@ case ${PV} in
                ;;
 esac
 
+PATCH_DEV=""
+PATCH_VER=""
 DESCRIPTION="GNU debugger"
 HOMEPAGE="https://sourceware.org/gdb/";
-SRC_URI="${SRC_URI}
-       
${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz}
-       ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
+SRC_URI="
+       ${SRC_URI}
+       
${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz}
+       ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
+"
 
 LICENSE="GPL-3+ LGPL-2.1+"
 SLOT="0"
@@ -58,16 +62,7 @@ fi
 
 IUSE="cet guile lzma multitarget nls +python +server sim source-highlight test 
vanilla xml xxhash zstd"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-# In fact, gdb's test suite needs some work to get passing.
-# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
-# As of 11.2, on amd64: "# of unexpected failures    8600"
-# Also, ia64 kernel crashes when gdb testsuite is running.
-RESTRICT="
-       ia64? ( test )
-       !test? ( test )
-       test
-"
+RESTRICT="!test? ( test )"
 
 RDEPEND="
        dev-libs/mpfr:0=
@@ -233,6 +228,18 @@ src_compile() {
        emake V=1
 }
 
+src_test() {
+       # Run the unittests (nabbed invocation from Fedora's spec file) at least
+       emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"'
+
+       # Too many failures
+       # In fact, gdb's test suite needs some work to get passing.
+       # See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
+       # As of 11.2, on amd64: "# of unexpected failures    8600"
+       # Also, ia64 kernel crashes when gdb testsuite is running.
+       #emake -k check
+}
+
 src_install() {
        emake V=1 DESTDIR="${D}" install
 
@@ -275,10 +282,6 @@ src_install() {
                dodoc gdbserver/README
        fi
 
-       if [[ -n ${PATCH_VER} ]] ; then
-               dodoc "${WORKDIR}"/extra/gdbinit.sample
-       fi
-
        # Remove shared info pages
        rm -f 
"${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
 

Reply via email to