Skip to content

Commit e76aefb

Browse files
committed
Add gate to check :cext specs pass under Sulong with the debug option
1 parent cb73607 commit e76aefb

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

ci.jsonnet

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,13 @@ local part_definitions = {
376376
jt(["test", "bundle"]),
377377
},
378378

379+
test_cexts_sulong: {
380+
environment+: {
381+
TRUFFLERUBYOPT: "--experimental-options --cexts-sulong",
382+
},
383+
run+: jt(["test", "specs", ":cext"]),
384+
},
385+
379386
testdownstream_aot: { run+: [["mx", "ruby_testdownstream_aot", "$RUBY_BIN"]] },
380387

381388
test_make_standalone_distribution: {
@@ -536,6 +543,7 @@ local composition_environment = utils.add_inclusion_tracking(part_definitions, "
536543
"ruby-test-cexts-linux-aarch64": $.platform.linux_aarch64 + $.jdk.stable + $.env.jvm + gate + $.use.gem_test_pack + $.use.sqlite331 + $.run.test_cexts,
537544
"ruby-test-cexts-darwin-amd64": $.platform.darwin_amd64 + $.jdk.stable + $.env.jvm + gate + $.use.gem_test_pack + $.run.test_cexts + { timelimit: "01:30:00" },
538545
"ruby-test-cexts-darwin-aarch64": $.platform.darwin_aarch64 + $.jdk.stable + $.env.jvm + gate + $.use.gem_test_pack + $.run.test_cexts + { timelimit: "00:40:00" },
546+
"ruby-test-cexts-sulong": $.platform.linux + $.jdk.stable + $.env.jvm + gate + $.run.test_cexts_sulong + { timelimit: "20:00" },
539547
"ruby-test-gems-linux-amd64": $.platform.linux + $.jdk.stable + $.env.jvm + gate + $.use.gem_test_pack + $.run.test_gems,
540548
"ruby-test-gems-darwin-amd64": $.platform.darwin_amd64 + $.jdk.stable + $.env.jvm + gate + $.use.gem_test_pack + $.run.test_gems,
541549
"ruby-test-gems-darwin-aarch64": $.platform.darwin_aarch64 + $.jdk.stable + $.env.jvm + gate + $.use.gem_test_pack + $.run.test_gems,

spec/truffle/capi/unimplemented_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
extension_path = load_extension("unimplemented")
1212

1313
describe "Unimplemented functions in the C-API" do
14-
it "abort the process and show an error including the function name" do
15-
expected_status = platform_is(:darwin) ? :SIGABRT : 127
16-
out = ruby_exe('require ARGV[0]; CApiRbTrErrorSpecs.new.not_implemented_function("foo")', args: "#{extension_path} 2>&1", exit_status: expected_status)
17-
out.should =~ /undefined symbol: rb_str_shared_replace|Symbol not found: _rb_str_shared_replace/
14+
guard_not -> { Truffle::Boot.get_option('cexts-sulong') } do
15+
it "abort the process and show an error including the function name" do
16+
expected_status = platform_is(:darwin) ? :SIGABRT : 127
17+
out = ruby_exe('require ARGV[0]; CApiRbTrErrorSpecs.new.not_implemented_function("foo")', args: "#{extension_path} 2>&1", exit_status: expected_status)
18+
out.should =~ /undefined symbol: rb_str_shared_replace|Symbol not found: _rb_str_shared_replace/
19+
end
1820
end
1921
end

0 commit comments

Comments
 (0)