commit:     f6b9b40e3c3a58e89a1866d335334d7b210ae3fd
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Thu Jun  9 14:37:39 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 20:36:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6b9b40e

dev-db/redis: limit a number of test clients to MAKEOPTS jobs

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 <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/redis/redis-6.0.16.ebuild   | 12 ++++++++----
 dev-db/redis/redis-6.2.6.ebuild    | 12 ++++++++----
 dev-db/redis/redis-6.2.7-r1.ebuild | 12 ++++++++----
 dev-db/redis/redis-7.0.0-r1.ebuild | 12 ++++++++----
 dev-db/redis/redis-7.0.0.ebuild    | 12 ++++++++----
 dev-db/redis/redis-7.0.1.ebuild    | 12 ++++++++----
 6 files changed, 48 insertions(+), 24 deletions(-)

diff --git a/dev-db/redis/redis-6.0.16.ebuild b/dev-db/redis/redis-6.0.16.ebuild
index 604f29310e71..b9de6505f930 100644
--- a/dev-db/redis/redis-6.0.16.ebuild
+++ b/dev-db/redis/redis-6.0.16.ebuild
@@ -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";
@@ -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." \
@@ -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() {

diff --git a/dev-db/redis/redis-6.2.6.ebuild b/dev-db/redis/redis-6.2.6.ebuild
index ce2bdf9b53e8..791f7c13ecd0 100644
--- a/dev-db/redis/redis-6.2.6.ebuild
+++ b/dev-db/redis/redis-6.2.6.ebuild
@@ -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";
@@ -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." \
@@ -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() {

diff --git a/dev-db/redis/redis-6.2.7-r1.ebuild 
b/dev-db/redis/redis-6.2.7-r1.ebuild
index 2224d18e297e..72974ef2f1e5 100644
--- a/dev-db/redis/redis-6.2.7-r1.ebuild
+++ b/dev-db/redis/redis-6.2.7-r1.ebuild
@@ -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";
@@ -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." \
@@ -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() {

diff --git a/dev-db/redis/redis-7.0.0-r1.ebuild 
b/dev-db/redis/redis-7.0.0-r1.ebuild
index fb8cafa36878..91b3903a4d1e 100644
--- a/dev-db/redis/redis-7.0.0-r1.ebuild
+++ b/dev-db/redis/redis-7.0.0-r1.ebuild
@@ -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";
@@ -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." \
@@ -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() {

diff --git a/dev-db/redis/redis-7.0.0.ebuild b/dev-db/redis/redis-7.0.0.ebuild
index fb66c24c8f6d..56de21e9f860 100644
--- a/dev-db/redis/redis-7.0.0.ebuild
+++ b/dev-db/redis/redis-7.0.0.ebuild
@@ -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";
@@ -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." \
@@ -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() {

diff --git a/dev-db/redis/redis-7.0.1.ebuild b/dev-db/redis/redis-7.0.1.ebuild
index fb8cafa36878..91b3903a4d1e 100644
--- a/dev-db/redis/redis-7.0.1.ebuild
+++ b/dev-db/redis/redis-7.0.1.ebuild
@@ -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";
@@ -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." \
@@ -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() {

Reply via email to