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

Cask Upgrade test consistently fails because it asks for sudo #15958

Closed
3 tasks done
apainintheneck opened this issue Sep 4, 2023 · 0 comments · Fixed by #15968
Closed
3 tasks done

Cask Upgrade test consistently fails because it asks for sudo #15958

apainintheneck opened this issue Sep 4, 2023 · 0 comments · Fixed by #15968
Labels
bug Reproducible Homebrew/brew bug cask Homebrew Cask outdated PR was locked due to age

Comments

@apainintheneck
Copy link
Contributor

brew doctor output

Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.1.8-9-g27902f0
ORIGIN: https://github.com/Homebrew/brew
HEAD: 27902f02843df33ce6430f47cf1493fbcd663474
Last commit: 4 hours ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 863ad7600d791fc23747081f1ded48660ea92561
Core tap last commit: 2 hours ago
Core tap branch: master
Core tap JSON: 04 Sep 20:23 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_AUTOREMOVE: set
HOMEBREW_CASK_OPTS: []
HOMEBREW_DEVELOPER: set
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.D6vhcW5XTG/org.macosforge.xquartz:0
HOMEBREW_EDITOR: code
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 2.6.10 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/bin/ruby
CPU: quad-core 64-bit ivybridge
Clang: 12.0.0 build 1200
Git: 2.24.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.7-x86_64
CLT: 12.0.0.32.29
Xcode: 12.4

What were you trying to do (and why)?

Run brew tests to get feedback before opening a PR.

What happened (include all command output)?

$ brew tests
Randomized with seed 48697
4 processes for 404 specs, ~ 101 specs per process
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Password:............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Failures:

  1) Cask::Artifact::App upgrade when the directory is owned by root reuses the same directory
     Failure/Error: app.install_phase(command: command, adopt: adopt, force: force, predecessor: cask)

     Timeout::Error:
       execution expired
     # ./system_command.rb:229:in `join'
     # ./system_command.rb:229:in `each_output_line'
     # ./system_command.rb:47:in `run!'
     # ./system_command.rb:34:in `run'
     # ./system_command.rb:38:in `run!'
     # ./system_command.rb:26:in `system_command!'
     # ./cask/quarantine.rb:181:in `copy_xattrs'
     # ./cask/artifact/moved.rb:94:in `move'
     # ./cask/artifact/moved.rb:19:in `install_phase'
     # ./test/cask/artifact/app_spec.rb:369:in `block (4 levels) in <top (required)>'
     # ./test/support/helper/spec/shared_context/homebrew_cask.rb:53:in `block (2 levels) in <top (required)>'
..
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.........................................

Failures:

  1) brew --version prints the Homebrew's version
     Failure/Error:
       expect { brew_sh "--version" }
         .to output(/^Homebrew #{Regexp.escape(HOMEBREW_VERSION)}\n/o).to_stdout
         .and not_to_output.to_stderr
         .and be_a_success

       expected block to output /^Homebrew 4\.1\.8\-10\-g24c1311\n/ to stdout, but output "Homebrew 4.1.8-10-g24c1311-dirty\nHomebrew/homebrew-core (git revision 863ad7600d7; last commit 2023-09-04)\nHomebrew/homebrew-cask (git revision 123271ac53; last commit 2023-09-04)\n"
     # ./test/cmd/--version_spec.rb:7:in `block (2 levels) in <top (required)>'
     # ./test/support/helper/spec/shared_context/integration_test.rb:49:in `block (2 levels) in <top (required)>'

It looks like this test timed out because it was waiting for sudo access (the Password: line above).

What did you expect to happen?

I expected the tests to pass on the master branch and I didn't expect them to need root.

Step-by-step reproduction instructions (by running brew commands)

1. `brew tests --only=cask/artifact/app`
@apainintheneck apainintheneck added bug Reproducible Homebrew/brew bug cask Homebrew Cask labels Sep 4, 2023
dduugg pushed a commit to dduugg/brew that referenced this issue Sep 30, 2023
Use `NeverSudoSystemCommand` and pass it through to
`Quarantine.copy_xattrs` so `brew tests` doesn't try to `sudo`.

Fixes Homebrew#15958

Co-authored-by: Bo Anderson <[email protected]>
Co-authored-by: Kevin <[email protected]>
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug cask Homebrew Cask outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant