Skip to content

Commit 33a2493

Browse files
Fix benchmarks_test
1 parent 2fc5550 commit 33a2493

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/benchmarks_test.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
require 'yaml'
33

44
describe 'benchmarks.yml' do
5-
it 'lists standard Ruby/JIT benchmarks, excluding custom Ractor benchmarks' do
5+
it 'lists all available benchmarks' do
66
yjit_bench = File.expand_path('..', __dir__)
77
benchmarks_yml = YAML.load_file("#{yjit_bench}/benchmarks.yml")
8+
89
benchmarks = Dir.glob("#{yjit_bench}/benchmarks/*").map do |entry|
9-
File.basename(entry).delete_suffix('.rb') unless File.basename(entry) == "ractor"
10+
File.basename(entry).delete_suffix('.rb')
11+
end.compact
12+
13+
benchmarks += Dir.glob("#{yjit_bench}/benchmarks-ractor/*").map do |entry|
14+
File.basename(entry).delete_suffix('.rb')
1015
end.compact
11-
assert_equal benchmarks.sort, benchmarks_yml.keys.sort
16+
17+
assert_equal benchmarks.sort, benchmarks_yml.keys.map{ |k| k.gsub('ractor/', '') }.sort
1218
end
1319
end

0 commit comments

Comments
 (0)