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

Acceptance tests: run on macOS 14 on ARM. #91

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
puppet: 7
- os: ubuntu-latest
puppet: 8
- os: macos-13
- os: macos-latest
puppet: 8
runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
---
.github/workflows/pr-checks.yaml:
additional-platforms:
- macos-13
- macos-latest
9 changes: 5 additions & 4 deletions lib/puppet/provider/rustup_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@ def execute(command, stdin_file: nil, raise_on_failure: true)
'RUSTUP_DIST_SERVER' => resource[:dist_server],
}.compact

debug do
#debug do
stdin_message = stdin_file ? " and stdin_file #{stdin_file.inspect}" : ''
"Running #{command.inspect} for user #{resource[:user].inspect} with " \
"environment #{environment.inspect}#{stdin_message}"
end
warn "!!! Running #{command.inspect} for user " \
"#{resource[:user].inspect} in #{Dir.pwd} with environment " \
"#{environment.inspect}#{stdin_message}"
#end

if ENV['RUSTUP_TRACE']
info("as #{resource[:user]}: #{command.join(' ')}")
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet_x/rustup/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def self.download_into(url, output)
# puts "#{file.path} will be deleted after the block ends."
# end
def self.download(url, basename = '')
file = Tempfile.new(basename)
file = Tempfile.new(basename, Dir.home)
begin
Puppet.debug { "Downloading #{url.inspect} into #{file.path.inspect}" }
PuppetX::Rustup::Util.download_into(url, file)
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/global_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
describe 'Global rustup management' do
context 'supports out-of-order targets and toolchains with a false shell' do
it do
puts "WORKING DIR: #{Dir.pwd}"

idempotent_apply(<<~'END')
class { 'rustup::global':
shell => '/bin/false',
Expand Down
Loading