summaryrefslogtreecommitdiff
path: root/dev-util/kcov
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-29 12:00:47 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-29 12:00:47 +0100
commitadcf4f8116a4a850dae301fb4dbcd7b71cb35975 (patch)
tree41af0dd08b04c7d619cdfed205b03ff2cc201b26 /dev-util/kcov
parent7166f3a0a0b7886d340010458d0b130013cb9989 (diff)
gentoo auto-resync : 29:08:2024 - 12:00:47
Diffstat (limited to 'dev-util/kcov')
-rw-r--r--dev-util/kcov/Manifest5
-rw-r--r--dev-util/kcov/files/kcov-remove-failing-test-conflicting-with-sandbox.patch51
-rw-r--r--dev-util/kcov/kcov-43.ebuild18
-rw-r--r--dev-util/kcov/kcov-9999.ebuild18
4 files changed, 78 insertions, 14 deletions
diff --git a/dev-util/kcov/Manifest b/dev-util/kcov/Manifest
index 5193f29c1d31..9467e93567ed 100644
--- a/dev-util/kcov/Manifest
+++ b/dev-util/kcov/Manifest
@@ -1,8 +1,9 @@
AUX kcov-40-binutils-2.39.patch 3139 BLAKE2B 4a296c2b964913df11d4b01a1a0bb732c7d83e83f12fe91837574f4b11df0d28463329430bac2ebc47a47637d068a7711dfaeeb38222e9bdaae954da6004e8c6 SHA512 219c1ec491c3718ebd81601b0680b1adaa86929e331f5827491dee6ed9cedd2f171f59812d97860d0aff53d6b6509382ca9192009f0cba3daac0beacea3185f3
AUX kcov-40-gcc-13.patch 1219 BLAKE2B 2f0f84e4b468a6ca639f217aa0199bba1e4c516cf02c87839c94436f960f0c14dc11f1396193f0ee3658c8984103f4c249dc99272429f8bf6a1b82f643a55a74 SHA512 ccbd84da7fcda5c373a520c1bc1e7fa68c2db688733d928c01b62c83c24c52c91b333658137783d66db6282d799a7dbd283222931fd0819653fa34e657a879b5
+AUX kcov-remove-failing-test-conflicting-with-sandbox.patch 1810 BLAKE2B 08732ac5145a3426e8748ca0a4f80553ea9968869d8f26dfa86f9937eda2c78abd7291dfc9cd70af39bc29f4cfa0bd46566fc17e6e3fa16598c252e3a1dcdd62 SHA512 f066186f9e74bbfc05b9e30dcc95ecce1d4864498cc3bfe481dfd304dc8db8888d436a598115182d7b7c0e133f5dfd7a6bf5026136deae02d0faafff38181bb1
DIST kcov-40.tar.gz 311012 BLAKE2B 19b3cf681fe3c722fde116f454e1760ddd1e54db6fcecc05eca3ec585524fa7d1f7af3ea237943c8a68a81384567205ea443d1542ec380621d35a6f3e3dc667e SHA512 5abe1dd94fbe93fe73d658840593781216b8562a87d010a94d4520e29dd4d537e167de64b7f535347f894c68d5d8b9974ee4b9fd2cebf9291bac4ddbb9ac7cff
DIST kcov-43.tar.gz 259022 BLAKE2B 7d6da38ec93f6e7904372b0917ce86e544cd9abcaff4d21354b7c5cc40c91be37c62bbedbc7fcc449ec24fa8815503c0ed355996eef9721aab0a65ed9a1c203e SHA512 11158c63a4eb5fdb34b4787c135e3c8db60e6d3292fc109fcfb43e6dab30c6c4310b09c6d94614556eb005792bab235c6cd839c585c3a98f5700c4ee4d317aca
EBUILD kcov-40.ebuild 970 BLAKE2B 2da5d519acac1726935da68c36603e243c7cc999240831b6bd3a443685aed1edc7fad011b9f9ac2b73ca1c1b2e59182332fc16a16c9f09811f81225b1bade9c0 SHA512 ad031e9551a992ab4d9e84eb74a4cf443a8bea9a01ab9759113f5ded00da3f90384a802f15a90415bc56dab90a9c01ea5753020d19a2380f038771a542087036
-EBUILD kcov-43.ebuild 1602 BLAKE2B 04303574469813cc4b376b4675eb1be4e1f0644b4aed389b256e21bbdd0b42bae5f5a37b3c6022ab024a15e9b98124ec92a92f3f2ba9fd5276f49646deaa4850 SHA512 79bd317bcb4c65d0c0ad5aabd73dd87745d1d095e06d69cad448e1f6535b98d201620ff6a17886e015b7a6df1efe0fa955f92d9fc1a5fe53c1972b058548d929
-EBUILD kcov-9999.ebuild 1602 BLAKE2B 04303574469813cc4b376b4675eb1be4e1f0644b4aed389b256e21bbdd0b42bae5f5a37b3c6022ab024a15e9b98124ec92a92f3f2ba9fd5276f49646deaa4850 SHA512 79bd317bcb4c65d0c0ad5aabd73dd87745d1d095e06d69cad448e1f6535b98d201620ff6a17886e015b7a6df1efe0fa955f92d9fc1a5fe53c1972b058548d929
+EBUILD kcov-43.ebuild 1792 BLAKE2B a01b4e537cbcd0dd07e5379a05dae8c1bb4ad695274e5646954731109fd8f453b4d17c93723ebaec15d1b12b13689c923912d967f149a1b2cad9c20955a76c35 SHA512 1460ab86b7be335b1aa3e7c5a1b77fca772b50a8c4a74cec0c97f1781a26f59b4a4fc2050b7573d566fce29dada6edf25593ca89f776e55d429dae72b0599430
+EBUILD kcov-9999.ebuild 1792 BLAKE2B a01b4e537cbcd0dd07e5379a05dae8c1bb4ad695274e5646954731109fd8f453b4d17c93723ebaec15d1b12b13689c923912d967f149a1b2cad9c20955a76c35 SHA512 1460ab86b7be335b1aa3e7c5a1b77fca772b50a8c4a74cec0c97f1781a26f59b4a4fc2050b7573d566fce29dada6edf25593ca89f776e55d429dae72b0599430
MISC metadata.xml 2090 BLAKE2B c25cc30ffb3d25dea54a03b831e547548d9767fd28c20a5b06c3bbf8bf68504d97c426c6fc3ad644622a73682987951e85486aabb25e09d34c4bfe3a1db04ec7 SHA512 2fc8bce2a29321a12e59ecf91f2d5c2c024016e306fabbe1cb6e75d7301832e7627ef814d1fe0dd04a9bc7a533c96bd2078f309e1276b038425016360e829f68
diff --git a/dev-util/kcov/files/kcov-remove-failing-test-conflicting-with-sandbox.patch b/dev-util/kcov/files/kcov-remove-failing-test-conflicting-with-sandbox.patch
new file mode 100644
index 000000000000..8229d30be52e
--- /dev/null
+++ b/dev-util/kcov/files/kcov-remove-failing-test-conflicting-with-sandbox.patch
@@ -0,0 +1,51 @@
+From c3c89cfca876b9c56586afc374ea92a7b25998c3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Matt=C3=A9o=20Rossillol=E2=80=91=E2=80=91Laruelle?=
+ <beatussum@protonmail.com>
+Date: Sun, 18 Aug 2024 15:18:19 +0200
+Subject: [PATCH] remove failing test conflicting with sandbox
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+sys-apps/sandbox is based on `LD_PRELOAD`; however,
+`--bash-handle-sh-invocation` uses it too. This option seems to conflict with
+the sandbox environment and the associated test fails fails.
+
+Indeed, according to the Kcov man page, this option handles "invocations of
+/bin/sh scripts via using a LD_PRELOADed library that replaces execve (i.e.,
+/bin/sh is executed as /bin/bash)".
+
+Signed-off-by: Mattéo Rossillol‑‑Laruelle <beatussum@protonmail.com>
+---
+ tests/tools/test_bash_linux_only.py | 15 ---------------
+ 1 file changed, 15 deletions(-)
+
+diff --git a/tests/tools/test_bash_linux_only.py b/tests/tools/test_bash_linux_only.py
+index d0a46bb..87022e0 100644
+--- a/tests/tools/test_bash_linux_only.py
++++ b/tests/tools/test_bash_linux_only.py
+@@ -2,21 +2,6 @@ import libkcov
+ from libkcov import cobertura
+
+
+-class bash_sh_shebang(libkcov.TestCase):
+- def runTest(self):
+- rv, o = self.do(
+- self.kcov
+- + " --bash-handle-sh-invocation "
+- + self.outbase
+- + "/kcov "
+- + self.sources
+- + "/tests/bash/shell-main"
+- )
+-
+- dom = cobertura.parseFile(self.outbase + "/kcov/shell-main/cobertura.xml")
+- assert cobertura.hitsPerLine(dom, "sh-shebang.sh", 4) == 1
+-
+-
+ class bash_exit_before_child(libkcov.TestCase):
+ def runTest(self):
+ # kcovKcov shouldn't wait for the background process, so call it with kcovKcov = False
+--
+2.44.2
+
diff --git a/dev-util/kcov/kcov-43.ebuild b/dev-util/kcov/kcov-43.ebuild
index 2c1f929f9a7a..32f6b0358b92 100644
--- a/dev-util/kcov/kcov-43.ebuild
+++ b/dev-util/kcov/kcov-43.ebuild
@@ -39,6 +39,10 @@ DEPEND="
BDEPEND="test? ( ${PYTHON_DEPS} )"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}/${PN}-remove-failing-test-conflicting-with-sandbox.patch"
+)
+
DOCS=(
doc/
CONTRIBUTING.md
@@ -51,24 +55,26 @@ pkg_setup() {
}
src_prepare() {
- cmake_src_prepare
-
if use test; then
sed -Ei "/skip_python2/ s/= .+/= True/" tests/tools/test_python.py \
- || die
+ || die "Cannot disable Python 2 tests"
- echo "add_subdirectory (tests)" >> CMakeLists.txt || die
+ cat <<- EOF >> CMakeLists.txt || die "Cannot enable test building"
+ add_compile_options (-g)
+ add_subdirectory (tests)
+ EOF
fi
+
+ cmake_src_prepare
}
src_configure() {
local mycmakeargs=( -DKCOV_INSTALL_DOCDIR:PATH="share/doc/${PF}" )
-
cmake_src_configure
}
src_test() {
- PYTHONPATH="${S}/tests/tools" edo python3 -m libkcov \
+ PYTHONPATH="${S}/tests/tools" edo "${PYTHON}" -m libkcov \
-v \
"${BUILD_DIR}/src/kcov" \
"${T}" \
diff --git a/dev-util/kcov/kcov-9999.ebuild b/dev-util/kcov/kcov-9999.ebuild
index 2c1f929f9a7a..32f6b0358b92 100644
--- a/dev-util/kcov/kcov-9999.ebuild
+++ b/dev-util/kcov/kcov-9999.ebuild
@@ -39,6 +39,10 @@ DEPEND="
BDEPEND="test? ( ${PYTHON_DEPS} )"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}/${PN}-remove-failing-test-conflicting-with-sandbox.patch"
+)
+
DOCS=(
doc/
CONTRIBUTING.md
@@ -51,24 +55,26 @@ pkg_setup() {
}
src_prepare() {
- cmake_src_prepare
-
if use test; then
sed -Ei "/skip_python2/ s/= .+/= True/" tests/tools/test_python.py \
- || die
+ || die "Cannot disable Python 2 tests"
- echo "add_subdirectory (tests)" >> CMakeLists.txt || die
+ cat <<- EOF >> CMakeLists.txt || die "Cannot enable test building"
+ add_compile_options (-g)
+ add_subdirectory (tests)
+ EOF
fi
+
+ cmake_src_prepare
}
src_configure() {
local mycmakeargs=( -DKCOV_INSTALL_DOCDIR:PATH="share/doc/${PF}" )
-
cmake_src_configure
}
src_test() {
- PYTHONPATH="${S}/tests/tools" edo python3 -m libkcov \
+ PYTHONPATH="${S}/tests/tools" edo "${PYTHON}" -m libkcov \
-v \
"${BUILD_DIR}/src/kcov" \
"${T}" \