summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages
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 /var/spack/repos/builtin.mock/packages
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 'var/spack/repos/builtin.mock/packages')
-rw-r--r--var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py
index 3ab49f1e1c..6899c2b87e 100644
--- a/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py
+++ b/var/spack/repos/builtin.mock/packages/intel-oneapi-compilers/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
+
from spack.package import *
@@ -23,6 +25,12 @@ class IntelOneapiCompilers(Package):
def install(self, spec, prefix):
# Create the minimal compiler that will fool `spack compiler find`
mkdirp(self.compiler_search_prefix)
- with open(self.compiler_search_prefix.icx, "w") as f:
- f.write('#!/bin/bash\necho "oneAPI DPC++ Compiler %s"' % str(spec.version))
- set_executable(self.compiler_search_prefix.icx)
+ comp = self.compiler_search_prefix.icx
+ if sys.platform == "win32":
+ comp = comp + ".bat"
+ comp_string = "@echo off\necho oneAPI DPC++ Compiler %s" % str(spec.version)
+ else:
+ comp_string = '#!/bin/bash\necho "oneAPI DPC++ Compiler %s"' % str(spec.version)
+ with open(comp, "w") as f:
+ f.write(comp_string)
+ set_executable(comp)