bug hunting
This commit is contained in:
parent
340ecf6e9a
commit
25f20b1967
4 changed files with 14 additions and 14 deletions
|
@ -209,7 +209,10 @@ def __str__(self):
|
||||||
str(self.platform_os) + "-" + str(self.target) )
|
str(self.platform_os) + "-" + str(self.target) )
|
||||||
|
|
||||||
def _cmp_key(self):
|
def _cmp_key(self):
|
||||||
return (self.platform, self.platform_os, self.target)
|
platform = self.platform.name
|
||||||
|
os = self.platform_os.name if isinstance(self.platform_os, OperatingSystem) else self.platform_os
|
||||||
|
target = self.target.name if isinstance(self.target, Target) else self.target
|
||||||
|
return (platform, os, target)
|
||||||
|
|
||||||
|
|
||||||
def _helper_to_dict(arch_field_dict, arch_field_name, *args):
|
def _helper_to_dict(arch_field_dict, arch_field_name, *args):
|
||||||
|
|
|
@ -210,7 +210,7 @@ def concretize_version(self, spec):
|
||||||
|
|
||||||
return True # Things changed
|
return True # Things changed
|
||||||
|
|
||||||
def _concretize_operating_system(self, spec, platform):
|
def _concretize_operating_system(self, spec):
|
||||||
if spec.architecture.platform_os is not None:
|
if spec.architecture.platform_os is not None:
|
||||||
if isinstance(spec.architecture.platform_os,spack.architecture.OperatingSystem):
|
if isinstance(spec.architecture.platform_os,spack.architecture.OperatingSystem):
|
||||||
return False
|
return False
|
||||||
|
@ -223,8 +223,7 @@ def _concretize_operating_system(self, spec, platform):
|
||||||
else:
|
else:
|
||||||
spec.add_operating_system_from_string(spec.root.architecture.platform_os)
|
spec.add_operating_system_from_string(spec.root.architecture.platform_os)
|
||||||
else:
|
else:
|
||||||
platform = spack.architecture.sys_type()
|
spec.architecture.platform_os = spec.architecture.platform.operating_system('default_os')
|
||||||
spec.architecture.platform_os = platform.operating_system('default_os')
|
|
||||||
|
|
||||||
return True #changed
|
return True #changed
|
||||||
|
|
||||||
|
@ -236,7 +235,7 @@ def _concretize_operating_system(self, spec, platform):
|
||||||
# return True
|
# return True
|
||||||
|
|
||||||
|
|
||||||
def _concretize_target(self, spec, platform):
|
def _concretize_target(self, spec):
|
||||||
if spec.architecture.target is not None:
|
if spec.architecture.target is not None:
|
||||||
if isinstance(spec.architecture.target,spack.architecture.Target):
|
if isinstance(spec.architecture.target,spack.architecture.Target):
|
||||||
return False
|
return False
|
||||||
|
@ -250,8 +249,7 @@ def _concretize_target(self, spec, platform):
|
||||||
else:
|
else:
|
||||||
spec.add_target_from_string(spec.root.architecture.target)
|
spec.add_target_from_string(spec.root.architecture.target)
|
||||||
else:
|
else:
|
||||||
platform = spack.architecture.sys_type()
|
spec.architecture.target = spec.architecture.platform.target('default')
|
||||||
spec.architecture.target = platform.target('default')
|
|
||||||
|
|
||||||
return True #changed
|
return True #changed
|
||||||
|
|
||||||
|
@ -280,11 +278,10 @@ def concretize_architecture(self, spec):
|
||||||
#False
|
#False
|
||||||
# if isinstance(spec.architecture, basestring):
|
# if isinstance(spec.architecture, basestring):
|
||||||
# spec.split_architecture_string(spec.architecture)
|
# spec.split_architecture_string(spec.architecture)
|
||||||
print spec.architecture
|
|
||||||
|
|
||||||
ret = any((
|
ret = any((
|
||||||
self._concretize_operating_system(spec, platform),
|
self._concretize_operating_system(spec),
|
||||||
self._concretize_target(spec, platform)))
|
self._concretize_target(spec)))
|
||||||
|
|
||||||
|
|
||||||
# Does not look pretty at all!!!
|
# Does not look pretty at all!!!
|
||||||
|
|
|
@ -462,7 +462,6 @@ def _set_architecture(self, architecture):
|
||||||
if self.architecture: raise DuplicateArchitectureError(
|
if self.architecture: raise DuplicateArchitectureError(
|
||||||
"Spec for '%s' cannot have two architectures." % self.name)
|
"Spec for '%s' cannot have two architectures." % self.name)
|
||||||
platform = spack.architecture.sys_type()
|
platform = spack.architecture.sys_type()
|
||||||
print architecture
|
|
||||||
if '-' in architecture:
|
if '-' in architecture:
|
||||||
os, target = architecture.split('-')
|
os, target = architecture.split('-')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -120,9 +120,10 @@ def has_a_default(self):
|
||||||
for target in targets:
|
for target in targets:
|
||||||
@when('='+target.name)
|
@when('='+target.name)
|
||||||
def different_by_target(self):
|
def different_by_target(self):
|
||||||
return self.spec.architecture.target.name
|
if isinstance(self.spec.architecture.target,basestring):
|
||||||
|
return self.spec.architecture.target
|
||||||
|
else:
|
||||||
|
return self.spec.architecture.target.name
|
||||||
#
|
#
|
||||||
# Make sure we can switch methods on different dependencies
|
# Make sure we can switch methods on different dependencies
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue