Windows Support: Testing Suite integration
Broaden support for execution of the test suite on Windows. General bug and review fixups
This commit is contained in:

committed by
Peter Scheibel

parent
e63b4f752a
commit
4aee27816e
9
lib/spack/external/ctest_log_parser.py
vendored
9
lib/spack/external/ctest_log_parser.py
vendored
@@ -71,8 +71,6 @@
|
||||
import re
|
||||
import math
|
||||
import multiprocessing
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
from contextlib import contextmanager
|
||||
|
||||
@@ -411,12 +409,7 @@ def parse(self, stream, context=6, jobs=None):
|
||||
pool = multiprocessing.Pool(jobs)
|
||||
try:
|
||||
# this is a workaround for a Python bug in Pool with ctrl-C
|
||||
if sys.version_info >= (3, 2):
|
||||
max_timeout = threading.TIMEOUT_MAX
|
||||
else:
|
||||
max_timeout = 9999999
|
||||
results = pool.map_async(_parse_unpack, args, 1).get(max_timeout)
|
||||
|
||||
results = pool.map_async(_parse_unpack, args, 1).get(9999999)
|
||||
errors, warnings, timings = zip(*results)
|
||||
finally:
|
||||
pool.terminate()
|
||||
|
4
lib/spack/external/macholib/util.py
vendored
4
lib/spack/external/macholib/util.py
vendored
@@ -6,8 +6,6 @@
|
||||
|
||||
from macholib import mach_o
|
||||
|
||||
from llnl.util.symlink import symlink
|
||||
|
||||
MAGIC = [
|
||||
struct.pack("!L", getattr(mach_o, "MH_" + _))
|
||||
for _ in ["MAGIC", "CIGAM", "MAGIC_64", "CIGAM_64"]
|
||||
@@ -142,7 +140,7 @@ def mergetree(src, dst, condition=None, copyfn=mergecopy, srcbase=None):
|
||||
try:
|
||||
if os.path.islink(srcname):
|
||||
realsrc = os.readlink(srcname)
|
||||
symlink(realsrc, dstname)
|
||||
os.symlink(realsrc, dstname)
|
||||
elif os.path.isdir(srcname):
|
||||
mergetree(
|
||||
srcname,
|
||||
|
@@ -12,8 +12,6 @@
|
||||
|
||||
from os.path import abspath, normpath, isabs, exists, isdir, isfile, islink, dirname
|
||||
|
||||
from llnl.util.symlink import symlink
|
||||
|
||||
if sys.version_info > (3,0):
|
||||
def map_as_list(func, iter):
|
||||
return list(map(func, iter))
|
||||
@@ -81,7 +79,7 @@ def mklinkto(self, oldname):
|
||||
def mksymlinkto(self, value, absolute=1):
|
||||
""" create a symbolic link with the given value (pointing to another name). """
|
||||
if absolute:
|
||||
py.error.checked_call(symlink, str(value), self.strpath)
|
||||
py.error.checked_call(os.symlink, str(value), self.strpath)
|
||||
else:
|
||||
base = self.common(value)
|
||||
# with posix local paths '/' is always a common base
|
||||
@@ -89,7 +87,7 @@ def mksymlinkto(self, value, absolute=1):
|
||||
reldest = self.relto(base)
|
||||
n = reldest.count(self.sep)
|
||||
target = self.sep.join(('..', )*n + (relsource, ))
|
||||
py.error.checked_call(symlink, target, self.strpath)
|
||||
py.error.checked_call(os.symlink, target, self.strpath)
|
||||
|
||||
def getuserid(user):
|
||||
import pwd
|
||||
@@ -894,7 +892,7 @@ def try_remove_lockfile():
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
symlink(src, dest)
|
||||
os.symlink(src, dest)
|
||||
except (OSError, AttributeError, NotImplementedError):
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user