summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gcc/detection_test.yaml38
-rw-r--r--var/spack/repos/builtin/packages/intel/detection_test.yaml19
-rw-r--r--var/spack/repos/builtin/packages/llvm/detection_test.yaml56
3 files changed, 113 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/detection_test.yaml b/var/spack/repos/builtin/packages/gcc/detection_test.yaml
new file mode 100644
index 0000000000..0930f82d93
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gcc/detection_test.yaml
@@ -0,0 +1,38 @@
+paths:
+ # Ubuntu 18.04, system compilers without Fortran
+ - layout:
+ - executables:
+ - "bin/gcc"
+ - "bin/g++"
+ script: "echo 7.5.0"
+ results:
+ - spec: "gcc@7.5.0 languages=c,c++"
+ # Mock a version < 7 of GCC that requires -dumpversion and
+ # errors with -dumpfullversion
+ - layout:
+ - executables:
+ - "bin/gcc-5"
+ - "bin/g++-5"
+ - "bin/gfortran-5"
+ script: |
+ if [[ "$1" == "-dumpversion" ]] ; then
+ echo "5.5.0"
+ else
+ echo "gcc-5: fatal error: no input files"
+ echo "compilation terminated."
+ exit 1
+ fi
+ results:
+ - spec: "gcc@5.5.0 languages=c,c++,fortran"
+ # Multiple compilers present at the same time
+ - layout:
+ - executables:
+ - "bin/x86_64-linux-gnu-gcc-6"
+ script: 'echo 6.5.0'
+ - executables:
+ - "bin/x86_64-linux-gnu-gcc-10"
+ - "bin/x86_64-linux-gnu-g++-10"
+ script: "echo 10.1.0"
+ results:
+ - spec: "gcc@6.5.0 languages=c"
+ - spec: "gcc@10.1.0 languages=c,c++"
diff --git a/var/spack/repos/builtin/packages/intel/detection_test.yaml b/var/spack/repos/builtin/packages/intel/detection_test.yaml
new file mode 100644
index 0000000000..076bfeaaba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel/detection_test.yaml
@@ -0,0 +1,19 @@
+paths:
+ - layout:
+ - executables:
+ - "bin/intel64/icc"
+ script: |
+ echo "icc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "bin/intel64/icpc"
+ script: |
+ echo "icpc (ICC) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ - executables:
+ - "bin/intel64/ifort"
+ script: |
+ echo "ifort (IFORT) 18.0.5 20180823"
+ echo "Copyright (C) 1985-2018 Intel Corporation. All rights reserved."
+ results:
+ - spec: 'intel@18.0.5'
diff --git a/var/spack/repos/builtin/packages/llvm/detection_test.yaml b/var/spack/repos/builtin/packages/llvm/detection_test.yaml
new file mode 100644
index 0000000000..48e9d6751a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/llvm/detection_test.yaml
@@ -0,0 +1,56 @@
+paths:
+ - layout:
+ - executables:
+ - "bin/clang-3.9"
+ script: |
+ echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)"
+ echo "Target: x86_64-pc-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /usr/bin"
+ - executables:
+ - "bin/clang++-3.9"
+ script: |
+ echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)"
+ echo "Target: x86_64-pc-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /usr/bin"
+ results:
+ - spec: 'llvm@3.9.1 +clang~lld~lldb'
+ # Multiple LLVM packages in the same prefix
+ - layout:
+ - executables:
+ - "bin/clang-8"
+ - "bin/clang++-8"
+ script: |
+ echo "clang version 8.0.0-3~ubuntu18.04.2 (tags/RELEASE_800/final)"
+ echo "Target: x86_64-pc-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /usr/bin"
+ - executables:
+ - "bin/ld.lld-8"
+ script: 'echo "LLD 8.0.0 (compatible with GNU linkers)"'
+ - executables:
+ - "bin/lldb"
+ script: 'echo "lldb version 8.0.0"'
+ - executables:
+ - "bin/clang-3.9"
+ - "bin/clang++-3.9"
+ script: |
+ echo "clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)"
+ echo "Target: x86_64-pc-linux-gnu"
+ echo "Thread model: posix"
+ echo "InstalledDir: /usr/bin"
+ results:
+ - spec: 'llvm@8.0.0+clang+lld+lldb'
+ - spec: 'llvm@3.9.1+clang~lld~lldb'
+ # Apple Clang should not be detected
+ - layout:
+ - executables:
+ - "bin/clang"
+ - "bin/clang++"
+ script: |
+ echo "Apple clang version 11.0.0 (clang-1100.0.33.8)"
+ echo "Target: x86_64-apple-darwin19.5.0"
+ echo "Thread model: posix"
+ echo "InstalledDir: /Library/Developer/CommandLineTools/usr/bin"
+ results: []