taucmdr.cf.software.tests.test_tau_installation module¶
Test functions.
Functions used for unit tests of tau_installation.py.
- class taucmdr.cf.software.tests.test_tau_installation.CompilerOptionsTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for the TAU_OPTIONS given to TAU’s compiler wrappers.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- class taucmdr.cf.software.tests.test_tau_installation.CompleteNightlyNamesTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for
complete_nightly_names.- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_copy_replaced()[source]¶
A copy of a dated archive under the plain name is replaced by a link to the newest.
- test_download()[source]¶
A download under the plain name is dated by its modification time, and the plain name links to it.
- class taucmdr.cf.software.tests.test_tau_installation.ExportDynamicConfigureTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for exporting TAU’s symbols from statically linked applications, which TAU’s plugins call.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- class taucmdr.cf.software.tests.test_tau_installation.LauncherAppfileTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for rewriting launcher application files (mpirun –app, srun –multi-prog) to use tau_exec.
- _TAU_EXEC = ['tau_exec', '-T', 'mpi']¶
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_appfile_flag_with_equals()[source]¶
The –flag=file spelling is rewritten in place, keeping the equals form.
- test_line_without_executable_rejected()[source]¶
A command line that names no executable is a configuration error, not silently passed through.
- test_missing_appfile_flag_rejected()[source]¶
A space-separated flag at the end of the command has no value, so the command cannot be parsed.
- test_mpirun_appfile_rewritten()[source]¶
Each command line gets tau_exec in front of its executable; comments and blank lines are dropped.
- test_other_flags_with_equals_ignored()[source]¶
A –key=value flag that is not the application-file flag is skipped, not mistaken for it.
- test_rewritten_appfile_in_temporary_directory()[source]¶
The rewritten file goes to a new directory, never beside or over the user’s file, for any path form.
- class taucmdr.cf.software.tests.test_tau_installation.NightlyInstallTagTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for the installation tag and source archive of a TAU nightly build.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_new_download()[source]¶
An archive just downloaded under the plain name is built instead of an older dated one.
- test_tag_from_built_archive()[source]¶
The tag has the TAU version of the archive that is built, not of an outdated archive under the plain name.
- test_undated_readonly()[source]¶
An archive only under the plain name in a read-only directory is dated by its modification time.
- class taucmdr.cf.software.tests.test_tau_installation.OmptConfigurationTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for the TAU configuration that measures OpenMP with OMPT.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_ompt_tags()[source]¶
An OMPT configuration asks only for the tags TAU puts in its makefile name.
- class taucmdr.cf.software.tests.test_tau_installation.PdtUseTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for when a TAU configuration uses PDT.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- class taucmdr.cf.software.tests.test_tau_installation.PythonBuildPathsTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for
python_build_paths.- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_free_threaded()[source]¶
For a free-threaded Python interpreter the library with ABI flags is chosen.
- test_python_build_paths()[source]¶
The header and library directories of the running Python and of /usr/bin/python3 are found.
- test_python_build_paths_no_headers()[source]¶
A Python without C headers, such as a distro Python without the corresponding development package, is refused.
- class taucmdr.cf.software.tests.test_tau_installation.RuntimeSelectFileTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for applying a select file when a dynamically linked application runs.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_filter_plugin()[source]¶
TAU’s filter plugin is loaded with the select file, alongside any other plugin.
- class taucmdr.cf.software.tests.test_tau_installation.TauConfigurationHashTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for what makes TAU configurations share a hash.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_uid_ignores_cpu_count()[source]¶
A TAU configured on one host matches the same configuration on a host with a different core count.
- class taucmdr.cf.software.tests.test_tau_installation.TauInstallationTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for TauInstallation CUPTI detection and tagging.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- _make_cupti_header(*path_parts)[source]¶
Create a fake cupti_events.h under the per-test cuda tmpdir.
- test_find_cupti_returns_none_when_no_cuda_prefix()[source]¶
No cuda_prefix: returns None without touching filesystem.
- class taucmdr.cf.software.tests.test_tau_installation.TauMakefileTargetTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for
tau_makefile_target.- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_arch_syntax()[source]¶
TAU_ARCHis read as make reads it: the last setting wins, and#starts a comment.
- test_caf()[source]¶
TAU_F90=cafsets the coarray Fortran compiler tocafand the Fortran compiler to itsgfortran.
- test_cray_cc()[source]¶
A Cray
ccinFULL_CCis the host C compiler, though Cray’s UPC compiler is alsocc.The
ccwraps a GNUgcc, which is also a host C compiler, but the wrapper stays the C compiler.
- test_makefile_syntax()[source]¶
Lines without
=are skipped, and$(TAU_R)in a compiler path is expanded.
- test_makefile_variables()[source]¶
Variables are expanded as make does, comments are dropped, and the last setting wins.
TAU’s makefiles set
TAU_F90twice, the second time fromFULL_FORTRAN, which names the compiler TAU was configured with. A variable may be set after the line that uses it, and one that refers to itself expands to nothing.
- test_packages()[source]¶
Package directories in the makefile are used if they exist, and an empty one means no package.
A
TAU_ARCHthat several platforms share is the host’s; on another host the error lists them.
- class taucmdr.cf.software.tests.test_tau_installation.TauNightlySourceTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for the sources of a TAU installation given the ‘nightly’ keyword.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- class taucmdr.cf.software.tests.test_tau_installation.UnwinderConfigureTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for the stack unwinder options given to TAU’s configure.
- _CONFIGURE = ' if [ "x$unwinder" = "xlibunwind" ] ; then\n if [ %s ] ; then\n unwind_lib_flag="-framework#System"\n'¶
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_darwin_configure_maps_unwinder()[source]¶
On Apple silicon, TAU uses macOS’s own libunwind when its configure knows how to link it.
- test_darwin_configure_without_unwinder_mapping()[source]¶
On Apple silicon, TAU isn’t asked for libunwind when its configure would link a bare -lunwind.
- test_darwin_without_libunwind()[source]¶
On macOS, where TAU Commander provides no libunwind, TAU isn’t asked to link one.
- taucmdr.cf.software.tests.test_tau_installation._fake_python(headers=True, **config)[source]¶
Make a fake Python 3.99 installed in a new directory for testing purposes.
- taucmdr.cf.software.tests.test_tau_installation._has_headers(python_path)[source]¶
Return True if the Python interpreter at python_path has its C headers installed.
- taucmdr.cf.software.tests.test_tau_installation._script(path: str, body: str) str[source]¶
Write an executable shell script to path that runs body, and return path.