commit: 58a7641982763e9317841f2631f556c75c727868
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 12 18:57:39 2023 +0000
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun Aug 13 05:22:43 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58a76419
eclass/ruby-fakegem.eclass: always avoid minitest plugins
Minitest will by default scan for any plugin installed by any gem and
register it. This has been a source of test failures when a plugin can
no longer be initialized for some reason.
Many ebuilds already set the environment variable for this, but we never
want autoloading so turn this off in the eclass instead.
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
eclass/ruby-fakegem.eclass | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index db3db300c023..40ff76ce900e 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -585,9 +585,12 @@ each_fakegem_test() {
# @DESCRIPTION:
# Run the tests for this package.
if [[ ${RUBY_FAKEGEM_RECIPE_TEST} != none ]]; then
- each_ruby_test() {
- each_fakegem_test
- }
+ # Avoid autoloading all minitest plugins present in any gem.
+ export MT_NO_PLUGINS=true
+
+ each_ruby_test() {
+ each_fakegem_test
+ }
fi
# @FUNCTION: ruby_fakegem_extensions_installed