Skip to content

Commit fac6bcf

Browse files
committed
[GR-44572] Run MRI tests with asserts in jvm configuration
PullRequest: truffleruby/3675
2 parents 671182f + fd63bc0 commit fac6bcf

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

ci.jsonnet

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ local part_definitions = {
357357
},
358358

359359
test_mri: { run+: jt(["test", "mri", "--no-sulong"]) },
360+
test_mri_fast: { run+: jt(["test", "mri", "--fast", "--no-sulong"]) },
360361
test_integration: { run+: jt(["test", "integration"]) },
361362
test_gems: { run+: jt(["test", "gems"]) },
362363
test_compiler: { run+: jt(["test", "compiler"]) },
@@ -528,6 +529,7 @@ local composition_environment = utils.add_inclusion_tracking(part_definitions, "
528529
"ruby-test-specs-darwin-aarch64-20": $.platform.darwin_aarch64 + $.jdk.v20 + $.env.jvm + gate_no_build + $.use.build + $.run.test_unit_tck + native_config + $.run.test_specs + { timelimit: "01:40:00" },
529530
"ruby-test-fast-linux-aarch64": $.platform.linux_aarch64 + $.jdk.v17 + $.env.jvm + gate + $.run.test_fast + native_config + { timelimit: "45:00" },
530531
"ruby-test-fast-linux": $.platform.linux + $.jdk.v17 + $.env.jvm + gate + $.run.test_fast + { timelimit: "45:00" }, # To catch missing slow tags
532+
"ruby-test-mri-asserts": $.platform.linux + $.jdk.v17 + $.env.jvm + gate + $.run.test_mri_fast + { timelimit: "01:20:00" },
531533
"ruby-test-mri-linux": $.platform.linux + $.jdk.v17 + $.env.native + gate + $.run.test_mri + { timelimit: "01:20:00" },
532534
"ruby-test-mri-linux-aarch64": $.platform.linux_aarch64 + $.jdk.v17 + $.env.native + gate + $.run.test_mri + { timelimit: "01:20:00" },
533535
"ruby-test-mri-darwin-amd64": $.platform.darwin_amd64 + $.jdk.v17 + $.env.native + gate + $.run.test_mri + { timelimit: "01:30:00" },

test/mri/capi_tests.list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ cext-ruby/bug_reporter/test_bug_reporter.rb
1010
cext-ruby/class/test_class2name.rb
1111
cext-ruby/debug/test_debug.rb
1212
cext-ruby/debug/test_profile_frames.rb
13+
cext-ruby/econv/test_append.rb
1314
cext-ruby/exception/test_data_error.rb
1415
cext-ruby/exception/test_enc_raise.rb
1516
cext-ruby/exception/test_ensured.rb

test/mri/tests/mkmf/test_install.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
class TestMkmfInstall < TestMkmf
55
def test_install_dirs
6+
skip 'does not work with !ALLOW_SUBPROCESSES' unless Test::Unit::CoreAssertions::ALLOW_SUBPROCESSES
7+
68
Dir.mktmpdir do |dir|
79
File.write(dir+"/extconf.rb", "require 'mkmf'; create_makefile('test')")
810
all_assertions do |a|

tool/jt.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,10 +820,10 @@ def help
820820
MRI tests commands:
821821
jt test mri run MRI tests
822822
#{MRI_TEST_MODULES.map { |k, h| format ' ' * 4 + '%-16s%s', k, h[:help] }.join("\n")}
823-
jt test mri test/mri/tests/test_find.rb [-- <MRI runner options>]
823+
jt test mri [--fast] test/mri/tests/test_find.rb [-- <MRI runner options>]
824824
run tests in given file, -n option of the runner can be used to further
825825
limit executed test methods
826-
MRI_TEST_SUBPROCESSES=false skip MRI tests using subprocesses
826+
--fast skip MRI tests using subprocesses
827827
jt retag FILE Remove MRI excludes and re-add as necessary for MRI tests
828828
---
829829
jt test basictest run MRI's basictest suite
@@ -1279,6 +1279,10 @@ def test(*args)
12791279
'MKMF_SET_EXTMK_TO_TRUE' => 'true',
12801280
}
12811281

1282+
if extra_args.delete '--fast'
1283+
env_vars['MRI_TEST_SUBPROCESSES'] = 'false'
1284+
end
1285+
12821286
cext_tests = test_files.select do |f|
12831287
f.include?('cext-ruby') || MRI_TEST_CAPI_TESTS.include?(f)
12841288
end

0 commit comments

Comments
 (0)