summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-10 10:39:09 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-10 10:39:09 +0000
commitb496220a1f70f8393070ffebcb883c7c5fc036d7 (patch)
treee7df67accf737556f78bf7dcae236d10cc287dea /test/rdoc
parent0542d61e2717a3b8e1e4a2972bd32385a036cab8 (diff)
skip some tests so that no failure occurs in root privilege
Some tests had failed on `sudo make test-all`, mainly because root can access any files regardless of permission. This change adds `skip` guards into such tests. Note that almost all tests in which `skip` guards is added, already have "windows" guard. This is because there is no support to avoid read access by owner on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_options.rb1
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb1
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb2
3 files changed, 4 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_options.rb b/test/rdoc/test_rdoc_options.rb
index 760cf9db55..400ed9a549 100644
--- a/test/rdoc/test_rdoc_options.rb
+++ b/test/rdoc/test_rdoc_options.rb
@@ -18,6 +18,7 @@ class TestRDocOptions < RDoc::TestCase
def test_check_files
skip "assumes UNIX permission model" if /mswin|mingw/ =~ RUBY_PLATFORM
+ skip "skipped in root privilege" if Process.uid == 0
out, err = capture_io do
temp_dir do
diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb
index 3244238e3c..bd4794342c 100644
--- a/test/rdoc/test_rdoc_rdoc.rb
+++ b/test/rdoc/test_rdoc_rdoc.rb
@@ -296,6 +296,7 @@ class TestRDocRDoc < RDoc::TestCase
def test_parse_file_forbidden
skip 'chmod not supported' if Gem.win_platform?
+ skip 'skipped in root privilege' if Process.uid == 0
@rdoc.store = RDoc::Store.new
diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb
index 2fb79ff577..2664b35cbb 100644
--- a/test/rdoc/test_rdoc_rubygems_hook.rb
+++ b/test/rdoc/test_rdoc_rubygems_hook.rb
@@ -200,6 +200,7 @@ class TestRDocRubygemsHook < Gem::TestCase
def test_remove_unwritable
skip 'chmod not supported' if Gem.win_platform?
+ skip 'skipped in root privilege' if Process.uid == 0
FileUtils.mkdir_p @a.base_dir
FileUtils.chmod 0, @a.base_dir
@@ -228,6 +229,7 @@ class TestRDocRubygemsHook < Gem::TestCase
def test_setup_unwritable
skip 'chmod not supported' if Gem.win_platform?
+ skip 'skipped in root privilege' if Process.uid == 0
FileUtils.mkdir_p @a.doc_dir
FileUtils.chmod 0, @a.doc_dir