mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 23:47:14 -08:00
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 <parona@protonmail.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1457 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user