From 0e69710f417dce418ca1e3b54ff448493b102c06 Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Fri, 9 Dec 2022 08:27:46 -0500 Subject: 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 --- .../packages/intel-oneapi-compilers/package.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'var') 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) -- cgit v1.2.3-70-g09d2