[dev-libs/mongo-c-driver] add a test-full useflag to mask on non-mongodb arches
This commit is contained in:
parent
45aadb32ea
commit
9cf87dd318
@ -5,6 +5,12 @@
|
||||
<email>ultrabug@gentoo.org</email>
|
||||
<name>Alexys Jacob</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="test-full">
|
||||
Run test suite in full, including tests that run a local
|
||||
database instance.
|
||||
</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">mongodb/mongo-c-driver</remote-id>
|
||||
</upstream>
|
||||
|
@ -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")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user