taucmdr.cli.commands.target.tests.test_create module

Test functions.

Functions used for unit tests of create.py.

class taucmdr.cli.commands.target.tests.test_create.CreateTest(methodName='runTest')[source]

Bases: TestCase

Tests for target.create.

_assert_from_makefile(prefix: str, makefile: str) → None[source]

Create a target from makefile and check it uses the TAU installed at prefix on this host.

_classSetupFailed = False
_class_cleanups = []
test_cc_flag()[source]
test_create()[source]
test_cxx_as_cc_flag()[source]
test_duplicatename()[source]
test_h_arg()[source]
test_help_arg()[source]
test_host_family_intel()[source]
test_host_family_nvhpc()[source]
test_host_family_pgi()[source]
test_makefile_exec_prefix()[source]

The architecture comes from TAU_ARCH in the makefile, not the name of its directory.

test_makefile_generic_cc()[source]

A makefile’s cc is identified by the first compiler family that accepts it, not always Cray.

test_makefile_no_arch()[source]

A makefile without TAU_ARCH is refused, even in a directory named after a TAU architecture.

A makefile given through Spack’s <prefix>/lib link is found in its architecture directory.

test_makefile_unknown_arch()[source]

A makefile whose TAU_ARCH names no known TAU architecture is refused.

test_no_args()[source]
test_no_cuda()[source]
test_no_mpi()[source]
test_no_mpi_cc()[source]
test_ompt_tr4_tr6_rejected()[source]

The retired –ompt download-tr4/download-tr6 keywords are refused at parse time with a hint.

test_python_interpreter_versioned_path()[source]

A path to an interpreter named python3.<minor> is accepted.

test_versioned_name_on_path()[source]

A bare python3.<minor> is found on PATH and stored as an absolute path.

taucmdr.cli.commands.target.tests.test_create._tau_tree(arch_dir: str, tau_arch: str | None, spack_links: bool = False, extra: str = '') → tuple[str, str][source]

Make a TAU installation holding one makefile in arch_dir, with TAU_ARCH set to tau_arch if given.

The makefile ends with the lines in extra.

With spack_links, add the <prefix>/lib link to <arch_dir>/lib that Spack adds, and give the makefile’s path through that link, as Spack’s TAU_MAKEFILE does.

Returns:

The installation prefix and the makefile path to give --from-tau-makefile.

Return type:

tuple