Windows: reenable unit tests (#33385)

Unit tests on Windows are supposed to pass for any PR to pass CI.
However, the return code for the unit test command was not being
checked, which meant this check was always passing (effectively
disabled). This PR

* Properly checks the result of the unit tests and fails if the
  unit tests fail
* Fixes (or disables on Windows) a number of tests which have
  "drifted" out of support on Windows since this check was
  effectively disabled
This commit is contained in:
John W. Parent
2022-12-09 08:27:46 -05:00
committed by GitHub
parent ec62150ed7
commit 0e69710f41
24 changed files with 190 additions and 135 deletions

View File

@@ -1,3 +0,0 @@
spack compiler find
echo F|xcopy .\spack\share\spack\qa\configuration\windows_config.yaml $env:USERPROFILE\.spack\windows\config.yaml
spack external find cmake

View File

@@ -0,0 +1,2 @@
spack compiler find
spack external find cmake

View File

@@ -0,0 +1,3 @@
if ($LASTEXITCODE -ne 0){
throw "Unit Tests have failed"
}

View File

@@ -1,11 +1,5 @@
Set-Location ../
$env:python_pf_ver="C:\hostedtoolcache\windows\Python\3.9.5\x64\python.exe"
cmd /c "`"spack\bin\spack_cmd.bat`" print " |
foreach {
if ($_ -match "=") {
$v = $_.split("=")
[Environment]::SetEnvironmentVariable($v[0], $v[1])
}
}
$ErrorActionPreference = "SilentlyContinue"
Write-Output F|xcopy .\share\spack\qa\configuration\windows_config.yaml $env:USERPROFILE\.spack\windows\config.yaml
# The line below prevents the _spack_root symlink from causing issues with cyclic symlinks on Windows
(Get-Item '.\lib\spack\docs\_spack_root').Delete()
./share/spack/setup-env.ps1