Fixed test config to work on yosemite
This commit is contained in:
parent
0f40174723
commit
8f99334f11
@ -22,26 +22,26 @@
|
|||||||
# License along with this program; if not, write to the Free Software
|
# License along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
"""
|
"""
|
||||||
This module contains all the elements that are required to create an
|
This module contains all the elements that are required to create an
|
||||||
architecture object. These include, the target processor, the operating system,
|
architecture object. These include, the target processor, the operating system,
|
||||||
and the architecture platform (i.e. cray, darwin, linux, bgq, etc) classes.
|
and the architecture platform (i.e. cray, darwin, linux, bgq, etc) classes.
|
||||||
|
|
||||||
On a multiple architecture machine, the architecture spec field can be set to
|
On a multiple architecture machine, the architecture spec field can be set to
|
||||||
build a package against any target and operating system that is present on the
|
build a package against any target and operating system that is present on the
|
||||||
platform. On Cray platforms or any other architecture that has different front and
|
platform. On Cray platforms or any other architecture that has different front and
|
||||||
back end environments, the operating system will determine the method of compiler
|
back end environments, the operating system will determine the method of compiler
|
||||||
detection.
|
detection.
|
||||||
|
|
||||||
There are two different types of compiler detection:
|
There are two different types of compiler detection:
|
||||||
1. Through the $PATH env variable (front-end detection)
|
1. Through the $PATH env variable (front-end detection)
|
||||||
2. Through the tcl module system. (back-end detection)
|
2. Through the tcl module system. (back-end detection)
|
||||||
|
|
||||||
Depending on which operating system is specified, the compiler will be detected
|
Depending on which operating system is specified, the compiler will be detected
|
||||||
using one of those methods.
|
using one of those methods.
|
||||||
|
|
||||||
For platforms such as linux and darwin, the operating system is autodetected and
|
For platforms such as linux and darwin, the operating system is autodetected and
|
||||||
the target is set to be x86_64.
|
the target is set to be x86_64.
|
||||||
|
|
||||||
The command line syntax for specifying an architecture is as follows:
|
The command line syntax for specifying an architecture is as follows:
|
||||||
|
|
||||||
@ -52,27 +52,27 @@
|
|||||||
set in the 'platforms/' directory which contains the different subclasses for
|
set in the 'platforms/' directory which contains the different subclasses for
|
||||||
platforms. If the machine has multiple architectures, the user can
|
platforms. If the machine has multiple architectures, the user can
|
||||||
also enter front-end, or fe or back-end or be. These settings will concretize
|
also enter front-end, or fe or back-end or be. These settings will concretize
|
||||||
to their respective front-end and back-end targets and operating systems.
|
to their respective front-end and back-end targets and operating systems.
|
||||||
Additional platforms can be added by creating a subclass of Platform
|
Additional platforms can be added by creating a subclass of Platform
|
||||||
and adding it inside the platform directory.
|
and adding it inside the platform directory.
|
||||||
|
|
||||||
Platforms are an abstract class that are extended by subclasses. If the user
|
Platforms are an abstract class that are extended by subclasses. If the user
|
||||||
wants to add a new type of platform (such as cray_xe), they can create a subclass
|
wants to add a new type of platform (such as cray_xe), they can create a subclass
|
||||||
and set all the class attributes such as priority, front_target ,back_target,
|
and set all the class attributes such as priority, front_target ,back_target,
|
||||||
front_os, back_os. Platforms also contain a priority class attribute. A lower
|
front_os, back_os. Platforms also contain a priority class attribute. A lower
|
||||||
number signifies higher priority. These numbers are arbitrarily set and can be
|
number signifies higher priority. These numbers are arbitrarily set and can be
|
||||||
changed though often there isn't much need unless a new platform is added and
|
changed though often there isn't much need unless a new platform is added and
|
||||||
the user wants that to be detected first.
|
the user wants that to be detected first.
|
||||||
|
|
||||||
Targets are created inside the platform subclasses. Most architecture (like linux,
|
Targets are created inside the platform subclasses. Most architecture (like linux,
|
||||||
and darwin) will have only one target (x86_64) but in the case of Cray machines,
|
and darwin) will have only one target (x86_64) but in the case of Cray machines,
|
||||||
there is both a frontend and backend processor. The user can specify which targets
|
there is both a frontend and backend processor. The user can specify which targets
|
||||||
are present on front-end and back-end architecture
|
are present on front-end and back-end architecture
|
||||||
|
|
||||||
Depending on the platform, operating systems are either auto-detected or are
|
Depending on the platform, operating systems are either auto-detected or are
|
||||||
set. The user can set the front-end and back-end operating setting by the class
|
set. The user can set the front-end and back-end operating setting by the class
|
||||||
attributes front_os and back_os. The operating system as described earlier, will
|
attributes front_os and back_os. The operating system as described earlier, will
|
||||||
be responsible for compiler detection.
|
be responsible for compiler detection.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
@ -216,7 +216,7 @@ def operating_system(self, name):
|
|||||||
|
|
||||||
return self.operating_sys.get(name, None)
|
return self.operating_sys.get(name, None)
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def detect(self):
|
def detect(self):
|
||||||
""" Subclass is responsible for implementing this method.
|
""" Subclass is responsible for implementing this method.
|
||||||
@ -235,7 +235,7 @@ def __str__(self):
|
|||||||
def _cmp_key(self):
|
def _cmp_key(self):
|
||||||
t_keys = ''.join(str(t._cmp_key()) for t in sorted(self.targets.values()))
|
t_keys = ''.join(str(t._cmp_key()) for t in sorted(self.targets.values()))
|
||||||
o_keys = ''.join(str(o._cmp_key()) for o in sorted(self.operating_sys.values()))
|
o_keys = ''.join(str(o._cmp_key()) for o in sorted(self.operating_sys.values()))
|
||||||
return (self.name,
|
return (self.name,
|
||||||
self.default,
|
self.default,
|
||||||
self.front_end,
|
self.front_end,
|
||||||
self.back_end,
|
self.back_end,
|
||||||
@ -385,7 +385,7 @@ def concrete(self):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
if self.platform or self.platform_os or self.target:
|
if self.platform or self.platform_os or self.target:
|
||||||
if self.platform.name == 'darwin':
|
if self.platform.name == 'darwin':
|
||||||
os_name = self.platform_os.name
|
os_name = self.platform_os.name if self.platform_os else "None"
|
||||||
else:
|
else:
|
||||||
os_name = str(self.platform_os)
|
os_name = str(self.platform_os)
|
||||||
|
|
||||||
|
@ -69,6 +69,17 @@
|
|||||||
f77: None
|
f77: None
|
||||||
fc: None
|
fc: None
|
||||||
modules: 'None'
|
modules: 'None'
|
||||||
|
clang3.3OSX:
|
||||||
|
spec: clang@3.3
|
||||||
|
operating_system:
|
||||||
|
name: yosemite
|
||||||
|
version: '10.10'
|
||||||
|
paths:
|
||||||
|
cc: /path/to/clang
|
||||||
|
cxx: /path/to/clang++
|
||||||
|
f77: None
|
||||||
|
fc: None
|
||||||
|
modules: 'None'
|
||||||
gcc4.5.0CNL:
|
gcc4.5.0CNL:
|
||||||
paths:
|
paths:
|
||||||
cc: /path/to/gcc
|
cc: /path/to/gcc
|
||||||
@ -98,10 +109,21 @@
|
|||||||
f77: /path/to/gfortran
|
f77: /path/to/gfortran
|
||||||
fc: /path/to/gfortran
|
fc: /path/to/gfortran
|
||||||
operating_system:
|
operating_system:
|
||||||
name: RHL
|
name: redhat
|
||||||
version: '6.7'
|
version: '6.7'
|
||||||
spec: gcc@4.5.0
|
spec: gcc@4.5.0
|
||||||
modules: 'None'
|
modules: 'None'
|
||||||
|
gcc4.5.0OSX:
|
||||||
|
paths:
|
||||||
|
cc: /path/to/gcc
|
||||||
|
cxx: /path/to/g++
|
||||||
|
f77: /path/to/gfortran
|
||||||
|
fc: /path/to/gfortran
|
||||||
|
operating_system:
|
||||||
|
name: yosemite
|
||||||
|
version: '10.10'
|
||||||
|
spec: gcc@4.5.0
|
||||||
|
modules: 'None'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
mock_packages_config = """\
|
mock_packages_config = """\
|
||||||
|
Loading…
Reference in New Issue
Block a user