Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/integrationtest/data_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,9 @@ class CreateConfigResult:
data_dirs: list[str]
tpstream_data_dirs: list[str]
trmon_data_dirs: list[str]


# 29-Dec-2025, KAB: added support for different run control process managers
@dataclass
class ProcessManagerChoice:
pm_type: str
18 changes: 16 additions & 2 deletions src/integrationtest/integrationtest_drunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from integrationtest.integrationtest_commandline import file_exists
from integrationtest.data_classes import (
CreateConfigResult,
ProcessManagerChoice,
config_substitution,
attribute_substitution,
relationship_substitution,
Expand Down Expand Up @@ -71,10 +72,23 @@ def pytest_generate_tests(metafunc):
# and parametrize the fixtures here in pytest_generate_tests,
# which is run at pytest startup

# 29-Dec-2025, KAB: added default process manager choice
if not hasattr(metafunc.module, "process_manager_choices"):
metafunc.module.process_manager_choices = { "StandAloneSSH_PM" : {"pm_type": "ssh-standalone"} }

parametrize_fixture_with_items(metafunc, "create_config_files", "confgen_arguments")
parametrize_fixture_with_items(metafunc, "process_manager_type", "process_manager_choices")
parametrize_fixture_with_items(metafunc, "run_nanorc", "nanorc_command_list")


# 29-Dec-2025, KAB: added fixture to handle different process manager choices
@pytest.fixture(scope="module")
def process_manager_type(request, tmp_path_factory):
result = ProcessManagerChoice (
pm_type = request.param["pm_type"]
)
yield result

@pytest.fixture(scope="module")
def create_config_files(request, tmp_path_factory):
"""Run the confgen to produce the configuration json files
Expand Down Expand Up @@ -295,7 +309,7 @@ def apply_update(obj, substitution):


@pytest.fixture(scope="module")
def run_nanorc(request, create_config_files, tmp_path_factory):
def run_nanorc(request, create_config_files, process_manager_type, tmp_path_factory):
"""Run nanorc with the OKS DB files created by `create_config_files`. The
commands specified by the `nanorc_command_list` variable in the
test module are executed. If `nanorc_command_list`'s items are
Expand Down Expand Up @@ -465,7 +479,7 @@ class RunResult:
result.completed_process = subprocess.run(
[nanorc]
+ nanorc_option_strings
+ [str("ssh-standalone")]
+ [str(process_manager_type.pm_type)] # 29-Dec-2025, KAB: support for ProcMgr choices
+ [str(create_config_files.config_file)]
+ [str(create_config_files.config.session)]
+ [str(create_config_files.config.session_name if create_config_files.config.session_name else create_config_files.config.session)]
Expand Down