summaryrefslogtreecommitdiff
path: root/scripts/bk_tests/bk_run_choco.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bk_tests/bk_run_choco.ps1')
-rw-r--r--scripts/bk_tests/bk_run_choco.ps17
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/bk_tests/bk_run_choco.ps1 b/scripts/bk_tests/bk_run_choco.ps1
index 5360cc4914..cf84b1feb5 100644
--- a/scripts/bk_tests/bk_run_choco.ps1
+++ b/scripts/bk_tests/bk_run_choco.ps1
@@ -7,6 +7,7 @@ choco --version
echo "--- update bundler and rubygems"
ruby -v
+if (-not $?) { throw "Can't run Ruby. Is it installed?" }
$env:RUBYGEMS_VERSION=$(findstr rubygems omnibus_overrides.rb | %{ $_.split(" ")[3] })
$env:BUNDLER_VERSION=$(findstr bundler omnibus_overrides.rb | %{ $_.split(" ")[3] })
@@ -18,14 +19,16 @@ echo $env:RUBYGEMS_VERSION
echo $env:BUNDLER_VERSION
gem update --system $env:RUBYGEMS_VERSION
+if (-not $?) { throw "Unable to update system Rubygems" }
gem --version
gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet
+if (-not $?) { throw "Unable to update Bundler" }
bundle --version
echo "--- bundle install"
bundle install --jobs=3 --retry=3 --without omnibus_package docgen chefstyle
+if (-not $?) { throw "Unable to install gem dependencies" }
echo "+++ bundle exec rspec chocolatey_package_spec"
bundle exec rspec spec/functional/resource/chocolatey_package_spec.rb
-
-exit $LASTEXITCODE
+if (-not $?) { throw "Chef chocolatey functional tests failing." }