Add unit tests for Cray compiler detection (#11191)
This commit is contained in:
parent
5f74f22dc6
commit
dbfa928cdb
@ -13,6 +13,7 @@
|
||||
import spack.compilers as compilers
|
||||
|
||||
import spack.compilers.arm
|
||||
import spack.compilers.cce
|
||||
import spack.compilers.clang
|
||||
import spack.compilers.gcc
|
||||
import spack.compilers.intel
|
||||
@ -339,3 +340,13 @@ def test_xl_version_detection(version_str, expected_version):
|
||||
|
||||
version = spack.compilers.xl_r.XlR.extract_version_from_output(version_str)
|
||||
assert version == expected_version
|
||||
|
||||
|
||||
@pytest.mark.parametrize('version_str,expected_version', [
|
||||
('Cray C : Version 8.4.6 Mon Apr 15, 2019 12:13:39\n', '8.4.6'),
|
||||
('Cray C++ : Version 8.4.6 Mon Apr 15, 2019 12:13:45\n', '8.4.6'),
|
||||
('Cray Fortran : Version 8.4.6 Mon Apr 15, 2019 12:13:55\n', '8.4.6')
|
||||
])
|
||||
def test_cce_version_detection(version_str, expected_version):
|
||||
version = spack.compilers.cce.Cce.extract_version_from_output(version_str)
|
||||
assert version == expected_version
|
||||
|
Loading…
Reference in New Issue
Block a user