diff --git a/src/integrationtest/data_classes.py b/src/integrationtest/data_classes.py index 2b1ad5c..dc47dae 100755 --- a/src/integrationtest/data_classes.py +++ b/src/integrationtest/data_classes.py @@ -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 diff --git a/src/integrationtest/integrationtest_drunc.py b/src/integrationtest/integrationtest_drunc.py index 63189a2..0cf9928 100755 --- a/src/integrationtest/integrationtest_drunc.py +++ b/src/integrationtest/integrationtest_drunc.py @@ -8,6 +8,7 @@ from integrationtest.integrationtest_commandline import file_exists from integrationtest.data_classes import ( CreateConfigResult, + ProcessManagerChoice, config_substitution, attribute_substitution, relationship_substitution, @@ -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 @@ -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 @@ -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)]