1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Consider more block devices.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2015-04-12 01:33:19 +00:00
parent a062d71b15
commit 525d2102fc

View file

@ -160,11 +160,7 @@ class TestFileExhaustive < Test::Unit::TestCase
def blockdev
return @blockdev if defined? @blockdev
if /linux/ =~ RUBY_PLATFORM
if File.exist? '/dev/loop0'
@blockdev = '/dev/loop0'
elsif File.exist? '/dev/sda'
@blockdev = '/dev/sda'
end
@blockdev = %w[/dev/loop0 /dev/sda /dev/vda /dev/xvda1].find {|f| File.exist? f }
else
@blockdev = nil
end