diff options
author | John Parent <john.parent@kitware.com> | 2022-03-16 16:41:34 -0400 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2022-03-17 09:01:01 -0700 |
commit | 4aee27816e7101753aeb392e868096236a26d84d (patch) | |
tree | 2a6099f9b5305997e71e397aa2fae7f624786b90 /var/spack/repos/builtin.mock/packages | |
parent | e63b4f752a73a67d24802a21bdf4c8a931216d2e (diff) | |
download | spack-4aee27816e7101753aeb392e868096236a26d84d.tar.gz spack-4aee27816e7101753aeb392e868096236a26d84d.tar.bz2 spack-4aee27816e7101753aeb392e868096236a26d84d.tar.xz spack-4aee27816e7101753aeb392e868096236a26d84d.zip |
Windows Support: Testing Suite integration
Broaden support for execution of the test suite
on Windows.
General bug and review fixups
Diffstat (limited to 'var/spack/repos/builtin.mock/packages')
4 files changed, 12 insertions, 10 deletions
diff --git a/var/spack/repos/builtin.mock/packages/cmake-client/package.py b/var/spack/repos/builtin.mock/packages/cmake-client/package.py index 09b445fd49..0e8d1a3d9b 100644 --- a/var/spack/repos/builtin.mock/packages/cmake-client/package.py +++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py @@ -94,6 +94,8 @@ class CmakeClient(CMakePackage): # check that which('cmake') returns the right one. cmake = which('cmake') + print(cmake) + print(cmake.exe) check(cmake.exe[0].startswith(spec['cmake'].prefix.bin), "Wrong cmake was in environment: %s" % cmake) diff --git a/var/spack/repos/builtin.mock/packages/cmake/package.py b/var/spack/repos/builtin.mock/packages/cmake/package.py index e5dd7057d1..8c19ca8a6e 100644 --- a/var/spack/repos/builtin.mock/packages/cmake/package.py +++ b/var/spack/repos/builtin.mock/packages/cmake/package.py @@ -4,9 +4,12 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +import sys from spack import * +is_windows = sys.platform == 'win32' + def check(condition, msg): """Raise an install error if condition is False.""" @@ -43,7 +46,7 @@ class Cmake(Package): check(os.environ['for_install'] == 'for_install', "Couldn't read env var set in compile envieonmnt") - - cmake_exe = join_path(prefix.bin, 'cmake') + cmake_exe_ext = ".exe" if is_windows else '' + cmake_exe = join_path(prefix.bin, 'cmake{}'.format(cmake_exe_ext)) touch(cmake_exe) set_executable(cmake_exe) diff --git a/var/spack/repos/builtin.mock/packages/find-externals1/package.py b/var/spack/repos/builtin.mock/packages/find-externals1/package.py index 9200668d7c..c85598e891 100644 --- a/var/spack/repos/builtin.mock/packages/find-externals1/package.py +++ b/var/spack/repos/builtin.mock/packages/find-externals1/package.py @@ -20,11 +20,11 @@ class FindExternals1(AutotoolsPackage): exe_to_path = dict( (os.path.basename(p), p) for p in exes_in_prefix ) - if 'find-externals1-exe' not in exe_to_path: - return None - + exes = [x for x in exe_to_path.keys() if 'find-externals1-exe' in x] + if not exes: + return exe = spack.util.executable.Executable( - exe_to_path['find-externals1-exe']) + exe_to_path[exes[0]]) output = exe('--version', output=str) if output: match = re.search(r'find-externals1.*version\s+(\S+)', output) diff --git a/var/spack/repos/builtin.mock/packages/trivial-install-test-package/package.py b/var/spack/repos/builtin.mock/packages/trivial-install-test-package/package.py index 748034baca..467a1631fa 100644 --- a/var/spack/repos/builtin.mock/packages/trivial-install-test-package/package.py +++ b/var/spack/repos/builtin.mock/packages/trivial-install-test-package/package.py @@ -2,7 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - from spack import * @@ -15,6 +14,4 @@ class TrivialInstallTestPackage(Package): version('1.0', '0123456789abcdef0123456789abcdef') def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - make('install') + touch(join_path(prefix, 'an_installation_file')) |