diff --git a/dev-libs/mongo-c-driver/metadata.xml b/dev-libs/mongo-c-driver/metadata.xml
index 6969885..ff90df0 100644
--- a/dev-libs/mongo-c-driver/metadata.xml
+++ b/dev-libs/mongo-c-driver/metadata.xml
@@ -5,6 +5,12 @@
ultrabug@gentoo.org
Alexys Jacob
+
mongodb/mongo-c-driver
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-1.27.2.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.27.2.ebuild
index f79a39c..28e76c9 100644
--- a/dev-libs/mongo-c-driver/mongo-c-driver-1.27.2.ebuild
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.27.2.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/mongodb/mongo-c-driver/archive/refs/tags/${PV}.tar.g
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~hppa ~riscv ~x86"
-IUSE="debug examples icu +s3 sasl +ssl static-libs test"
+IUSE="debug examples icu +s3 sasl +ssl static-libs test +test-full"
REQUIRED_USE="
s3? ( ssl )
test? ( static-libs )"
@@ -36,10 +36,12 @@ RDEPEND="
DEPEND="
${RDEPEND}
test? (
- dev-db/mongodb
dev-libs/libbson[static-libs]
>=dev-libs/libmongocrypt-1.10.0[static-libs]
>=dev-libs/libutf8proc-2.8.0:=[static-libs]
+ test-full? (
+ dev-db/mongodb
+ )
)
"
@@ -89,16 +91,21 @@ src_configure() {
# FEATURES="test -network-sandbox" USE="static-libs" emerge dev-libs/mongo-c-driver
src_test() {
- local PORT=27099
- LC_ALL=C \
- mongod --setParameter enableTestCommands=1 \
- --enableMajorityReadConcern --port ${PORT} \
- --bind_ip 127.0.0.1 --nounixsocket --fork --dbpath="${T}" \
- --logpath="${T}/mongod.log" || die
- MONGOC_TEST_URI="mongodb://[127.0.0.1]:${PORT}" \
- MONGOC_ENABLE_MAJORITY_READ_CONCERN=on \
- ../mongo-c-driver-${PV}_build/src/libmongoc/test-libmongoc \
- --skip-tests "${FILESDIR}/skip-tests.txt" || die
+ if ! use test-full; then
+ export MONGOC_TEST_SKIP_LIVE=on
+ else
+ local PORT=27099
+ export MONGOC_TEST_URI="mongodb://[127.0.0.1]:${PORT}"
+ export MONGOC_ENABLE_MAJORITY_READ_CONCERN=on
+ LC_ALL=C \
+ mongod --setParameter enableTestCommands=1 \
+ --enableMajorityReadConcern --port ${PORT} \
+ --bind_ip 127.0.0.1 --nounixsocket --fork \
+ --dbpath="${T}" --logpath="${T}/mongod.log" || die
+ fi
+
+ ../mongo-c-driver-${PV}_build/src/libmongoc/test-libmongoc \
+ --skip-tests "${FILESDIR}/skip-tests.txt" || die
kill $(<"${T}/mongod.lock")
}