示例#1
0
def test_platform():
    output_platform_class = spack.architecture.real_platform()
    if os.path.exists('/opt/cray/pe'):
        my_platform_class = Cray()
    elif 'Linux' in py_platform.system():
        my_platform_class = Linux()
    elif 'Darwin' in py_platform.system():
        my_platform_class = Darwin()

    assert str(output_platform_class) == str(my_platform_class)
示例#2
0
def test_platform():
    output_platform_class = spack.architecture.real_platform()
    if os.environ.get('CRAYPE_VERSION') is not None:
        my_platform_class = Cray()
    elif os.path.exists('/bgsys'):
        my_platform_class = Bgq()
    elif 'Linux' in py_platform.system():
        my_platform_class = Linux()
    elif 'Darwin' in py_platform.system():
        my_platform_class = Darwin()

    assert str(output_platform_class) == str(my_platform_class)
示例#3
0
    def test_platform(self):
        output_platform_class = spack.architecture.platform()
        if os.path.exists('/opt/cray/craype'):
            my_platform_class = Cray()
        elif os.path.exists('/bgsys'):
            my_platform_class = Bgq()
        elif 'Linux' in py_platform.system():
            my_platform_class = Linux()
        elif 'Darwin' in py_platform.system():
            my_platform_class = Darwin()

        self.assertEqual(str(output_platform_class), str(my_platform_class))