commit: fa7707eec220899ef409de56d9e90a0df79ae238
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 14 09:25:18 2020 +0000
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Sat Nov 14 09:32:55 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa7707ee
app-admin/rex: -9999 strip db.t if it would break tests
Test::mysqld is still a work in progress to get working.
If you managed to DIY something that installs, but didn't do the magic
required for it to actually work, then db.t will break.
This tests for basic conditions and strips that file *only* if its
expected it will lead to a test failure.
If you've manually installed Test::mysqld and tweaked a PATH to include
"mysql_install_db", then this test should be retained and pass.
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org>
app-admin/rex/rex-9999.ebuild | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/app-admin/rex/rex-9999.ebuild b/app-admin/rex/rex-9999.ebuild
index f3a8a74be86..2d05b364666 100644
--- a/app-admin/rex/rex-9999.ebuild
+++ b/app-admin/rex/rex-9999.ebuild
@@ -81,7 +81,7 @@ RDEPEND="
dev-perl/YAML
virtual/perl-version
"
-
+# NB: would add test? !minimal? Test-mysqld, but I can't get that to work
BDEPEND="
${RDEPEND}
>=virtual/perl-CPAN-Meta-Requirements-2.120.620
@@ -196,6 +196,13 @@ src_prepare() {
dzil_to_distdir "${EGIT_CHECKOUT_DIR}" "${S}"
fi
cd "${S}" || die "Can't enter build dir"
+
+ # If you DIY installed Test::mysqld, but didn't patch
+ # it to handle the fact on Gentoo, mysql_install_db is NOT in PATH
+ # tests fail. So this test is patched out if mysql_install_db is not in
PATH
+ if perl_has_module "Test::mysqld" && ! type -P mysql_install_db
>/dev/null; then
+ perl_rm_files "t/db.t"
+ fi
perl-module_src_prepare
}