From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mariadb-connector-c/
Date: Sun, 25 Sep 2022 01:27:53 +0000 (UTC) [thread overview]
Message-ID: <1664069237.c3b7a85534d328b640cad626286d0e1e6a883467.sam@gentoo> (raw)
commit: c3b7a85534d328b640cad626286d0e1e6a883467
Author: matoro <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Thu Sep 22 19:35:13 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 25 01:27:17 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3b7a855
dev-db/mariadb-connector-c: enable tests
Bug: https://bugs.gentoo.org/729944
Closes: https://github.com/gentoo/gentoo/pull/27398
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../mariadb-connector-c-3.2.5.ebuild | 24 ++++++++++++++++++++++
.../mariadb-connector-c-9999.ebuild | 24 ++++++++++++++++++++++
2 files changed, 48 insertions(+)
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-3.2.5.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-3.2.5.ebuild
index f5de26435990..17e775c57359 100644
--- a/dev-db/mariadb-connector-c/mariadb-connector-c-3.2.5.ebuild
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-3.2.5.ebuild
@@ -43,12 +43,28 @@ DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
)
)
"
+BDEPEND="test? ( dev-db/mariadb[server] )"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/gentoo-layout-3.0.patch
"${FILESDIR}"/${PN}-3.1.3-fix-pkconfig-file.patch
)
+src_prepare() {
+ # These tests the remote_io plugin which requires network access
+ sed -i 's/{"test_remote1", test_remote1, TEST_CONNECTION_NEW, 0, NULL, NULL},//g' "unittest/libmariadb/misc.c" || die
+
+ # These tests don't work with --skip-grant-tables
+ sed -i 's/{"test_conc366", test_conc366, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},//g' "unittest/libmariadb/connection.c" || die
+ sed -i 's/{"test_conc66", test_conc66, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},//g' "unittest/libmariadb/connection.c" || die
+
+ # [Warning] Aborted connection 2078 to db: 'test' user: 'root' host: '' (Got an error reading communication packets)
+ # Not sure about this one - might also require network access
+ sed -i 's/{"test_default_auth", test_default_auth, TEST_CONNECTION_NONE, 0, NULL, NULL},//g' "unittest/libmariadb/connection.c" || die
+
+ cmake_src_prepare
+}
+
multilib_src_configure() {
# bug 508724 mariadb cannot use ld.gold
tc-ld-disable-gold
@@ -70,6 +86,14 @@ multilib_src_configure() {
cmake_src_configure
}
+multilib_src_test() {
+ mkdir -vp "${T}/mysql/data" || die
+ mysql_install_db --no-defaults --datadir="${T}/mysql/data" || die
+ mysqld --no-defaults --datadir="${T}/mysql/data" --socket="${T}/mysql/mysql.sock" --skip-grant-tables --skip-networking &
+ while ! mysqladmin ping --socket="${T}/mysql/mysql.sock" --silent ; do sleep 1 ; done
+ cd unittest/libmariadb && MYSQL_TEST_SOCKET="${T}/mysql/mysql.sock" MARIADB_CC_TEST=1 ctest --verbose || die
+}
+
multilib_src_install_all() {
if ! use static-libs ; then
find "${ED}" -name "*.a" -delete || die
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
index f31b6bb77e17..9799342c7442 100644
--- a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
@@ -43,12 +43,28 @@ DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
)
)
"
+BDEPEND="test? ( dev-db/mariadb[server] )"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/gentoo-layout-3.0.patch
"${FILESDIR}"/${PN}-3.1.3-fix-pkconfig-file.patch
)
+src_prepare() {
+ # These tests the remote_io plugin which requires network access
+ sed -i 's/{"test_remote1", test_remote1, TEST_CONNECTION_NEW, 0, NULL, NULL},//g' "unittest/libmariadb/misc.c" || die
+
+ # These tests don't work with --skip-grant-tables
+ sed -i 's/{"test_conc366", test_conc366, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},//g' "unittest/libmariadb/connection.c" || die
+ sed -i 's/{"test_conc66", test_conc66, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},//g' "unittest/libmariadb/connection.c" || die
+
+ # [Warning] Aborted connection 2078 to db: 'test' user: 'root' host: '' (Got an error reading communication packets)
+ # Not sure about this one - might also require network access
+ sed -i 's/{"test_default_auth", test_default_auth, TEST_CONNECTION_NONE, 0, NULL, NULL},//g' "unittest/libmariadb/connection.c" || die
+
+ cmake_src_prepare
+}
+
multilib_src_configure() {
# bug 508724 mariadb cannot use ld.gold
tc-ld-disable-gold
@@ -70,6 +86,14 @@ multilib_src_configure() {
cmake_src_configure
}
+multilib_src_test() {
+ mkdir -vp "${T}/mysql/data" || die
+ mysql_install_db --no-defaults --datadir="${T}/mysql/data" || die
+ mysqld --no-defaults --datadir="${T}/mysql/data" --socket="${T}/mysql/mysql.sock" --skip-grant-tables --skip-networking &
+ while ! mysqladmin ping --socket="${T}/mysql/mysql.sock" --silent ; do sleep 1 ; done
+ cd unittest/libmariadb && MYSQL_TEST_SOCKET="${T}/mysql/mysql.sock" MARIADB_CC_TEST=1 ctest --verbose || die
+}
+
multilib_src_install_all() {
if ! use static-libs ; then
find "${ED}" -name "*.a" -delete || die
next reply other threads:[~2022-09-25 1:27 UTC|newest]
Thread overview: 117+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-25 1:27 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-10 4:52 [gentoo-commits] repo/gentoo:master commit in: dev-db/mariadb-connector-c/ Sam James
2025-01-09 7:57 Sam James
2025-01-09 3:26 Sam James
2025-01-09 3:21 Sam James
2025-01-09 3:14 Sam James
2025-01-09 3:07 Sam James
2025-01-09 3:07 Sam James
2025-01-09 3:07 Sam James
2025-01-09 3:07 Sam James
2025-01-09 3:07 Sam James
2024-12-13 15:03 Sam James
2024-03-04 4:57 Sam James
2024-03-04 4:53 Sam James
2023-03-08 4:52 Sam James
2023-01-18 22:52 Sam James
2023-01-18 21:54 Sam James
2023-01-18 21:54 Sam James
2023-01-18 21:54 Sam James
2023-01-18 21:54 Sam James
2022-10-31 2:20 Sam James
2022-10-31 2:20 Sam James
2022-10-08 16:54 Sam James
2022-08-29 18:46 Agostino Sarubbo
2022-08-29 18:45 Agostino Sarubbo
2022-08-28 18:03 Arthur Zamarin
2022-08-28 16:32 Arthur Zamarin
2022-08-28 16:32 Arthur Zamarin
2022-08-28 16:32 Arthur Zamarin
2022-08-12 12:26 WANG Xuerui
2022-08-12 12:26 WANG Xuerui
2022-03-10 14:00 David Seifert
2021-11-16 18:30 Thomas Deutschmann
2021-11-15 1:12 Sam James
2021-10-15 14:33 Thomas Deutschmann
2021-09-07 2:43 Sam James
2021-07-14 6:22 Agostino Sarubbo
2021-07-14 6:21 Agostino Sarubbo
2021-07-14 6:20 Agostino Sarubbo
2021-07-14 6:20 Agostino Sarubbo
2021-07-13 21:04 Thomas Deutschmann
2021-07-05 16:53 Marek Szuba
2021-05-14 17:32 Thomas Deutschmann
2021-05-14 17:32 Thomas Deutschmann
2021-05-03 8:07 Mikle Kolyada
2021-03-08 0:29 Thomas Deutschmann
2021-03-02 17:15 Thomas Deutschmann
2021-02-24 14:40 Thomas Deutschmann
2020-11-27 17:53 Thomas Deutschmann
2020-11-27 16:04 Agostino Sarubbo
2020-11-27 8:42 Agostino Sarubbo
2020-11-27 7:55 Agostino Sarubbo
2020-11-26 8:32 Sam James
2020-11-26 8:14 Sam James
2020-11-25 22:38 Sergei Trofimovich
2020-11-25 12:14 Agostino Sarubbo
2020-11-25 11:51 Thomas Deutschmann
2020-11-09 15:31 Thomas Deutschmann
2020-09-21 12:08 Thomas Deutschmann
2020-09-21 11:59 Thomas Deutschmann
2020-07-26 2:05 Thomas Deutschmann
2020-06-29 19:54 Sergei Trofimovich
2020-06-28 20:56 Thomas Deutschmann
2020-06-28 20:40 Agostino Sarubbo
2020-06-28 20:37 Agostino Sarubbo
2020-06-28 20:30 Agostino Sarubbo
2020-06-28 20:27 Agostino Sarubbo
2020-06-28 7:49 Sergei Trofimovich
2020-06-27 20:41 Mart Raudsepp
2020-06-25 21:43 Thomas Deutschmann
2020-05-25 11:48 Thomas Deutschmann
2020-04-01 21:25 Thomas Deutschmann
2020-04-01 21:12 Mart Raudsepp
2020-02-22 14:19 Sergei Trofimovich
2020-02-17 12:25 Agostino Sarubbo
2020-02-17 12:17 Agostino Sarubbo
2020-02-17 11:53 Agostino Sarubbo
2020-02-17 11:45 Agostino Sarubbo
2020-02-16 21:14 Thomas Deutschmann
2020-02-15 19:30 Sergei Trofimovich
2020-02-15 12:16 Mikle Kolyada
2020-02-14 15:30 Thomas Deutschmann
2019-12-26 10:23 Thomas Deutschmann
2019-12-26 10:23 Thomas Deutschmann
2019-11-17 21:54 Thomas Deutschmann
2019-11-17 21:54 Thomas Deutschmann
2019-11-17 20:32 Thomas Deutschmann
2019-10-05 0:37 Thomas Deutschmann
2019-07-30 22:10 Thomas Deutschmann
2019-07-30 21:39 Aaron Bauman
2019-07-08 16:29 Brian Evans
2019-03-15 19:09 Brian Evans
2019-02-28 3:09 Thomas Deutschmann
2018-12-26 20:06 Sergei Trofimovich
2018-11-09 18:18 Mikle Kolyada
2018-10-21 8:29 Sergei Trofimovich
2018-10-20 15:27 Mikle Kolyada
2018-10-20 15:24 Mikle Kolyada
2018-10-20 11:46 Sergei Trofimovich
2018-10-20 11:35 Sergei Trofimovich
2018-10-17 18:38 Sergei Trofimovich
2018-10-17 17:14 Thomas Deutschmann
2018-10-17 12:07 Thomas Deutschmann
2018-10-15 15:58 Thomas Deutschmann
2018-08-27 16:41 Thomas Deutschmann
2018-08-27 16:41 Thomas Deutschmann
2018-07-11 10:48 Tony Vroon
2018-06-25 20:14 Brian Evans
2018-05-17 17:52 Brian Evans
2018-05-15 17:41 Brian Evans
2018-04-14 11:25 Markus Meier
2018-03-08 20:01 Markus Meier
2018-03-04 11:13 Sergei Trofimovich
2018-03-03 17:56 Sergei Trofimovich
2018-03-02 12:17 Jeroen Roovers
2018-03-02 8:07 Sergei Trofimovich
2018-03-02 2:10 Brian Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1664069237.c3b7a85534d328b640cad626286d0e1e6a883467.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox