Skip to content

non-deterministic test failure of the 'PleaseRun::CLI when setting --install-prefix should write files there' #155

@apteryks

Description

@apteryks

Hi,

About one out of 10 times, I get the following test failure using the latest release of pleaserun (0.0.32):

starting phase `check'
{:WRIT=>false}
{:timestamp=>"2023-03-18T01:38:22.243480+0000", :message=>"Writing file", :destination=>"/tmp/guix-build-ruby-pleaserun-0.0.32.drv-0/studtmp-f959f7fcd57724b44e243877895a45e8f71e5e0db3d2458519598a78653b/etc/init.d/"}
Run options: exclude {:systemd=>true, :upstart=>true, :launchd=>true}
F...............................................*..............

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) PleaseRun::Platform::SYSV deployment cannot write to /etc/init.d, so there's no deployment test to do. To run these tests, you'll need to run this as root, and preferrably in a vm or other temporary system
     # Not yet implemented
     # ./spec/pleaserun/platform/sysv_spec.rb:13

Failures:

  1) PleaseRun::CLI when setting --install-prefix should write files there
     Failure/Error: File.write(fullpath, content)

     Errno::EISDIR:
       Is a directory @ rb_sysopen - /tmp/guix-build-ruby-pleaserun-0.0.32.drv-0/studtmp-f959f7fcd57724b44e243877895a45e8f71e5e0db3d2458519598a78653b/etc/init.d/
     # ./lib/pleaserun/installer.rb:32:in `write'
     # ./lib/pleaserun/installer.rb:32:in `write'
     # ./lib/pleaserun/installer.rb:23:in `block in install_files'
     # ./lib/pleaserun/platform/sysv.rb:10:in `yield'
     # ./lib/pleaserun/platform/sysv.rb:10:in `block in files'
     # ./lib/pleaserun/installer.rb:18:in `each'
     # ./lib/pleaserun/installer.rb:18:in `install_files'
     # ./lib/pleaserun/cli.rb:185:in `run_human'
     # ./lib/pleaserun/cli.rb:141:in `execute'
     # ./lib/pleaserun/cli.rb:114:in `run'
     # ./spec/pleaserun/cli_spec.rb:12:in `block (3 levels) in <top (required)>'

Finished in 0.12898 seconds (files took 0.38235 seconds to load)
63 examples, 1 failure, 1 pending

Failed examples:

rspec ./spec/pleaserun/cli_spec.rb:19 # PleaseRun::CLI when setting --install-prefix should write files there

error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "rspec" arguments: () exit-status: 1 term-signal: #f stop-signal: #f> 
phase `check' failed after 0.8 seconds
command "rspec" failed with status 1

The direct dependencies used are:

ruby-cabin@0.9.0 ruby-clamp@1.3.2 ruby-dotenv@2.8.1 ruby-flores@0.0.8 ruby-insist@1.0.0
+ ruby-mustache@1.1.1 ruby-rspec@3.12.0 ruby-stud@0.0.23

I'll disable the test in the meantime for the Guix package I'm preparing.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions