Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Apteryks opened this issue Mar 18, 2023 · 1 comment

Comments

@Apteryks
Copy link

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:

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

Thank you!

@jordansissel
Copy link
Owner

Oh fun! Good find :)

this does look like a bug in the test suite, but I have not investigated further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants