1 |
|
# Copyright 1999-2024 Gentoo Authors
|
|
1 |
# Copyright 1999-2025 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
USE_RUBY="ruby31 ruby32 ruby33"
|
|
6 |
USE_RUBY="ruby31 ruby32 ruby33 ruby34"
|
7 |
7 |
|
8 |
8 |
RUBY_FAKEGEM_GEMSPEC="puma.gemspec"
|
9 |
9 |
|
... | ... | |
18 |
18 |
|
19 |
19 |
LICENSE="BSD"
|
20 |
20 |
SLOT="3"
|
21 |
|
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc x86"
|
|
21 |
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
22 |
22 |
|
23 |
|
DEPEND+=" dev-libs/openssl:0 test? ( net-misc/curl )"
|
24 |
|
RDEPEND+=" dev-libs/openssl:0="
|
|
23 |
DEPEND="dev-libs/openssl:0 test? ( net-misc/curl )"
|
|
24 |
RDEPEND="dev-libs/openssl:0="
|
25 |
25 |
|
26 |
26 |
ruby_add_bdepend "virtual/ruby-ssl
|
27 |
|
test? ( dev-ruby/localhost dev-ruby/rack:3.0 dev-ruby/rackup >=dev-ruby/minitest-5.9:5 >=dev-ruby/test-unit-3.0:2 )"
|
|
27 |
test? (
|
|
28 |
dev-ruby/concurrent-ruby
|
|
29 |
dev-ruby/localhost
|
|
30 |
|| ( dev-ruby/rack:3.1 dev-ruby/rack:3.0 )
|
|
31 |
dev-ruby/rackup
|
|
32 |
>=dev-ruby/minitest-5.9:5
|
|
33 |
>=dev-ruby/test-unit-3.0:2
|
|
34 |
)"
|
28 |
35 |
|
29 |
36 |
ruby_add_rdepend "dev-ruby/nio4r:2"
|
30 |
37 |
|
31 |
38 |
all_ruby_prepare() {
|
32 |
39 |
sed -e '/\(pride\|prove\|stub_const\)/ s:^:#:' \
|
33 |
40 |
-e '/require_relative.*verbose/ s:^:#:' \
|
34 |
|
-e '/securerandom/arequire "rack/handler"' \
|
35 |
41 |
-i test/helper.rb || die
|
36 |
42 |
|
37 |
43 |
# Avoid tests failing inconsistently
|
38 |
|
sed -i -e '/test_bad_client/askip "inconsistent results"' test/test_web_server.rb || die
|
|
44 |
#sed -i -e '/test_bad_client/askip "inconsistent results"' test/test_web_server.rb || die
|
39 |
45 |
|
40 |
46 |
# Avoid tests depending on specific encoding
|
41 |
|
sed -i -e '/test_lowlevel_error_handler_response/askip "specific encoding required"' test/test_puma_server.rb || die
|
|
47 |
#sed -i -e '/test_lowlevel_error_handler_response/askip "specific encoding required"' test/test_puma_server.rb || die
|
42 |
48 |
|
43 |
49 |
# Avoid launcher tests since they make assumptions about bundler use
|
44 |
50 |
rm -f test/test_launcher.rb test/test_worker_gem_independence.rb test/test_bundle_pruner.rb || die
|
|
51 |
sed -e '/test_web_concurrency_with_concurrent_ruby_unavailable/askip "Cannot provide environment for this"' \
|
|
52 |
-i test/test_web_concurrency_auto.rb || die
|
45 |
53 |
|
46 |
54 |
# Skip integration tests since they make a lot of assumptions about
|
47 |
55 |
# the environment
|
... | ... | |
55 |
63 |
|
56 |
64 |
# Avoid test that fails sometimes, possibly due to timing
|
57 |
65 |
# constraints or a race condition.
|
58 |
|
sed -e '/test_systemd_notify_usr1_phased_restart_cluster/askip "Flaky test"' \
|
59 |
|
-i test/test_plugin_systemd.rb || die
|
|
66 |
#sed -e '/test_systemd_notify_usr1_phased_restart_cluster/askip "Flaky test"' \
|
|
67 |
# -i test/test_plugin_systemd.rb || die
|
60 |
68 |
|
61 |
|
# Temporarily avoid tests that fail due to expired test
|
62 |
|
# certificates. This has been fixed upstream but not released yet.
|
63 |
|
sed -e '/test_server_ssl_with_cert_pem_and_key_pem/askip "Expired certificate"' \
|
64 |
|
-i test/test_puma_server_ssl.rb || die
|
65 |
|
sed -e '/test_certs_not_expired/askip "Expired certificate"' \
|
66 |
|
-i test/test_example_cert_expiration.rb || die
|
67 |
|
sed -e '/test_verify_fail_if_client_expired_cert/askip "Expired certificate"' \
|
68 |
|
-e '/test_verify_client_cert/askip "Expired certificate"' \
|
69 |
|
-i test/test_puma_server_ssl.rb || die
|
|
69 |
# Avoid a test that fails on systemd systems due to the pluging
|
|
70 |
# getting autoloaded there, bug #954180
|
|
71 |
sed -e '/test_plugins/askip "Fails on a systemd system"' \
|
|
72 |
-i test/test_cli.rb || die
|
70 |
73 |
|
71 |
74 |
# Tries to call 'rackup' directly
|
72 |
75 |
sed -i -e '/def test_bin/,/^ end/ s:^:#:' test/test_rack_handler.rb || die
|
... | ... | |
78 |
81 |
|
79 |
82 |
each_ruby_test() {
|
80 |
83 |
einfo "Running test suite"
|
|
84 |
|
81 |
85 |
MT_NO_PLUGINS=true ${RUBY} -Ilib:.:test \
|
82 |
86 |
-e "require 'minitest/autorun'; Dir['test/**/*test_*.rb'].each{require _1}" || die
|
83 |
87 |
}
|