-
-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Description
The File time specs (atime, ctime, mtime) do not currently pass on Windows because they depend Linux-specific output of the "stat" command.
I believe this commit enabled these specs.
I suspect they are being run in CI against an environment that has installed additional unix tools, probably from whatever build harness is being used to build Ruby itself. This requirement does not appear to be documented anywhere. The same failures occur for the same reasons on JRuby on Windows.
I believe these specs should be modified to either not run or not use the "stat" command on Windows.
The failures are below:
>ruby spec/mspec/bin/mspec ci spec/ruby/core/file/
$ ruby C:/Users/headius/work/jruby/spec/mspec/bin/mspec-ci spec/ruby/core/file/
ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]
1)
File.atime returns the last access time for the named file with microseconds ERROR
Errno::ENOENT: No such file or directory - stat -c%x 'C:/Users/headius/work/jruby/spec/ruby/core/file/atime_spec.rb'
C:/Users/headius/work/jruby/spec/ruby/core/file/atime_spec.rb:21:in ``'
C:/Users/headius/work/jruby/spec/ruby/core/file/atime_spec.rb:21:in `block (3 levels) in <top (required)>'
C:/Users/headius/work/jruby/spec/ruby/core/file/atime_spec.rb:3:in `<top (required)>'
2)
File.ctime returns the change time for the named file (the time at which directory information about the file was changed, not the file itself) with microseconds. ERROR
Errno::ENOENT: No such file or directory - stat -c%z 'C:/Users/headius/work/jruby/spec/ruby/core/file/ctime_spec.rb'
C:/Users/headius/work/jruby/spec/ruby/core/file/ctime_spec.rb:19:in ``'
C:/Users/headius/work/jruby/spec/ruby/core/file/ctime_spec.rb:19:in `block (3 levels) in <top (required)>'
C:/Users/headius/work/jruby/spec/ruby/core/file/ctime_spec.rb:3:in `<top (required)>'
3)
File.mtime returns the modification Time of the file with microseconds ERROR
Errno::ENOENT: No such file or directory - stat -c%y 'C:/Users/headius/work/jruby/spec/ruby/core/file/mtime_spec.rb'
C:/Users/headius/work/jruby/spec/ruby/core/file/mtime_spec.rb:20:in ``'
C:/Users/headius/work/jruby/spec/ruby/core/file/mtime_spec.rb:20:in `block (3 levels) in <top (required)>'
C:/Users/headius/work/jruby/spec/ruby/core/file/mtime_spec.rb:3:in `<top (required)>'
Metadata
Metadata
Assignees
Labels
No labels