Skip to content

Introduce --skip-resource-checks parameter#144

Open
eflumerf wants to merge 1 commit intokbiery/recommended_resource_checkingfrom
eflumerf/SkipResourceChecks
Open

Introduce --skip-resource-checks parameter#144
eflumerf wants to merge 1 commit intokbiery/recommended_resource_checkingfrom
eflumerf/SkipResourceChecks

Conversation

@eflumerf
Copy link
Member

Description

Implement resource checking and test skipping as a fixture required before generating a configuration.
With this set of changes, tests specify their recommended and required system resources via a "resource_validator" object, which the check_system_resources fixture uses to determine if sufficient resources are present on the system. The user can, however, pass the --skip-resource-checks parameter to pytest, forcing the tests to run regardless.

Type of change

  • New feature or enhancement (non-breaking change which adds functionality)

Testing checklist

  • Minimal system quicktest passes (pytest -s minimal_system_quick_test.py)
  • Full set of integration tests pass (dunedaq_integtest_bundle.sh)

On a virtual machine with dynamic memory (so the free memory is always a low value):
daqsystemtest_integtest_bundle.sh

...
🔵 Starting test 9 of 9... 🔵
⮕ Running example_system_test.py ⬅
============================= test session starts ==============================
platform linux -- Python 3.12.12, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/eflumerf/Desktop/dune-daq-base/dev-recommendedspecs-260213/sourcecode/daqsystemtest
configfile: pytest.ini
plugins: anyio-4.12.1, integrationtest-3.6.0

DEBUG: CPU count is 32, required number is 30, recommended number is 60
DEBUG: Free memory is 1.25 GB, required amount is 15, recommended amount is 24
DEBUG: Free disk space on "/tmp" is 65.87333679199219 GB, required amount is 1
collected 6 items

sourcecode/daqsystemtest/integtest/example_system_test.py
🟡 This computer (ironvirt9) does not have enough resources to run this test.
 * Free memory is 1.25 GB, required amount is 15.
ssssss

============================== 6 skipped in 0.35s ==============================


+++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ SUMMARY ++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++

Fri Feb 13 03:35:49 PM CST 2026
Log file is: /tmp/pytest-of-eflumerf/daqsystemtest_integtest_bundle_20260213153542.log

⮕ Running minimal_system_quick_test.py ⬅
============================== 4 skipped 🟡 in 1.01s ==============================
⮕ Running readout_type_scan_test.py ⬅
============================= 27 skipped 🟡 in 0.36s ==============================
⮕ Running 3ru_3df_multirun_test.py ⬅
============================== 6 skipped 🟡 in 0.35s ==============================
⮕ Running small_footprint_quick_test.py ⬅
============================== 3 skipped 🟡 in 0.35s ==============================
⮕ Running fake_data_producer_test.py ⬅
============================== 6 skipped 🟡 in 0.35s ==============================
⮕ Running long_window_readout_test.py ⬅
============================== 4 skipped 🟡 in 0.33s ==============================
⮕ Running 3ru_1df_multirun_test.py ⬅
============================== 6 skipped 🟡 in 0.37s ==============================
⮕ Running tpstream_writing_test.py ⬅
============================== 4 skipped 🟡 in 0.38s ==============================
⮕ Running example_system_test.py ⬅
============================== 6 skipped 🟡 in 0.35s ==============================

daqsystemtest_integtest_bundle.sh --skip-resource-checks -f0 -l0

...
========================= 4 passed in 60.89s (0:01:00) =========================


+++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++ SUMMARY ++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++

Fri Feb 13 03:37:56 PM CST 2026
Log file is: /tmp/pytest-of-eflumerf/daqsystemtest_integtest_bundle_20260213153654.log

⮕ Running minimal_system_quick_test.py ⬅
========================= 4 passed ✅ in 60.89s (0:01:00) =========================
((dbt) ) [eflumerf@ironvirt9 dev-recommendedspecs-260213]$

and test skipping as a fixture required before generating a
configuration.
@eflumerf eflumerf requested a review from bieryAtFnal February 13, 2026 21:40
@eflumerf eflumerf self-assigned this Feb 13, 2026
@eflumerf eflumerf added the enhancement New feature or request label Feb 13, 2026
@eflumerf
Copy link
Member Author

I also added "require_host_match" and "require_host_connectivity" tests for later inclusion in tests like "sample_ehn1_multihost_test.py"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant