taucmdr.cli.commands.tests.test_initialize module¶
Test functions.
Functions used for unit tests of initialize.py.
- class taucmdr.cli.commands.tests.test_initialize.DarwinInitializeTest(methodName='runTest')[source]¶
Bases:
DarwinTestCaseUnit tests for taucmdr initialize on macOS
- _classSetupFailed = False¶
- _class_cleanups = []¶
- class taucmdr.cli.commands.tests.test_initialize.InitializeTest(methodName='runTest')[source]¶
Bases:
TestCaseUnit tests for taucmdr initialize
- _classSetupFailed = False¶
- _class_cleanups = []¶
- class taucmdr.cli.commands.tests.test_initialize.PathTauTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for the TAU on PATH that tau initialize suggests instead of building its own.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- _path_tau(argv: list[str]) tuple[list[str], str][source]¶
Put a Spack-style TAU on PATH and parse argv.
The TAU’s
<prefix>/binand<prefix>/libare links into<prefix>/x86_64, as Spack makes them.- Returns:
The makefiles tau initialize would suggest, and the real path of the TAU’s one makefile.
- Return type:
- class taucmdr.cli.commands.tests.test_initialize.PopulateProjectTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for which default measurements tau initialize creates and selects.
The command objects and storage are mocked so only the decision logic runs; nothing is created and TAU is not built. The instrumentation flags are passed explicitly because their parser defaults depend on the host OS.
- _ARGV = ['--project-name', 'proj1', '--target-name', 'targ1', '--application-name', 'app1', '--source-inst', 'automatic', '--compiler-inst', 'fallback']¶
- _classSetupFailed = False¶
- _class_cleanups = []¶
- _populate(argv, binutils='download', target_os=<taucmdr.cf.platforms.OperatingSystem object>)[source]¶
Run _populate_project() and return (measurement args by name, selected measurement name).
- test_all_measurements()[source]¶
Sampling, source, compiler, and trace measurements are all created; sampling is selected.
- test_darwin_target_ignores_binutils()[source]¶
A Darwin target never uses binutils, so its absence keeps sampling and compiler instrumentation.
- test_trace_only()[source]¶
Profiling disabled: no baseline, only the trace measurement, which is selected.
- test_without_binutils()[source]¶
No binutils: sampling and compiler instrumentation are disabled but source instrumentation stays.