2019-04-04 12:26:17 -04:00
|
|
|
# Stop script execution when a non-terminating error occurs
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
2019-04-12 03:53:16 -04: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 16:06:05 -05:00
|
|
|
$Env:Path = "C:\opscode\inspec\bin;C:\opscode\inspec\embedded\bin;$Env:PATH"
|
2019-11-12 12:47:40 -08:00
|
|
|
Write-Host "+++ Testing $Plan"
|
|
|
|
|
2020-04-06 14:06:21 -06:00
|
|
|
Set-Location test/artifact
|
2019-11-12 12:47:40 -08:00
|
|
|
rake
|
2020-04-06 14:06:21 -06:00
|
|
|
If ($lastexitcode -ne 0) { Exit $lastexitcode }
|