spack.test.compilers package

Submodules

spack.test.compilers.basics module

Test basic behavior of compilers in Spack

class spack.test.compilers.basics.MockCompiler

Bases: spack.compiler.Compiler

name
required_libs = ['libgfortran']
verbose_flag

This property should be overridden in the compiler subclass if a verbose flag is available.

If it is not overridden, it is assumed to not be supported.

version
spack.test.compilers.basics.call_compiler(exe, *args, **kwargs)
spack.test.compilers.basics.flag_value(flag, spec)
spack.test.compilers.basics.make_args_for_version(monkeypatch)
spack.test.compilers.basics.supported_flag_test(flag, flag_value_ref, spec=None)
spack.test.compilers.basics.test_all_compilers(config)
spack.test.compilers.basics.test_aocc_flags()
spack.test.compilers.basics.test_apple_clang_flags()
spack.test.compilers.basics.test_apple_clang_setup_environment(mock_executable, monkeypatch)

Test a code path that is taken only if the package uses Xcode on MacOS.

spack.test.compilers.basics.test_arm_flags()
spack.test.compilers.basics.test_cce_flags()
spack.test.compilers.basics.test_clang_flags()
spack.test.compilers.basics.test_compiler_executable_verification_raises(tmpdir)
spack.test.compilers.basics.test_compiler_executable_verification_success(tmpdir)
spack.test.compilers.basics.test_compiler_flags_from_config_are_grouped()
spack.test.compilers.basics.test_compiler_flags_use_real_version(working_env, monkeypatch, tmpdir)
spack.test.compilers.basics.test_compiler_get_real_version(working_env, monkeypatch, tmpdir)
spack.test.compilers.basics.test_compiler_get_real_version_fails(working_env, monkeypatch, tmpdir)
spack.test.compilers.basics.test_default_flags()
spack.test.compilers.basics.test_detecting_mixed_toolchains(compiler_spec, expected_result, config)
spack.test.compilers.basics.test_fj_flags()
spack.test.compilers.basics.test_gcc_flags()
spack.test.compilers.basics.test_get_compiler_duplicates(config)
spack.test.compilers.basics.test_implicit_rpaths(dirs_with_libfiles, monkeypatch)
spack.test.compilers.basics.test_intel_flags()
spack.test.compilers.basics.test_multiple_conflicting_compiler_definitions(mutable_config)
spack.test.compilers.basics.test_nag_flags()
spack.test.compilers.basics.test_nvhpc_flags()
spack.test.compilers.basics.test_oneapi_flags()
spack.test.compilers.basics.test_pgi_flags()
spack.test.compilers.basics.test_raising_if_compiler_target_is_over_specific(config)
spack.test.compilers.basics.test_version_detection_is_empty(make_args_for_version, input_version, expected_version, expected_error)
spack.test.compilers.basics.test_xcode_not_available(xcode_select_output, mock_executable, monkeypatch)
spack.test.compilers.basics.test_xl_flags()
spack.test.compilers.basics.test_xl_r_flags()
spack.test.compilers.basics.unsupported_flag_test(flag, spec=None)

spack.test.compilers.detection module

Test detection of compiler version

spack.test.compilers.detection.test_aocc_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_apple_clang_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_arm_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_cce_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_clang_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_cray_frontend_compiler_detection(compiler, version, tmpdir, monkeypatch, working_env)

Test that the Cray frontend properly finds compilers form modules

spack.test.compilers.detection.test_fj_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_gcc_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_intel_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_nag_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_nvhpc_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_oneapi_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_pgi_version_detection(version_str, expected_version)
spack.test.compilers.detection.test_xl_version_detection(version_str, expected_version)

Module contents