Skip to content

Commit 2881b1b

Browse files
eregonansalond
authored andcommitted
Test that Truffle options are correctly applied
(cherry picked from commit 95628b6836aad1b371bee733044af74d77906c14)
1 parent 4edb47e commit 2881b1b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec/truffle/launcher_spec.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,4 +280,15 @@ def should_print_full_java_command(options, env: {})
280280
out.should include(':b')
281281
end
282282

283+
guard -> { TruffleRuby.graal? } do
284+
it "applies Truffle options" do
285+
prefix = TruffleRuby.native? ? '--native.' : '--jvm.'
286+
options = [
287+
"#{prefix}Dgraal.TraceTruffleCompilation=true",
288+
"#{prefix}Dgraal.TruffleBackgroundCompilation=false",
289+
].join(" ")
290+
out = ruby_exe("2000.times {}", options: options)
291+
out.should include("[truffle] opt done")
292+
end
293+
end
283294
end

0 commit comments

Comments
 (0)