Skip to content

Commit 154e38f

Browse files
committed
Keep a list of :next spec files in a file instead of keeping in spec/truffleruby.mspec
1 parent 8df927d commit 154e38f

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

doc/contributor/workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ PRETEND_RUBY_VERSION=3.2.0 jt test spec/ruby/.../some_spec.rb
306306
This also works for `jt tag`/`jt untag`.
307307

308308
When working on a feature from the next version of Ruby, add the spec file in
309-
the corresponding file list (`:next`) in `spec/truffleruby.mspec` so that the
310-
specs are run in CI too.
309+
the corresponding files list in `spec/truffleruby.next-specs` so that the specs
310+
are run in CI too.
311311

312312
## How to fix a failing MRI test
313313

spec/truffleruby.mspec

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ class MSpecScript
101101
"spec/truffle/capi"
102102
]
103103

104-
# Use spec/ruby/core/nil/nil_spec.rb as a dummy file to avoid being empty
105-
set :next, %w[
106-
spec/ruby/core/nil/nil_spec.rb
107-
spec/ruby/core/hash/shift_spec.rb
108-
]
104+
# Use spec/truffleruby.next-specs to specify spec files to run for the next version.
105+
# Allow comments and empty lines.
106+
next_spec_files = File.readlines("spec/truffleruby.next-specs")
107+
.map(&:strip)
108+
.reject { |path| path.start_with?("#") || path.empty? }
109+
110+
set :next, next_spec_files
109111

110112
set :tags_patterns, [
111113
[%r(^(.*)/spec/ruby/(\w+)/(.+)_spec\.rb$), '\1/spec/tags/\2/\3_tags.txt'],

spec/truffleruby.next-specs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file contains a list of spec files that contain specs for already
2+
# implemented features of the next CRuby release.
3+
#
4+
# These specs should be run as a separate step with `jt test :next` command
5+
# until TruffleRuby supports this next CRuby version.
6+
#
7+
# Empty lines and comments are allowed.
8+
9+
# Use spec/ruby/core/nil/nil_spec.rb as a dummy file to avoid being empty (what causes mspec to error)
10+
spec/ruby/core/nil/nil_spec.rb
11+
12+
spec/ruby/core/hash/shift_spec.rb

0 commit comments

Comments
 (0)