Skip to content

Commit 8db3f37

Browse files
committed
Comment require '-test-/*' in non-C-API MRI tests
1 parent a3deca0 commit 8db3f37

File tree

9 files changed

+22
-10
lines changed

9 files changed

+22
-10
lines changed

doc/contributor/updating-ruby.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ git revert vNN
5353

5454
You'll usually get some conflicts to work out.
5555

56+
## Comment out `-test-` requires
57+
58+
Run
59+
60+
```bash
61+
git grep -E -- "^\\s+require '-test-/"
62+
git grep -E -- '^\s+require "-test-/'
63+
```
64+
65+
And comment any `require` found in files under `test/mri/tests`
66+
but not for files under `test/mri/tests/cext-ruby`.
67+
5668
## Update config_*.h files
5769

5870
Configuration files must be regenerated from ruby for Linux and macOS

test/mri/tests/fiddle/test_handle.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_static_sym
2929

3030
begin
3131
# NetBSD
32-
require '-test-/dln/empty'
32+
# require '-test-/dln/empty'
3333
refute_nil Fiddle::Handle.sym('Init_empty')
3434
assert_equal Fiddle::Handle.sym('Init_empty'), Fiddle::Handle['Init_empty']
3535
return
@@ -136,7 +136,7 @@ def test_NEXT
136136
# interface, below, should be used, since getpid() is a function and not a
137137
# data object.)
138138
# --- FreeBSD 8.0 dlsym(3)
139-
require '-test-/dln/empty'
139+
# require '-test-/dln/empty'
140140
handle = Handle::NEXT
141141
refute_nil handle['Init_empty']
142142
return

test/mri/tests/lib/iseq_loader_checker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
begin
4-
require '-test-/iseq_load/iseq_load'
4+
# require '-test-/iseq_load/iseq_load'
55
rescue LoadError
66
end
77
require 'tempfile'

test/mri/tests/lib/memory_status.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22
begin
3-
require '-test-/memory_status.so'
3+
# require '-test-/memory_status.so'
44
rescue LoadError
55
end
66

test/mri/tests/ruby/test_bignum.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: false
22
require 'test/unit'
33
begin
4-
require '-test-/integer'
4+
# require '-test-/integer'
55
rescue LoadError
66
else
77

test/mri/tests/ruby/test_io.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@ def test_pos_with_getc
19101910

19111911
def can_seek_data(f)
19121912
if /linux/ =~ RUBY_PLATFORM
1913-
require "-test-/file"
1913+
# require "-test-/file"
19141914
# lseek(2)
19151915
case Bug::File::Fs.fsname(f.path)
19161916
when "btrfs"

test/mri/tests/ruby/test_keyword.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: false
22
require 'test/unit'
3-
require '-test-/rb_call_super_kw'
4-
require '-test-/iter'
3+
# require '-test-/rb_call_super_kw'
4+
# require '-test-/iter'
55

66
class TestKeywordArguments < Test::Unit::TestCase
77
def f1(str: "foo", num: 424242)

test/mri/tests/ruby/test_regexp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ def test_invalid_free_at_parse_depth_limit_over
12511251
assert_separately([], "#{<<-"begin;"}\n#{<<-"end;"}")
12521252
begin;
12531253
begin
1254-
require '-test-/regexp'
1254+
# require '-test-/regexp'
12551255
rescue LoadError
12561256
else
12571257
bug = '[ruby-core:79624] [Bug #13234]'

test/mri/tests/ruby/test_time_tz.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: false
22
require 'test/unit'
3-
require '-test-/time'
3+
# require '-test-/time'
44

55
class TestTimeTZ < Test::Unit::TestCase
66
has_right_tz = true

0 commit comments

Comments
 (0)