summaryrefslogtreecommitdiff
path: root/habitat
diff options
context:
space:
mode:
Diffstat (limited to 'habitat')
-rw-r--r--habitat/tests/spec.ps17
1 files changed, 7 insertions, 0 deletions
diff --git a/habitat/tests/spec.ps1 b/habitat/tests/spec.ps1
index ab1656b221..0229ac487f 100644
--- a/habitat/tests/spec.ps1
+++ b/habitat/tests/spec.ps1
@@ -10,6 +10,13 @@ $chef_gem_root = (hab pkg exec $PackageIdentifier gem.cmd which chef | Split-Pat
try {
Push-Location $chef_gem_root
$env:PATH = "C:\hab\bin;$env:PATH"
+
+ # Put chef's GEM_PATH in the machine environment so that the windows service
+ # tests will be able to consume the win32-service gem
+ $pkgEnv = hab pkg env $PackageIdentifier
+ $gemPath = $pkgEnv | Where-Object { $_.StartsWith("`$env:GEM_PATH=") }
+ SETX GEM_PATH $($gemPath.Split("=")[1]) /m
+
hab pkg binlink --force $PackageIdentifier
/hab/bin/rspec --format progress --tag ~executables --tag ~choco_installed spec/functional
if (-not $?) { throw "functional testing failed"}