Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
Date: Wed, 05 Aug 2020 19:22:52
Message-Id: 1596655364.2a81ab517abab7db26b1959c41a203a9ef7c587f.whissi@gentoo
1 commit: 2a81ab517abab7db26b1959c41a203a9ef7c587f
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 5 19:22:08 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 5 19:22:44 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a81ab51
7
8 dev-db/mysql: limit MTR_PARALLEL to 4 instead of "auto"
9
10 Partial backport of commit 684ed130d446891ecd16927e0c2703283af52919.
11
12 Limit MTR_PARALLEL to 4 instead of "auto" to avoid test failures
13 because other settings like ulimit, fs.aio-max-nr must allow running
14 so many servers in parallel. User can still override.
15
16 Package-Manager: Portage-3.0.1, Repoman-2.3.23
17 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
18
19 dev-db/mysql/mysql-5.7.31.ebuild | 25 ++++++++++++++++++++-----
20 1 file changed, 20 insertions(+), 5 deletions(-)
21
22 diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
23 index 6396f7ded4c..c7f2127c3a5 100644
24 --- a/dev-db/mysql/mysql-5.7.31.ebuild
25 +++ b/dev-db/mysql/mysql-5.7.31.ebuild
26 @@ -6,7 +6,7 @@ EAPI="7"
27 CMAKE_MAKEFILE_GENERATOR=emake
28
29 inherit check-reqs cmake flag-o-matic linux-info \
30 - prefix toolchain-funcs multilib-minimal
31 + multiprocessing prefix toolchain-funcs multilib-minimal
32
33 # Patch version
34 PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.31-patches-01.tar.xz"
35 @@ -467,10 +467,25 @@ src_test() {
36
37 # Ensure that parallel runs don't die
38 export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
39 - # Enable parallel testing, auto will try to detect number of cores
40 - # You may set this by hand.
41 - # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
42 - export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
43 +
44 + if [[ -z "${MTR_PARALLEL}" ]] ; then
45 + local -x MTR_PARALLEL=$(makeopts_jobs)
46 +
47 + if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
48 + # Running multiple tests in parallel usually require higher ulimit
49 + # and fs.aio-max-nr setting. In addition, tests like main.multi_update
50 + # are known to hit timeout when system is busy.
51 + # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
52 + # using "auto".
53 + local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
54 + info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
55 + einfo "${info_msg}"
56 + unset info_msg
57 + MTR_PARALLEL=4
58 + fi
59 + else
60 + einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
61 + fi
62
63 # create directories because mysqladmin might run out of order
64 mkdir -p "${T}"/var-tests{,/log} || die