diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2022-03-17 15:33:16 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2022-03-17 15:33:16 -0700 |
commit | 058c1d64e9f4225a063f2c38a0f3fa0e38735368 (patch) | |
tree | 290e800f68051edf1c4149f23be327942b30faaa | |
parent | c7060474d740e322a2906e96a8fb068a4a9512f5 (diff) | |
download | chef-058c1d64e9f4225a063f2c38a0f3fa0e38735368.tar.gz |
Fix windows kitchen tests
forward port the work john did on chef-17
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | .github/workflows/kitchen.yml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.github/workflows/kitchen.yml b/.github/workflows/kitchen.yml index 2266fc5cad..10201b545d 100644 --- a/.github/workflows/kitchen.yml +++ b/.github/workflows/kitchen.yml @@ -44,12 +44,28 @@ jobs: run: | cd kitchen-tests $env:PATH = "C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;" + $env:PATH + # htmldiff and ldiff on windows cause a conflict with gems being loaded below. + # we remove thenm here. + if (Test-Path C:\opscode\chef\embedded\bin\htmldiff) + { + Remove-Item -Path C:\opscode\chef\embedded\bin\htmldiff + Remove-Item -Path C:\opscode\chef\embedded\bin\ldiff + } + # The chef-client installer does not put the file 'ansidecl.h' down in the correct location + # This leads to failures during testing. Moving that file to its correct position here. + # Another example of 'bad' that needs to be corrected + $output = gci -path C:\opscode\ -file ansidecl.h -Recurse + $target_path = $($output.Directory.Parent.FullName + "\x86_64-w64-mingw32\include") + Move-Item -Path $output.FullName -Destination $target_path + bundle install --jobs=3 --retry=3 # If ($lastexitcode -ne 0) { Exit $lastexitcode } # The bundle install command above fails because our build on windows on ruby-3.0 is # completely broken when it comes to installing native gems. Until that is fixed we # need to ignore that error code and to manually install berkshelf below. This is a # very bad hack. + + If ($lastexitcode -ne 0) { Exit $lastexitcode } gem install berkshelf --no-doc If ($lastexitcode -ne 0) { Exit $lastexitcode } berks vendor cookbooks |