diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-15 02:20:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-15 02:20:20 +0000 |
commit | b1ef4d80964d22956ee993659f1bca0f4c504038 (patch) | |
tree | 774cee7317de7a4ec2cdb5fb87cbd4b1990baafc /test/lib | |
parent | 8b182a7f7d798ab6539518fbfcb51c78549f9733 (diff) | |
download | ruby-b1ef4d80964d22956ee993659f1bca0f4c504038.tar.gz |
envutil.rb: precommand in invoke_ruby [ci skip]
* test/lib/envutil.rb (invoke_ruby): add precommand option to
invoke ruby via some other commands, e.g., sudo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/envutil.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/envutil.rb b/test/lib/envutil.rb index e2eefbe917..f2b266484d 100644 --- a/test/lib/envutil.rb +++ b/test/lib/envutil.rb @@ -59,7 +59,7 @@ module EnvUtil encoding: nil, timeout: 10, reprieve: 1, timeout_error: Timeout::Error, stdout_filter: nil, stderr_filter: nil, signal: :TERM, - rubybin: EnvUtil.rubybin, + rubybin: EnvUtil.rubybin, precommand: nil, **opt) timeout = apply_timeout_scale(timeout) reprieve = apply_timeout_scale(reprieve) if reprieve @@ -81,7 +81,7 @@ module EnvUtil child_env.update(args.shift) end args = [args] if args.kind_of?(String) - pid = spawn(child_env, rubybin, *args, **opt) + pid = spawn(child_env, *precommand, rubybin, *args, **opt) in_c.close out_c.close if capture_stdout err_c.close if capture_stderr && capture_stderr != :merge_to_stdout |