mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_process.rb: skip not-found groups
* test/ruby/test_process.rb (test_execopts_gid): under some network configuration (maybe with Open Directory but disconnected temporarily), some groups may fail to find. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e043ae7348
commit
dbc925f2bf
1 changed files with 6 additions and 1 deletions
|
@ -1850,7 +1850,12 @@ class TestProcess < Test::Unit::TestCase
|
|||
skip "Process.groups not implemented on Windows platform" if windows?
|
||||
feature6975 = '[ruby-core:47414]'
|
||||
|
||||
[30000, *Process.groups.map {|g| g = Etc.getgrgid(g); [g.name, g.gid]}].each do |group, gid|
|
||||
groups = Process.groups.map do |g|
|
||||
g = Etc.getgrgid(g) rescue next
|
||||
[g.name, g.gid]
|
||||
end
|
||||
groups.compact!
|
||||
[30000, *groups].each do |group, gid|
|
||||
assert_nothing_raised(feature6975) do
|
||||
begin
|
||||
system(*TRUECOMMAND, gid: group)
|
||||
|
|
Loading…
Add table
Reference in a new issue