summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2024-05-29 16:38:44 +0200
committerFlorian Schmaus <flow@gentoo.org>2024-05-29 16:39:12 +0200
commit46965e05331d365c042343c20afc9d325d924fea (patch)
tree894cc393e669fa597a3acc0a9382d9ba74381180
parentdev-lang/php: disable failing test for >=glibc-2.39 (diff)
downloadgentoo-46965e05331d365c042343c20afc9d325d924fea.tar.gz
gentoo-46965e05331d365c042343c20afc9d325d924fea.tar.bz2
gentoo-46965e05331d365c042343c20afc9d325d924fea.zip
net-vpn/gsocket: enable tests
Signed-off-by: Florian Schmaus <flow@gentoo.org>
-rw-r--r--net-vpn/gsocket/gsocket-1.4.43.ebuild26
-rw-r--r--net-vpn/gsocket/gsocket-9999.ebuild26
2 files changed, 48 insertions, 4 deletions
diff --git a/net-vpn/gsocket/gsocket-1.4.43.ebuild b/net-vpn/gsocket/gsocket-1.4.43.ebuild
index f6f2c998560e..39e124344a92 100644
--- a/net-vpn/gsocket/gsocket-1.4.43.ebuild
+++ b/net-vpn/gsocket/gsocket-1.4.43.ebuild
@@ -19,8 +19,18 @@ fi
LICENSE="BSD-2"
SLOT="0"
-DEPEND="dev-libs/openssl:="
-RDEPEND="${DEPEND}"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="dev-libs/openssl:="
+DEPEND="
+ ${COMMON_DEPEND}
+ test? (
+ net-analyzer/netcat
+ net-misc/socat
+ )
+"
+RDEPEND="${COMMON_DEPEND}"
PATCHES=(
# https://github.com/hackerschoice/gsocket/pull/104
@@ -38,6 +48,18 @@ src_prepare() {
eautoreconf
}
+src_configure() {
+ econf $(use_enable test tests)
+}
+
+src_test() {
+ cd tests || die
+
+ ./run_ft_tests.sh || die
+ # Most of the "gs_tests" seem to fail (probably due the sandbox).
+ ./run_gs_tests.sh 4.1 || die
+}
+
src_install() {
default
diff --git a/net-vpn/gsocket/gsocket-9999.ebuild b/net-vpn/gsocket/gsocket-9999.ebuild
index f6f2c998560e..39e124344a92 100644
--- a/net-vpn/gsocket/gsocket-9999.ebuild
+++ b/net-vpn/gsocket/gsocket-9999.ebuild
@@ -19,8 +19,18 @@ fi
LICENSE="BSD-2"
SLOT="0"
-DEPEND="dev-libs/openssl:="
-RDEPEND="${DEPEND}"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="dev-libs/openssl:="
+DEPEND="
+ ${COMMON_DEPEND}
+ test? (
+ net-analyzer/netcat
+ net-misc/socat
+ )
+"
+RDEPEND="${COMMON_DEPEND}"
PATCHES=(
# https://github.com/hackerschoice/gsocket/pull/104
@@ -38,6 +48,18 @@ src_prepare() {
eautoreconf
}
+src_configure() {
+ econf $(use_enable test tests)
+}
+
+src_test() {
+ cd tests || die
+
+ ./run_ft_tests.sh || die
+ # Most of the "gs_tests" seem to fail (probably due the sandbox).
+ ./run_gs_tests.sh 4.1 || die
+}
+
src_install() {
default