From 4f212e5054ba60808ee6383238d5fe3ffb73a70a Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 10 Jun 2026 15:37:23 -0500 Subject: [PATCH 1/2] Added support in integrationtest_drunc.py for finding a predefined configuration files in one of the paths listed in the DUNEDAQ_DB_PATH env var. --- src/integrationtest/integrationtest_drunc.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/integrationtest/integrationtest_drunc.py b/src/integrationtest/integrationtest_drunc.py index 233d0b6..fd9ac90 100755 --- a/src/integrationtest/integrationtest_drunc.py +++ b/src/integrationtest/integrationtest_drunc.py @@ -234,11 +234,21 @@ def create_config_files(request, tmp_path_factory, check_system_resources): if isinstance(integtest_params, integtest_params_for_predefined_dunedaq_config): integtest_conf = integtest_params.predefined_config_db - if file_exists(integtest_conf): + # 10-Jun-2026, KAB: added support for finding the specified config_db file + # in one of the directories listed in the DUNEDAQ_DB_PATH env var + found_file = file_exists(integtest_conf) + if not found_file: + try: + path_string = os.environ["DUNEDAQ_DB_PATH"] + directories = path_string.split(":") + found_file = any((pathlib.Path(dd) / integtest_conf).is_file() for dd in directories if dd) + except KeyError: + pass + if found_file: print(f"Integtest preconfigured config file: {integtest_conf}") consolidate_files(str(temp_config_db), integtest_conf) else: - fail_msg = f"The file containing the predefined dunedaq configuration \"{integtest_conf}\" could not be found." + fail_msg = f"The file containing the predefined dunedaq configuration \"{integtest_conf}\" could not be found either from its absolute location or in any of the paths in DUNEDAQ_DB_PATH." pytest.fail(fail_msg, pytrace=False) else: dro_map_file = config_dir / "ReadoutMap.data.xml" From 39177857665c2b2599f875711458a0e80d624bf0 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 10 Jun 2026 16:36:52 -0500 Subject: [PATCH 2/2] updated the handling of pre-defined DUNEDAQ config files in integrationtest_drunc.py to strip off any leading slash when checking for the preseence of the files in the DB path --- src/integrationtest/integrationtest_drunc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/integrationtest/integrationtest_drunc.py b/src/integrationtest/integrationtest_drunc.py index fd9ac90..f915d0e 100755 --- a/src/integrationtest/integrationtest_drunc.py +++ b/src/integrationtest/integrationtest_drunc.py @@ -239,6 +239,9 @@ def create_config_files(request, tmp_path_factory, check_system_resources): found_file = file_exists(integtest_conf) if not found_file: try: + # the name of a file somewhere in the DB path shouldn't have a leading slash, + # so we'll provide that little bit of helpfulness here + integtest_conf = integtest_conf.lstrip("/") path_string = os.environ["DUNEDAQ_DB_PATH"] directories = path_string.split(":") found_file = any((pathlib.Path(dd) / integtest_conf).is_file() for dd in directories if dd)