diff options
Diffstat (limited to 'spec/ruby/core/file/atime_spec.rb')
-rw-r--r-- | spec/ruby/core/file/atime_spec.rb | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/spec/ruby/core/file/atime_spec.rb b/spec/ruby/core/file/atime_spec.rb index 047bb0e10e..cef07ba010 100644 --- a/spec/ruby/core/file/atime_spec.rb +++ b/spec/ruby/core/file/atime_spec.rb @@ -16,20 +16,17 @@ describe "File.atime" do end platform_is :linux, :windows do - ## NOTE also that some Linux systems disable atime (e.g. via mount params) for better filesystem speed. - it "returns the last access time for the named file with microseconds" do - supports_subseconds = Integer(`stat -c%x '#{__FILE__}'`[/\.(\d+)/, 1], 10) - if supports_subseconds != 0 - expected_time = Time.at(Time.now.to_i + 0.123456) - File.utime expected_time, 0, @file - # FIXME: A random failing test on Travis ppc64le. - # https://bugs.ruby-lang.org/issues/17926 - if ENV.key?('TRAVIS') && ENV['TRAVIS_CPU_ARCH'] == 'ppc64le' - skip '[ruby-core:17926] A random failure on Travis ppc64le' + platform_is_not :"powerpc64le-linux" do # https://bugs.ruby-lang.org/issues/17926 + ## NOTE also that some Linux systems disable atime (e.g. via mount params) for better filesystem speed. + it "returns the last access time for the named file with microseconds" do + supports_subseconds = Integer(`stat -c%x '#{__FILE__}'`[/\.(\d+)/, 1], 10) + if supports_subseconds != 0 + expected_time = Time.at(Time.now.to_i + 0.123456) + File.utime expected_time, 0, @file + File.atime(@file).usec.should == expected_time.usec + else + File.atime(__FILE__).usec.should == 0 end - File.atime(@file).usec.should == expected_time.usec - else - File.atime(__FILE__).usec.should == 0 end end end |