mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Pass ASAN options to child environments
I want to work with ASAN, but some child environments are not inheriting the ASAN options I'm using. This commit passes them to child environments if specified
This commit is contained in:
parent
346301e232
commit
0767d387ec
2 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@ class TestStack < Test::Unit::TestCase
|
|||
env = {}
|
||||
env['RUBY_FIBER_VM_STACK_SIZE'] = vm_stack_size.to_s if vm_stack_size
|
||||
env['RUBY_FIBER_MACHINE_STACK_SIZE'] = machine_stack_size.to_s if machine_stack_size
|
||||
env['ASAN_OPTIONS'] = ENV['ASAN_OPTIONS'] if ENV['ASAN_OPTIONS']
|
||||
|
||||
stdout, stderr, status = EnvUtil.invoke_ruby([env, '-e', script], '', true, true, timeout: 30)
|
||||
assert(!status.signaled?, FailDesc[status, nil, stderr])
|
||||
|
|
|
@ -150,6 +150,7 @@ module EnvUtil
|
|||
if RUBYLIB and lib = child_env["RUBYLIB"]
|
||||
child_env["RUBYLIB"] = [lib, RUBYLIB].join(File::PATH_SEPARATOR)
|
||||
end
|
||||
child_env['ASAN_OPTIONS'] = ENV['ASAN_OPTIONS'] if ENV['ASAN_OPTIONS']
|
||||
args = [args] if args.kind_of?(String)
|
||||
pid = spawn(child_env, *precommand, rubybin, *args, **opt)
|
||||
in_c.close
|
||||
|
|
Loading…
Reference in a new issue