diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-05 21:22:08 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-05 21:22:44 +0200 |
commit | 2a81ab517abab7db26b1959c41a203a9ef7c587f (patch) | |
tree | d002f98049105b888a7df84622d439f4c196baf1 /dev-db/mysql | |
parent | dev-db/mysql-connector-c: Stabilize 8.0.21 arm64, #736066 (diff) | |
download | gentoo-2a81ab517abab7db26b1959c41a203a9ef7c587f.tar.gz gentoo-2a81ab517abab7db26b1959c41a203a9ef7c587f.tar.bz2 gentoo-2a81ab517abab7db26b1959c41a203a9ef7c587f.zip |
dev-db/mysql: limit MTR_PARALLEL to 4 instead of "auto"
Partial backport of commit 684ed130d446891ecd16927e0c2703283af52919.
Limit MTR_PARALLEL to 4 instead of "auto" to avoid test failures
because other settings like ulimit, fs.aio-max-nr must allow running
so many servers in parallel. User can still override.
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-db/mysql')
-rw-r--r-- | dev-db/mysql/mysql-5.7.31.ebuild | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild index 6396f7ded4cf..c7f2127c3a5c 100644 --- a/dev-db/mysql/mysql-5.7.31.ebuild +++ b/dev-db/mysql/mysql-5.7.31.ebuild @@ -6,7 +6,7 @@ EAPI="7" CMAKE_MAKEFILE_GENERATOR=emake inherit check-reqs cmake flag-o-matic linux-info \ - prefix toolchain-funcs multilib-minimal + multiprocessing prefix toolchain-funcs multilib-minimal # Patch version PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.31-patches-01.tar.xz" @@ -467,10 +467,25 @@ src_test() { # Ensure that parallel runs don't die export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - # Enable parallel testing, auto will try to detect number of cores - # You may set this by hand. - # The default maximum is 8 unless MTR_MAX_PARALLEL is increased - export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + if [[ -z "${MTR_PARALLEL}" ]] ; then + local -x MTR_PARALLEL=$(makeopts_jobs) + + if [[ ${MTR_PARALLEL} -gt 4 ]] ; then + # Running multiple tests in parallel usually require higher ulimit + # and fs.aio-max-nr setting. In addition, tests like main.multi_update + # are known to hit timeout when system is busy. + # To avoid test failure we will limit MTR_PARALLEL to 4 instead of + # using "auto". + local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})" + info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!" + einfo "${info_msg}" + unset info_msg + MTR_PARALLEL=4 + fi + else + einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'" + fi # create directories because mysqladmin might run out of order mkdir -p "${T}"/var-tests{,/log} || die |