diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2019-04-16 03:01:42 -0500 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2019-04-16 10:01:42 +0200 |
commit | dbfa928cdb0ec00e07d9d22d0eabb7c2a9452626 (patch) | |
tree | 00b56f57ba924bdae89841d17cb15c08d0831343 /lib/spack | |
parent | 5f74f22dc6eb9a337a881fc7550bd2e320406f00 (diff) | |
download | spack-dbfa928cdb0ec00e07d9d22d0eabb7c2a9452626.tar.gz spack-dbfa928cdb0ec00e07d9d22d0eabb7c2a9452626.tar.bz2 spack-dbfa928cdb0ec00e07d9d22d0eabb7c2a9452626.tar.xz spack-dbfa928cdb0ec00e07d9d22d0eabb7c2a9452626.zip |
Add unit tests for Cray compiler detection (#11191)
Diffstat (limited to 'lib/spack')
-rw-r--r-- | lib/spack/spack/test/compilers.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/spack/spack/test/compilers.py b/lib/spack/spack/test/compilers.py index a6e5f824a9..2d3b05a7fa 100644 --- a/lib/spack/spack/test/compilers.py +++ b/lib/spack/spack/test/compilers.py @@ -13,6 +13,7 @@ import spack.compiler 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 |