2019-04-04 16:26:17 +00:00
|
|
|
# Stop script execution when a non-terminating error occurs
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
2019-04-12 07:53:16 +00:00
|
|
|
# reload Env:PATH to ensure it gets any changes that the install made (e.g. C:\opscode\inspec\bin\ )
|
|
|
|
$Env:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
|
|
|
|
|
2021-04-23 21:06:05 +00:00
|
|
|
$Env:Path = "C:\opscode\inspec\bin;C:\opscode\inspec\embedded\bin;$Env:PATH"
|
2019-11-12 20:47:40 +00:00
|
|
|
Write-Host "+++ Testing $Plan"
|
|
|
|
|
2020-04-06 20:06:21 +00:00
|
|
|
Set-Location test/artifact
|
2019-11-12 20:47:40 +00:00
|
|
|
rake
|
2022-05-16 20:55:16 +00:00
|
|
|
If ($lastexitcode -ne 0) { Throw $lastexitcode }
|