summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fiddle/helper.rb7
-rw-r--r--test/pathname/test_pathname.rb1
-rw-r--r--test/ruby/test_dir.rb1
-rw-r--r--test/ruby/test_file_exhaustive.rb1
-rw-r--r--test/ruby/test_process.rb3
5 files changed, 13 insertions, 0 deletions
diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb
index 4aaa55ea789..d6fc44af4b6 100644
--- a/test/fiddle/helper.rb
+++ b/test/fiddle/helper.rb
@@ -10,6 +10,13 @@ case RUBY_PLATFORM
when /cygwin/
libc_so = "cygwin1.dll"
libm_so = "cygwin1.dll"
+when /android/
+ libdir = '/system/lib'
+ if [0].pack('L!').size == 8
+ libdir = '/system/lib64'
+ end
+ libc_so = File.join(libdir, "libc.so")
+ libm_so = File.join(libdir, "libm.so")
when /linux/
libdir = '/lib'
case [0].pack('L!').size
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 076a73e50bc..eaecc524754 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -789,6 +789,7 @@ class TestPathname < Test::Unit::TestCase
end
def test_birthtime
+ skip if RUBY_PLATFORM =~ /android/
# Check under a (probably) local filesystem.
# Remote filesystems often may not support birthtime.
with_tmpchdir('rubytest-pathname') do |dir|
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index 75cae710936..1bb228fd452 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -122,6 +122,7 @@ class TestDir < Test::Unit::TestCase
end
def test_chroot_nodir
+ skip if RUBY_PLATFORM =~ /android/
assert_raise(NotImplementedError, Errno::ENOENT, Errno::EPERM
) { Dir.chroot(File.join(@nodir, "")) }
end
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 33ed73d9fc9..2a5a860cf8d 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -642,6 +642,7 @@ class TestFileExhaustive < Test::Unit::TestCase
end
def test_birthtime
+ skip if RUBY_PLATFORM =~ /android/
[regular_file, utf8_file].each do |file|
t1 = File.birthtime(file)
t2 = File.open(file) {|f| f.birthtime}
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 83c9c6a867a..d1814a81bbb 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1583,6 +1583,7 @@ class TestProcess < Test::Unit::TestCase
end
def test_setegid
+ skip "root can use Process.egid on Android platform" if RUBY_PLATFORM =~ /android/
assert_nothing_raised(TypeError) {Process.egid += 0}
rescue NotImplementedError
end
@@ -1871,6 +1872,7 @@ class TestProcess < Test::Unit::TestCase
end
def test_execopts_uid
+ skip "root can use uid option of Kernel#system on Android platform" if RUBY_PLATFORM =~ /android/
feature6975 = '[ruby-core:47414]'
[30000, [Process.uid, ENV["USER"]]].each do |uid, user|
@@ -1902,6 +1904,7 @@ class TestProcess < Test::Unit::TestCase
def test_execopts_gid
skip "Process.groups not implemented on Windows platform" if windows?
+ skip "root can use Process.groups on Android platform" if RUBY_PLATFORM =~ /android/
feature6975 = '[ruby-core:47414]'
groups = Process.groups.map do |g|