From ffb9045d6ca65c2e4f5adb3f36f3ce8bcb298a6c Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Sat, 18 Jul 2026 01:59:19 +0300 Subject: [PATCH] dev-ruby/libusb: avoid tests that touch real usb devices * Hangs intermittently especially if you have multiple ruby targets enabled. * This follows how upstream handles it in their CI. Signed-off-by: Alfred Wingate Part-of: https://codeberg.org/gentoo/gentoo/pulls/1457 Signed-off-by: Sam James --- dev-ruby/libusb/libusb-0.7.2.ebuild | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev-ruby/libusb/libusb-0.7.2.ebuild b/dev-ruby/libusb/libusb-0.7.2.ebuild index f14719a8f8ba7..2c8b84ef538b2 100644 --- a/dev-ruby/libusb/libusb-0.7.2.ebuild +++ b/dev-ruby/libusb/libusb-0.7.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Gentoo Authors +# Copyright 2022-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -28,13 +28,13 @@ all_ruby_prepare() { -e 's/git ls-files --/find/' \ -e 's/git ls-files/find */' \ -i ${RUBY_FAKEGEM_GEMSPEC} || die - - # Avoid tests that try to open devices or depend on specific hardware - rm -f test/test_libusb_{bos,bulk_stream_transfer,descriptors}.rb || die } each_ruby_test() { - ${RUBY} -I.:lib -e "Dir['test/test_*.rb'].each{|f| require f}" || die + # https://github.com/larskanis/libusb/tree/master#testing-libusb-gem + # See ci task in the rakefile + ${RUBY} -I.:lib -e "Dir['test/test_libusb(_structs)?.rb'].each{|f| require f}" -- --verbose || die + } each_ruby_install() {