summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-27 07:39:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-27 07:39:00 +0000
commitfa7fa92870eefb2fa15497706b4e65e6c823f60a (patch)
treed8455c16f51a2a271808745344e117c234c5448d /test/lib
parentea631cc184da08a0db7ef5ce3f6ba9df4d02c138 (diff)
mjit.c: clean so file on Windows
* mjit.c (dlclose): use FreeLibrary to manage the reference count on the loaded module properly. * mjit.c (clean_so_file): clean shared object file after unloaded, in-use files cannot be removed on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/jit_support.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index a6c22165be..3b0d21094d 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -7,9 +7,12 @@ module JITSupport
]
module_function
- def eval_with_jit(script, verbose: 0, min_calls: 5, timeout: JIT_TIMEOUT)
- EnvUtil.invoke_ruby(
- ['--disable-gems', '--jit-wait', "--jit-verbose=#{verbose}", "--jit-min-calls=#{min_calls}", '-e', script],
+ def eval_with_jit(env = nil, script, verbose: 0, min_calls: 5, save_temps: false, timeout: JIT_TIMEOUT)
+ args = ['--disable-gems', '--jit-wait', "--jit-verbose=#{verbose}", "--jit-min-calls=#{min_calls}"]
+ args << '--jit-save-temps' if save_temps
+ args << '-e' << script
+ args.unshift(env) if env
+ EnvUtil.invoke_ruby(args,
'', true, true, timeout: timeout,
)
end