From 9048996ba154755a57a4a29c046254ca0d3b43ca Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Thu, 21 May 2026 12:02:32 -0500 Subject: [PATCH 1/2] Modified the integtest to support user-requested deletion of HDF5 files at the end of the test. --- integtest/iceberg_real_hsi_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/integtest/iceberg_real_hsi_test.py b/integtest/iceberg_real_hsi_test.py index 6132d51..64ce5be 100644 --- a/integtest/iceberg_real_hsi_test.py +++ b/integtest/iceberg_real_hsi_test.py @@ -15,8 +15,8 @@ import integrationtest.data_file_checks as data_file_checks import integrationtest.log_file_checks as log_file_checks -import integrationtest.basic_checks as basic_checks import integrationtest.data_classes as data_classes +import integrationtest.utility_functions as utility_functions from integrationtest.verbosity_helper import IntegtestVerbosityLevels import functools @@ -148,7 +148,7 @@ def test_dunerc_success(run_dunerc, caplog): pytest.skip(f"The connectivity service must be running for this test.") # check for run control success, problems during pytest setup, etc. - basic_checks.basic_checks(run_dunerc, caplog, print_test_name=True) + utility_functions.basic_checks(run_dunerc, caplog, print_test_name=True) def test_log_files(run_dunerc): if not we_are_running_on_an_iceberg_computer: @@ -197,3 +197,6 @@ def test_data_files(run_dunerc): # ### also test the expected trigger bit ### + +def test_cleanup(run_dunerc): + utility_functions.remove_hdf5_files_if_requested(run_dunerc, this_test_requests_hdf5_file_removal=False) From 113bff76c77c2b6b4095bd62c9973547dc79006b Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Thu, 21 May 2026 14:20:01 -0500 Subject: [PATCH 2/2] Updated the new cleanup test in iceberg_real_hsi_test.py to check for conditions that cause the integtest to be skipped. --- integtest/iceberg_real_hsi_test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/integtest/iceberg_real_hsi_test.py b/integtest/iceberg_real_hsi_test.py index 64ce5be..0eb0258 100644 --- a/integtest/iceberg_real_hsi_test.py +++ b/integtest/iceberg_real_hsi_test.py @@ -199,4 +199,11 @@ def test_data_files(run_dunerc): def test_cleanup(run_dunerc): + if not we_are_running_on_an_iceberg_computer: + pytest.skip(f"This computer ({hostname}) is not part of the ICEBERG DAQ cluster and therefore can not run this test.") + if not the_global_timing_session_is_running: + pytest.skip("The global timing session is not running.") + if not the_connection_server_is_running: + pytest.skip(f"The connectivity service must be running for this test.") + utility_functions.remove_hdf5_files_if_requested(run_dunerc, this_test_requests_hdf5_file_removal=False)