Skip to content
Merged
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
30 changes: 30 additions & 0 deletions src/integrationtest/integrationtest_drunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from daqconf.get_session_apps import get_segment_apps
import time
import random
import json


def parametrize_fixture_with_items(metafunc, fixture, itemsname):
Expand Down Expand Up @@ -310,6 +311,35 @@ def run_nanorc(request, create_config_files, tmp_path_factory):

run_dir = tmp_path_factory.mktemp("run")

# 15-Dec-2025, KAB: if one of our integtest bundle scripts has provided information
# about itself in the execution environment of the currently running test, use that
# information to create a file in the 'run' directory of the test. This is used by the
# bundle script to locate which pytest directory on disk matches the running of which test.
try:
bundle_script_info = os.environ["DUNEDAQ_INTEGTEST_BUNDLE_INFO"]
info_list = bundle_script_info.split(';')
if (len(info_list) == 3):
bundle_info_data = {
"description": "This file was automatically generated by the DUNE DAQ integrationtest infrastructure. It contains information about the 'bundle' script that ran this test.",
"bundle_script_start_time": info_list[0],
"bundle_script_process_id": info_list[1],
"individual_test_start_time": info_list[2]
}
bundle_file_name = f"{run_dir}/bundle_script_info.json"
try:
with open(f"{bundle_file_name}", "w") as info_file:
json.dump(bundle_info_data, info_file, indent=2)
except FileNotFoundError:
print(f"\n*** Warning: unable to write bundle info data to file {bundle_file_name}")
else:
print("\n*** Warning: the DUNEDAQ_INTEGTEST_BUNDLE_INFO env var is set, but it doesn't seem")
print( " to contain the expected 3 values that are used to help bundle scripts match")
print( " pytest directories to individual tests that are run.")
print( f" Contents of the env var: '{bundle_script_info}'")
except KeyError:
# if the expected env var is not set, we simply don't create the bundle info file
pass

connsvc_obj = None
if (
not disable_connectivity_service
Expand Down