Skip to content

Commit

Permalink
dev-db/redis: limit a number of test clients to MAKEOPTS jobs
Browse files Browse the repository at this point in the history
This change makes tests to respect user MAKEOPTS jobs preference rather
than running 16 test clients by default.

Closes: https://bugs.gentoo.org/649868
Signed-off-by: Petr Vaněk <[email protected]>
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
arkamar authored and thesamesam committed Jun 12, 2022
1 parent 6037dd3 commit f6b9b40
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 24 deletions.
12 changes: 8 additions & 4 deletions dev-db/redis/redis-6.0.16.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ EAPI=7
# because lua_open became lua_newstate in 5.2
LUA_COMPAT=( lua5-1 luajit )

inherit autotools edo flag-o-matic lua-single systemd tmpfiles toolchain-funcs
inherit autotools edo flag-o-matic lua-single multiprocessing systemd tmpfiles toolchain-funcs

DESCRIPTION="A persistent caching system, key-value and data structures database"
HOMEPAGE="https://redis.io"
Expand Down Expand Up @@ -133,6 +133,10 @@ src_compile() {
}

src_test() {
local runtestargs=(
--clients "$(makeopts_jobs)" # see bug #649868
)

# Known to fail with FEATURES=usersandbox
if has usersandbox ${FEATURES}; then
ewarn "You are emerging ${P} with 'usersandbox' enabled." \
Expand All @@ -141,10 +145,10 @@ src_test() {

if use ssl; then
edo ./utils/gen-test-certs.sh
edo ./runtest --tls
else
edo ./runtest
runtestargs+=( --tls )
fi

edo ./runtest "${runtestargs[@]}"
}

src_install() {
Expand Down
12 changes: 8 additions & 4 deletions dev-db/redis/redis-6.2.6.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ EAPI=7
# because lua_open became lua_newstate in 5.2
LUA_COMPAT=( lua5-1 luajit )

inherit autotools edo flag-o-matic lua-single systemd tmpfiles toolchain-funcs
inherit autotools edo flag-o-matic lua-single multiprocessing systemd tmpfiles toolchain-funcs

DESCRIPTION="A persistent caching system, key-value and data structures database"
HOMEPAGE="https://redis.io"
Expand Down Expand Up @@ -133,6 +133,10 @@ src_compile() {
}

src_test() {
local runtestargs=(
--clients "$(makeopts_jobs)" # see bug #649868
)

# Known to fail with FEATURES=usersandbox
if has usersandbox ${FEATURES}; then
ewarn "You are emerging ${P} with 'usersandbox' enabled." \
Expand All @@ -141,10 +145,10 @@ src_test() {

if use ssl; then
edo ./utils/gen-test-certs.sh
edo ./runtest --tls
else
edo ./runtest
runtestargs+=( --tls )
fi

edo ./runtest "${runtestargs[@]}"
}

src_install() {
Expand Down
12 changes: 8 additions & 4 deletions dev-db/redis/redis-6.2.7-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LUA_COMPAT=( lua5-1 luajit )
# Upstream have deviated too far from vanilla Lua, adding their own APIs
# like lua_enablereadonlytable, but we still need the eclass and such
# for bug #841422.
inherit autotools edo flag-o-matic lua-single systemd tmpfiles toolchain-funcs
inherit autotools edo flag-o-matic lua-single multiprocessing systemd tmpfiles toolchain-funcs

DESCRIPTION="A persistent caching system, key-value, and data structures database"
HOMEPAGE="https://redis.io"
Expand Down Expand Up @@ -135,6 +135,10 @@ src_compile() {
}

src_test() {
local runtestargs=(
--clients "$(makeopts_jobs)" # see bug #649868
)

# Known to fail with FEATURES=usersandbox
if has usersandbox ${FEATURES}; then
ewarn "You are emerging ${P} with 'usersandbox' enabled." \
Expand All @@ -143,10 +147,10 @@ src_test() {

if use ssl; then
edo ./utils/gen-test-certs.sh
edo ./runtest --tls
else
edo ./runtest
runtestargs+=( --tls )
fi

edo ./runtest "${runtestargs[@]}"
}

src_install() {
Expand Down
12 changes: 8 additions & 4 deletions dev-db/redis/redis-7.0.0-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ EAPI=8
# N.B.: It is no clue in porting to Lua eclasses, as upstream have deviated
# too far from vanilla Lua, adding their own APIs like lua_enablereadonlytable

inherit autotools edo flag-o-matic systemd tmpfiles toolchain-funcs
inherit autotools edo flag-o-matic multiprocessing systemd tmpfiles toolchain-funcs

DESCRIPTION="A persistent caching system, key-value, and data structures database"
HOMEPAGE="https://redis.io"
Expand Down Expand Up @@ -116,6 +116,10 @@ src_compile() {
}

src_test() {
local runtestargs=(
--clients "$(makeopts_jobs)" # see bug #649868
)

# Known to fail with FEATURES=usersandbox
if has usersandbox ${FEATURES}; then
ewarn "You are emerging ${P} with 'usersandbox' enabled." \
Expand All @@ -124,10 +128,10 @@ src_test() {

if use ssl; then
edo ./utils/gen-test-certs.sh
edo ./runtest --tls
else
edo ./runtest
runtestargs+=( --tls )
fi

edo ./runtest "${runtestargs[@]}"
}

src_install() {
Expand Down
12 changes: 8 additions & 4 deletions dev-db/redis/redis-7.0.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LUA_COMPAT=( lua5-1 luajit )
# Upstream have deviated too far from vanilla Lua, adding their own APIs
# like lua_enablereadonlytable, but we still need the eclass and such
# for bug #841422.
inherit autotools edo flag-o-matic lua-single systemd tmpfiles toolchain-funcs
inherit autotools edo flag-o-matic lua-single multiprocessing systemd tmpfiles toolchain-funcs

DESCRIPTION="A persistent caching system, key-value, and data structures database"
HOMEPAGE="https://redis.io"
Expand Down Expand Up @@ -135,6 +135,10 @@ src_compile() {
}

src_test() {
local runtestargs=(
--clients "$(makeopts_jobs)" # see bug #649868
)

# Known to fail with FEATURES=usersandbox
if has usersandbox ${FEATURES}; then
ewarn "You are emerging ${P} with 'usersandbox' enabled." \
Expand All @@ -143,10 +147,10 @@ src_test() {

if use ssl; then
edo ./utils/gen-test-certs.sh
edo ./runtest --tls
else
edo ./runtest
runtestargs+=( --tls )
fi

edo ./runtest "${runtestargs[@]}"
}

src_install() {
Expand Down
12 changes: 8 additions & 4 deletions dev-db/redis/redis-7.0.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ EAPI=8
# N.B.: It is no clue in porting to Lua eclasses, as upstream have deviated
# too far from vanilla Lua, adding their own APIs like lua_enablereadonlytable

inherit autotools edo flag-o-matic systemd tmpfiles toolchain-funcs
inherit autotools edo flag-o-matic multiprocessing systemd tmpfiles toolchain-funcs

DESCRIPTION="A persistent caching system, key-value, and data structures database"
HOMEPAGE="https://redis.io"
Expand Down Expand Up @@ -116,6 +116,10 @@ src_compile() {
}

src_test() {
local runtestargs=(
--clients "$(makeopts_jobs)" # see bug #649868
)

# Known to fail with FEATURES=usersandbox
if has usersandbox ${FEATURES}; then
ewarn "You are emerging ${P} with 'usersandbox' enabled." \
Expand All @@ -124,10 +128,10 @@ src_test() {

if use ssl; then
edo ./utils/gen-test-certs.sh
edo ./runtest --tls
else
edo ./runtest
runtestargs+=( --tls )
fi

edo ./runtest "${runtestargs[@]}"
}

src_install() {
Expand Down

0 comments on commit f6b9b40

Please sign in to comment.