diff --git a/integtest/3ru_1df_multirun_test.py b/integtest/3ru_1df_multirun_test.py index 5c2243e..cc3986f 100644 --- a/integtest/3ru_1df_multirun_test.py +++ b/integtest/3ru_1df_multirun_test.py @@ -180,7 +180,7 @@ # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/3ru_3df_multirun_test.py b/integtest/3ru_3df_multirun_test.py index 427eed6..26c2b23 100644 --- a/integtest/3ru_3df_multirun_test.py +++ b/integtest/3ru_3df_multirun_test.py @@ -208,7 +208,7 @@ # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/example_system_test.py b/integtest/example_system_test.py index 2f56e20..d51193f 100755 --- a/integtest/example_system_test.py +++ b/integtest/example_system_test.py @@ -147,7 +147,7 @@ def host_is_at_ehn1(hostname): # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/fake_data_producer_test.py b/integtest/fake_data_producer_test.py index 961b9ca..51c656b 100644 --- a/integtest/fake_data_producer_test.py +++ b/integtest/fake_data_producer_test.py @@ -122,7 +122,7 @@ # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/long_window_readout_test.py b/integtest/long_window_readout_test.py index 4bbe5b2..ef9bf80 100644 --- a/integtest/long_window_readout_test.py +++ b/integtest/long_window_readout_test.py @@ -192,7 +192,7 @@ # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/minimal_system_quick_test.py b/integtest/minimal_system_quick_test.py index a973f8d..4c13fc2 100644 --- a/integtest/minimal_system_quick_test.py +++ b/integtest/minimal_system_quick_test.py @@ -110,15 +110,15 @@ confgen_arguments = {"MinimalSystem": conf_dict} # The commands to run in nanorc, as a list nanorc_command_list = ( - "boot conf start --run-number 101 wait 1 enable-triggers wait ".split() - + [str(run_duration)] - + "disable-triggers wait 2 drain-dataflow wait 2 stop-trigger-sources stop scrap terminate".split() - ) + "boot conf start --run-number 101 wait 1 enable-triggers wait ".split() + + [str(run_duration)] + + "disable-triggers wait 2 drain-dataflow wait 2 stop-trigger-sources stop scrap terminate".split() +) # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/readout_type_scan_test.py b/integtest/readout_type_scan_test.py index ad991b6..e80e087 100644 --- a/integtest/readout_type_scan_test.py +++ b/integtest/readout_type_scan_test.py @@ -309,7 +309,7 @@ # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/sample_ehn1_multihost_test.py b/integtest/sample_ehn1_multihost_test.py old mode 100755 new mode 100644 diff --git a/integtest/small_footprint_quick_test.py b/integtest/small_footprint_quick_test.py index 539b53a..d3c932b 100644 --- a/integtest/small_footprint_quick_test.py +++ b/integtest/small_footprint_quick_test.py @@ -112,7 +112,7 @@ # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/tpg_state_collection_test.py b/integtest/tpg_state_collection_test.py index 44ce5b1..34b6d35 100644 --- a/integtest/tpg_state_collection_test.py +++ b/integtest/tpg_state_collection_test.py @@ -214,7 +214,7 @@ # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/tpreplay_test.py b/integtest/tpreplay_test.py index 877eeb9..4cfc910 100644 --- a/integtest/tpreplay_test.py +++ b/integtest/tpreplay_test.py @@ -255,7 +255,7 @@ def _cleanup_tmpdir(): ### Tests # Run control -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/tpstream_writing_test.py b/integtest/tpstream_writing_test.py index 594f76c..5b5791d 100644 --- a/integtest/tpstream_writing_test.py +++ b/integtest/tpstream_writing_test.py @@ -193,7 +193,7 @@ # The tests themselves -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/integtest/trigger_bitwords_test.py b/integtest/trigger_bitwords_test.py index 7459394..146f932 100644 --- a/integtest/trigger_bitwords_test.py +++ b/integtest/trigger_bitwords_test.py @@ -255,7 +255,7 @@ ### Tests # Run control -def test_nanorc_success(run_nanorc, capsys): +def test_nanorc_success(run_nanorc): # print the name of the current test current_test = os.environ.get("PYTEST_CURRENT_TEST") match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index c2b96b7..921e401 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -24,7 +24,7 @@ Options: --concise-output : suppresses run control and DAQApp messages in order to focus on test results --tmpdir : specifies a root directory to use for test output, e.g. a directory instead of '/tmp' --list-only : list the tests that match the requested patterns without running them - --skip-resource-checks: Skips the CPU/Memory/Disk resource checks, forcing tests to run + --pytest-options : string with one or more command-line options to pass to Pytest (verbatim) """ } @@ -43,7 +43,7 @@ CaptureOutput() { tee -a $1 } -GETOPT_TEMP=`getopt -o hr:k:x:n:N: --long help,stop-on-failure,concise-output,include:,exclude:,tmpdir:,list-only,skip-resource-checks -- "$@"` +GETOPT_TEMP=`getopt -o hr:k:x:n:N: --long help,stop-on-failure,concise-output,include:,exclude:,tmpdir:,list-only,pytest-options: -- "$@"` if [ $? -ne 0 ]; then exit 1 fi @@ -118,7 +118,8 @@ while true; do shift ;; --concise-output) - PYTEST_COMMAND="`echo ${PYTEST_COMMAND} | sed 's/ -s//'`" # remove the -s option to turn off messages from DAQ processes + # replace the pytest "-s" option with "-rs" to suppress all output except pytest.skip messages + PYTEST_COMMAND="`echo ${PYTEST_COMMAND} | sed 's/ -s/ -rs/'`" shift ;; --tmpdir) @@ -126,9 +127,9 @@ while true; do export PYTEST_DEBUG_TEMPROOT=${tmpdir_root} shift 2 ;; - --skip-resource-checks) - PYTEST_COMMAND="${PYTEST_COMMAND} --skip-resource-checks" # Add the --skip-resource-checks pytest option - shift + --pytest-options) + PYTEST_COMMAND="${PYTEST_COMMAND} $2" # Add the specified options to the pytest command + shift 2 ;; --list-only) only_list_tests="yes"