File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -415,9 +415,20 @@ def should_print_full_java_command(options, env: {})
415
415
TruffleRuby . graalvm_home and TruffleRuby . native?
416
416
} do
417
417
describe "runtime configuration flags" do
418
+ before :each do
419
+ @trufflerubyopt = ENV [ 'TRUFFLERUBYOPT' ]
420
+ # remove --native/--jvm from $TRUFFLERUBYOPT as they can conflict with command line arguments for these specs
421
+ ENV [ 'TRUFFLERUBYOPT' ] = @trufflerubyopt . to_s . gsub ( /--(native|jvm)\b / , '' )
422
+ end
423
+
424
+ after :each do
425
+ ENV [ 'TRUFFLERUBYOPT' ] = @trufflerubyopt
426
+ end
427
+
418
428
[ 'RUBYOPT' , 'TRUFFLERUBYOPT' ] . each do |var |
419
429
it "should recognize ruby --vm options in #{ var } when switching to JVM" do
420
- out = ruby_exe ( 'puts RUBY_DESCRIPTION; puts Truffle::System.get_java_property("foo")' , env : { var => "--jvm --vm.Dfoo=bar" } , args : @redirect )
430
+ env = { var => "--jvm --vm.Dfoo=bar" }
431
+ out = ruby_exe ( 'puts RUBY_DESCRIPTION; puts Truffle::System.get_java_property("foo")' , env : env , args : @redirect )
421
432
check_status_and_empty_stderr
422
433
out = out . lines . map ( &:chomp )
423
434
out [ 0 ] . should =~ /GraalVM (CE|EE) JVM/
You can’t perform that action at this time.
0 commit comments