summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJohn W. Parent <45471568+johnwparent@users.noreply.github.com>2022-12-09 08:27:46 -0500
committerGitHub <noreply@github.com>2022-12-09 13:27:46 +0000
commit0e69710f417dce418ca1e3b54ff448493b102c06 (patch)
tree6858421b0088c8fd158e6425c79c98fc19fc4af3 /share
parentec62150ed7e8c26eff322ffa66f0e7b4c8409734 (diff)
downloadspack-0e69710f417dce418ca1e3b54ff448493b102c06.tar.gz
spack-0e69710f417dce418ca1e3b54ff448493b102c06.tar.bz2
spack-0e69710f417dce418ca1e3b54ff448493b102c06.tar.xz
spack-0e69710f417dce418ca1e3b54ff448493b102c06.zip
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
Diffstat (limited to 'share')
-rw-r--r--share/spack/qa/setup_spack.ps13
-rw-r--r--share/spack/qa/setup_spack_installer.ps12
-rw-r--r--share/spack/qa/validate_last_exit.ps13
-rw-r--r--share/spack/qa/windows_test_setup.ps116
4 files changed, 10 insertions, 14 deletions
diff --git a/share/spack/qa/setup_spack.ps1 b/share/spack/qa/setup_spack.ps1
deleted file mode 100644
index 6b462916fa..0000000000
--- a/share/spack/qa/setup_spack.ps1
+++ /dev/null
@@ -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 \ No newline at end of file
diff --git a/share/spack/qa/setup_spack_installer.ps1 b/share/spack/qa/setup_spack_installer.ps1
new file mode 100644
index 0000000000..f2acdcc50a
--- /dev/null
+++ b/share/spack/qa/setup_spack_installer.ps1
@@ -0,0 +1,2 @@
+spack compiler find
+spack external find cmake \ No newline at end of file
diff --git a/share/spack/qa/validate_last_exit.ps1 b/share/spack/qa/validate_last_exit.ps1
new file mode 100644
index 0000000000..c8a9f7f5be
--- /dev/null
+++ b/share/spack/qa/validate_last_exit.ps1
@@ -0,0 +1,3 @@
+if ($LASTEXITCODE -ne 0){
+ throw "Unit Tests have failed"
+} \ No newline at end of file
diff --git a/share/spack/qa/windows_test_setup.ps1 b/share/spack/qa/windows_test_setup.ps1
index a7e3c66ea3..2e25d95960 100644
--- a/share/spack/qa/windows_test_setup.ps1
+++ b/share/spack/qa/windows_test_setup.ps1
@@ -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 \ No newline at end of file