From e3aa046d032617c3be1dbed24743025b91a906c1 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 21 Sep 2026 07:39:41 -0500 Subject: [PATCH 01/18] Updated the bundle script and the script that list integtests to use a simpler model for finding integtests, and to better handle python packages that were installed with the '-e' option. --- scripts/dunedaq_integtest_bundle.sh | 49 +++++++++----- scripts/list_available_integtests.sh | 94 ++++++++++++++++++++++----- scripts/list_repos_with_integtests.sh | 63 ++++++++---------- 3 files changed, 137 insertions(+), 69 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index b22fa4c..28a40e2 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -467,6 +467,7 @@ let number_of_individual_tests=${#filtered_integtest_list[@]} let total_number_of_tests=${number_of_individual_tests}*${individual_test_requested_iterations}*${full_set_requested_interations} # run the tests +base_rel_dir="" let overall_test_index=0 # this is only used for user feedback let full_set_loop_count=0 while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do @@ -496,20 +497,23 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do PYTEST_COMMAND+=("--junit-xml=${test_repo}_${test_name%.py}_results.xml" "--") fi + # In the following "if" statements, we trust that the DBT_AREA_ROOT env var is + # appropriately set in all types of software setups, whether the user created a local + # software area or they set up a base release without creating a local software area. + + # We also trust that the correct place to look for integtests in Python packages + # is under the $DBT_AREA_ROOT/.venv directory, independent of whether that env var + # points to a directory in a local software area or a base release. + # First, check if the test is found in the Python virtual environment. # This picks up tests from our Python-only software packages. + # ** add note ** if [[ "`ls ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name} 2>/dev/null`" != "" ]]; then PYTEST_COMMAND+=(${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name}) "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} - # Next, check if the test exists in the current working directory. - # This is a convenience for developers when they are working on an integtest - # in a C++ package (the test is found without rebuilding the software). - elif [[ -e "./${test_name}" ]]; then - PYTEST_COMMAND+=(./${test_name}) - "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} - - # Next, check if the test exists in the local software area. + # Next, check if the test exists in the "sourcecode" subdirectory, either in + # a local software area or a base release. elif [[ -e "${DBT_AREA_ROOT}/sourcecode/${test_repo}/integtest/${test_name}" ]]; then if [[ -w "${DBT_AREA_ROOT}" ]]; then PYTEST_COMMAND+=(${DBT_AREA_ROOT}/sourcecode/${test_repo}/integtest/${test_name}) @@ -523,16 +527,29 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} fi - # Lastly, we assume that the test can be found in the installed software - # area (for C++ packages). else - share_envvar_name="${test_repo^^}_SHARE" # double caret converts env var to uppercase - # remove any trailing "--" in PYTEST_COMMAND since we are adding more pytest options here - if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then - unset 'PYTEST_COMMAND[-1]' + # Next, check if the test exists in the base release sourcecode area + if [[ "${base_rel_dir}" == "" ]]; then + dbt_info_output=`dbt-info release` + base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` + fi + if [[ -e "${base_rel_dir}/sourcecode/${test_repo}/integtest/${test_name}" ]]; then + # remove any trailing "--" in PYTEST_COMMAND since we are adding more pytest options here + if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then + unset 'PYTEST_COMMAND[-1]' + fi + PYTEST_COMMAND+=(-p no:cacheprovider --no-summary ${base_rel_dir}/sourcecode/${test_repo}/integtest/${test_name}) + "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} + elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${test_repo}/src/${test_repo}/integtest/${test_name}" ]]; then + echo "" + echo -e "\U1f7e1 WARNING: The ${test_name} test was not found in the Python virtual environment (.venv dir)." + echo -e "\U1f7e1 WARNING: This can happen when the Python package is installed with the '-e' option." + echo -e "\U1f7e1 WARNING: Please try installing the ${test_repo} package without the '-e' option." + else + echo "" + echo -e "\U0001F534 ERROR: Unable to find the ${test_name} test in the ${test_repo} repo." + echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." fi - PYTEST_COMMAND+=(-p no:cacheprovider --no-summary ${!share_envvar_name}/integtest/${test_name}) - "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} fi let pytest_return_code=${PIPESTATUS[0]} diff --git a/scripts/list_available_integtests.sh b/scripts/list_available_integtests.sh index ee2abc3..a98c631 100755 --- a/scripts/list_available_integtests.sh +++ b/scripts/list_available_integtests.sh @@ -38,6 +38,70 @@ string_in_list() { return 1 } +# function to find integtests in a local sourcecode area +list_local_sourcecode_tests() { + # check if a local software area exists; return empty list if not + if [[ "$DBT_AREA_ROOT" == "" ]] || [[ "`echo $DBT_AREA_ROOT | grep '^/cvmfs'`" != "" ]]; then + return 1 + fi + local repo_name="$1" + tmp_list=(`ls -1 ${DBT_AREA_ROOT}/sourcecode/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + if [[ ${#tmp_list[@]} -gt 0 ]]; then + integtest_list=(${tmp_list[@]}) + return 0 + fi + return 1 +} + +# function to find integtests in a local pythoncode area +list_local_pythoncode_tests() { + # check if a local software area exists; return empty list if not + if [[ "$DBT_AREA_ROOT" == "" ]] || [[ "`echo $DBT_AREA_ROOT | grep '^/cvmfs'`" != "" ]]; then + return 1 + fi + local repo_name="$1" + tmp_list=(`ls -1 ${DBT_AREA_ROOT}/pythoncode/${repo_name}/src/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + if [[ ${#tmp_list[@]} -gt 0 ]]; then + integtest_list=(${tmp_list[@]}) + return 0 + fi + return 1 +} + +# function to find integtests in base release C++ repos +base_rel_dir="" +list_baserel_cpp_tests() { + if [[ "${base_rel_dir}" == "" ]]; then + dbt_info_output=`dbt-info release` + base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` + fi + + local repo_name="$1" + tmp_list=(`ls -1d ${base_rel_dir}/sourcecode/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + if [[ ${#tmp_list[@]} -gt 0 ]]; then + integtest_list=(${tmp_list[@]}) + return 0 + fi + return 1 +} + +# function to find integtests in base release Python repos +base_rel_dir="" +list_baserel_py_tests() { + if [[ "${base_rel_dir}" == "" ]]; then + dbt_info_output=`dbt-info release` + base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` + fi + + local repo_name="$1" + tmp_list=(`ls -1d ${base_rel_dir}/sourcecode/${repo_name}/src/*/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + if [[ ${#tmp_list[@]} -gt 0 ]]; then + integtest_list=(${tmp_list[@]}) + return 0 + fi + return 1 +} + GETOPT_TEMP=`getopt -o hx: --long help,exclude: -- "$@"` if [ $? -ne 0 ]; then usage @@ -111,13 +175,15 @@ echo "Looking for integtests in the _${repo_list[@]}_ repo(s)..." >&2 echo "" >&2 for repo_name in "${repo_list[@]}"; do - share_envvar_name="${repo_name^^}_SHARE" # double caret converts env var to uppercase - - # Here, we list all integtests that exist either in the installed software area (C++ packages), - # the local software area, or the Python virtual environment (the .venv subdir). - # ${!var} returns what var points to - integtest_list=(`ls -1 ${!share_envvar_name}/integtest/*_test.py ${DBT_AREA_ROOT}/sourcecode/${repo_name}/integtest/*_test.py ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) - if [[ ${#integtest_list[@]} -gt 0 ]]; then + # We look for tests in several places and stop looking as soon as we find some. + # The functions that are called in this "if" statement modify the integtest_list + # when tests are found, and return "true" when they do, so the contents of the + # "if" block can simply print out what is in the integtest_list. + integtest_list=() + if list_local_sourcecode_tests ${repo_name} || \ + list_local_pythoncode_tests ${repo_name} || \ + list_baserel_cpp_tests ${repo_name} || \ + list_baserel_py_tests ${repo_name}; then for test_name in "${integtest_list[@]}"; do echo "${repo_name}/${test_name}" done @@ -129,16 +195,10 @@ for repo_name in "${repo_list[@]}"; do # differences between C++ packages and Python packages. if [[ -e "${DBT_AREA_ROOT}/sourcecode/${repo_name}" ]]; then echo "-> No integtest directory was found in ${DBT_AREA_ROOT}/sourcecode/${repo_name}." >&2 - fi - if [[ "${!share_envvar_name}" == "" ]] && [[ `pip list | grep "^${repo_name} "` == "" ]]; then - echo "-> \"${repo_name}\" does not appear to be a valid repository name." >&2 - else - if [[ "${!share_envvar_name}" != "" ]]; then - echo "-> No integtest directory was found in ${share_envvar_name} (${!share_envvar_name})." >&2 - fi - if [[ `pip list | grep "^${repo_name} "` != "" ]]; then - echo "-> No integtest directory was found in ${DBT_AREA_ROOT}/venv for repo \"${repo_name}\"." >&2 - fi + elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${repo_name}" ]]; then + echo "-> No integtest directory was found in ${DBT_AREA_ROOT}/pythoncode/${repo_name}/src/${repo_name}." >&2 + elif [[ -e "${base_rel_dir}/sourcecode/${repo_name}" ]]; then + echo "-> No integtest directory was found in ${base_rel_dir}/sourcecode/${repo_name}." >&2 fi fi done diff --git a/scripts/list_repos_with_integtests.sh b/scripts/list_repos_with_integtests.sh index 6b202d6..46f1b51 100755 --- a/scripts/list_repos_with_integtests.sh +++ b/scripts/list_repos_with_integtests.sh @@ -7,9 +7,9 @@ if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]] || [[ "$1" == "-?" ]]; then echo echo " Lists the software repositories that have integration tests (integtests) in them." echo - echo " For C++ packages, the base release, local install dir, and local sourcecode dir" + echo " For C++ packages, the local sourcecode dir (if any) and the base release " echo " are searched, unless \"local\" is passed as an argument. In that case, only the" - echo " local install and sourcecode directories are searched." + echo " local sourcecode directory is searched." echo echo " For Python packages, the \$DBT_AREA_ROOT/.venv area is searched, independent of" echo " whether that area is part of a local software area or a base release. If the" @@ -20,53 +20,44 @@ if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]] || [[ "$1" == "-?" ]]; then fi # initialization -all_repo_paths=() +all_integtest_paths=() -# skip repos in the base release, if the user has specified "local" +# provide feedback to the user echo "" >&2 if [[ $# -eq 0 ]] || [[ "$1" != "local" ]]; then echo "Looking for _all_ repositories with integtests in them..." >&2 - echo "" >&2 - - # determine the base release directory - release_dir=`dbt-info release | grep 'Release dir:' | cut -d' ' -f3` - base_release_name=`dbt-info release | grep 'Base release name:' | cut -d' ' -f4` - base_release_dir="${release_dir}/../${base_release_name}" - - # look up the paths of all of the C++ repositories in the core and detector-specific categories with integtests - det_rel_repo_paths=(`ls -1d ${release_dir}/spack-installation/opt/spack/*linux*/gcc-*/*/*/integtest/*_test.py 2>/dev/null`) - base_rel_repo_paths=(`ls -1d ${base_release_dir}/spack-installation/opt/spack/*linux*/gcc-*/*/*/integtest/*_test.py 2>/dev/null`) - all_repo_paths=("${det_rel_repo_paths[@]}" "${base_rel_repo_paths[@]}") - - # add in the paths of the Python repositories with integtests - if [[ "${DBT_AREA_ROOT}" != "" ]]; then - venv_dir_repo_paths=(`ls -1 ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/*/integtest/*_test.py`) - all_repo_paths=("${all_repo_paths[@]}" "${venv_dir_repo_paths[@]}") - fi else echo "Looking for _local_ repositories with integtests in them..." >&2 - echo "" >&2 fi +echo "" >&2 + +# look in a local software area first +if [[ "$DBT_AREA_ROOT" != "" ]] && [[ "`echo $DBT_AREA_ROOT | grep '^/cvmfs'`" == "" ]]; then -# add in the paths of the C++ repositories in the local install and sourcecode dirs -if [[ "$DBT_AREA_ROOT" != "" ]]; then - install_dir_repo_paths=(`ls -1 ${DBT_AREA_ROOT}/install/*/share/integtest/*_test.py 2>/dev/null`) + # add in the paths of the C++ repositories sourcecode_dir_repo_paths=(`ls -1 ${DBT_AREA_ROOT}/sourcecode/*/integtest/*_test.py 2>/dev/null`) - all_repo_paths=("${all_repo_paths[@]}" "${install_dir_repo_paths[@]}" "${sourcecode_dir_repo_paths[@]}") + all_integtest_paths+=("${sourcecode_dir_repo_paths[@]}") + + # add in the paths of the Python repositories + pythoncode_dir_repo_paths=(`ls -1 ${DBT_AREA_ROOT}/pythoncode/*/src/*/integtest/*_test.py 2>/dev/null`) + all_integtest_paths+=("${pythoncode_dir_repo_paths[@]}") fi -# add in the paths of the Python repositories that have integtests and are cloned locally -if [[ "`echo $DBT_AREA_ROOT | grep '^/cvmfs'`" == "" ]]; then - venv_dir_repo_paths=(`ls -1 ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/*/integtest/*_test.py 2>/dev/null`) - for path in "${venv_dir_repo_paths[@]}"; do - repo_name=`echo ${path} | sed 's,.*site-packages/,,' | sed 's,/integtest.*,,'` - if [[ -e $DBT_AREA_ROOT/pythoncode/${repo_name} ]]; then - all_repo_paths=("${all_repo_paths[@]}" "${path}") - fi - done +# include repos in the base release, unless the user has specified "local" +if [[ $# -eq 0 ]] || [[ "$1" != "local" ]]; then + dbt_info_output=`dbt-info release` + base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` + + # add in the paths of the C++ repositories + base_rel_cpp_repos=(`ls -1d ${base_rel_dir}/sourcecode/*/integtest/*_test.py 2>/dev/null`) + all_integtest_paths+=("${base_rel_cpp_repos[@]}") + + # add in the paths of the Python repositories + base_rel_py_repos=(`ls -1d ${base_rel_dir}/sourcecode/*/src/*/integtest/*_test.py 2>/dev/null`) + all_integtest_paths+=("${base_rel_py_repos[@]}") fi -repos_with_integtests=(`echo "${all_repo_paths[@]}" | sed 's,/share,,g' | xargs -r -n 1 dirname | xargs -r -n 1 dirname | xargs -r -n 1 basename | cut -d'-' -f1 | sort -u`) +repos_with_integtests=(`echo "${all_integtest_paths[@]}" | sed 's,/share,,g' | xargs -r -n 1 dirname | xargs -r -n 1 dirname | xargs -r -n 1 basename | cut -d'-' -f1 | sort -u`) for repo in "${repos_with_integtests[@]}"; do echo "$repo" From 3d7660cd3b535919ee07087d5f55fa807df17df3 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 21 Sep 2026 08:17:10 -0500 Subject: [PATCH 02/18] Fixed handling of base-release-only Python integtests in the dunedaq_integtest_bundle.sh script --- scripts/dunedaq_integtest_bundle.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 28a40e2..47d9b24 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -505,9 +505,9 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do # is under the $DBT_AREA_ROOT/.venv directory, independent of whether that env var # points to a directory in a local software area or a base release. - # First, check if the test is found in the Python virtual environment. + # First, check if the test is found in the Python virtual environment located + # underneath the directory referenced by DBT_AREA_ROOT. # This picks up tests from our Python-only software packages. - # ** add note ** if [[ "`ls ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name} 2>/dev/null`" != "" ]]; then PYTEST_COMMAND+=(${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name}) "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} @@ -528,11 +528,13 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do fi else - # Next, check if the test exists in the base release sourcecode area + # look up the location of the base release, to be used in the next set of lookups if [[ "${base_rel_dir}" == "" ]]; then dbt_info_output=`dbt-info release` base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` fi + + # Next, check if the test exists in the base release sourcecode area if [[ -e "${base_rel_dir}/sourcecode/${test_repo}/integtest/${test_name}" ]]; then # remove any trailing "--" in PYTEST_COMMAND since we are adding more pytest options here if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then @@ -540,14 +542,27 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do fi PYTEST_COMMAND+=(-p no:cacheprovider --no-summary ${base_rel_dir}/sourcecode/${test_repo}/integtest/${test_name}) "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} + + # Next, check if the test is found in the Python virtual environment located in + # the base release. This check is needed when developers create a local software + # area with the 'dbt-create -q' option (and a local .venv is *not* created). + # This picks up tests from our Python-only software packages. + elif [[ "`ls ${base_rel_dir}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name} 2>/dev/null`" != "" ]]; then + # remove any trailing "--" in PYTEST_COMMAND since we are adding more pytest options here + if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then + unset 'PYTEST_COMMAND[-1]' + fi + PYTEST_COMMAND+=(-p no:cacheprovider --no-summary ${base_rel_dir}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name}) + "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} + elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${test_repo}/src/${test_repo}/integtest/${test_name}" ]]; then echo "" - echo -e "\U1f7e1 WARNING: The ${test_name} test was not found in the Python virtual environment (.venv dir)." + echo -e "\U1f7e1 WARNING: ${test_name} was not found in the Python virtual environment (.venv dir)." echo -e "\U1f7e1 WARNING: This can happen when the Python package is installed with the '-e' option." echo -e "\U1f7e1 WARNING: Please try installing the ${test_repo} package without the '-e' option." else echo "" - echo -e "\U0001F534 ERROR: Unable to find the ${test_name} test in the ${test_repo} repo." + echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} repo." echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." fi fi From 4f5530676c3a28075b9739f0daceb9e9d3b7819e Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Tue, 22 Sep 2026 09:42:42 -0500 Subject: [PATCH 03/18] updated comment in dunedaq_integtest_bundle.sh --- scripts/dunedaq_integtest_bundle.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 3bf676d..41618a7 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -501,10 +501,9 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do # In the following "if" statements, we trust that the DBT_AREA_ROOT env var is # appropriately set in all types of software setups, whether the user created a local # software area or they set up a base release without creating a local software area. - - # We also trust that the correct place to look for integtests in Python packages - # is under the $DBT_AREA_ROOT/.venv directory, independent of whether that env var - # points to a directory in a local software area or a base release. + # Of course, that isn't the whole story. If the user has created a local software area, + # we still may need to check the base release directory for repos that haven't been + # locally cloned, and to do that, we need to determine where the base release is located. # First, check if the test is found in the Python virtual environment located # underneath the directory referenced by DBT_AREA_ROOT. From 89fec3c013a90447909b1fb00b406f483e2e5938 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Tue, 22 Sep 2026 10:49:47 -0500 Subject: [PATCH 04/18] some more refinements to integtest lookups in the bundle scripts --- scripts/dunedaq_integtest_bundle.sh | 5 +++++ scripts/list_available_integtests.sh | 10 +++++++--- scripts/list_repos_with_integtests.sh | 16 ++++++++++------ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 41618a7..e08dec4 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -555,11 +555,16 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do PYTEST_COMMAND+=(-p no:cacheprovider --no-summary ${base_rel_dir}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name}) "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} + # If the test is found in a locally-cloned Python repo, and it hasn't been found in any + # of the lookups above, then the package must have been installed with the "-e" option, + # and we inform the user about that. elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${test_repo}/src/${test_repo}/integtest/${test_name}" ]]; then echo "" echo -e "\U1f7e1 WARNING: ${test_name} was not found in the Python virtual environment (.venv dir)." echo -e "\U1f7e1 WARNING: This can happen when the Python package is installed with the '-e' option." echo -e "\U1f7e1 WARNING: Please try installing the ${test_repo} package without the '-e' option." + + # If we get here, something went wrong, so we tell the user about that. else echo "" echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} repo." diff --git a/scripts/list_available_integtests.sh b/scripts/list_available_integtests.sh index a98c631..b50d140 100755 --- a/scripts/list_available_integtests.sh +++ b/scripts/list_available_integtests.sh @@ -87,14 +87,18 @@ list_baserel_cpp_tests() { # function to find integtests in base release Python repos base_rel_dir="" -list_baserel_py_tests() { +list_venv_py_tests() { if [[ "${base_rel_dir}" == "" ]]; then dbt_info_output=`dbt-info release` base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` fi local repo_name="$1" - tmp_list=(`ls -1d ${base_rel_dir}/sourcecode/${repo_name}/src/*/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + if [[ -e ${DBT_AREA_ROOT}/.venv ]]; then + tmp_list=(`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + else + tmp_list=(`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + fi if [[ ${#tmp_list[@]} -gt 0 ]]; then integtest_list=(${tmp_list[@]}) return 0 @@ -183,7 +187,7 @@ for repo_name in "${repo_list[@]}"; do if list_local_sourcecode_tests ${repo_name} || \ list_local_pythoncode_tests ${repo_name} || \ list_baserel_cpp_tests ${repo_name} || \ - list_baserel_py_tests ${repo_name}; then + list_venv_py_tests ${repo_name}; then for test_name in "${integtest_list[@]}"; do echo "${repo_name}/${test_name}" done diff --git a/scripts/list_repos_with_integtests.sh b/scripts/list_repos_with_integtests.sh index 46f1b51..bdecb06 100755 --- a/scripts/list_repos_with_integtests.sh +++ b/scripts/list_repos_with_integtests.sh @@ -34,11 +34,11 @@ echo "" >&2 # look in a local software area first if [[ "$DBT_AREA_ROOT" != "" ]] && [[ "`echo $DBT_AREA_ROOT | grep '^/cvmfs'`" == "" ]]; then - # add in the paths of the C++ repositories + # add in the paths of the C++ integtests sourcecode_dir_repo_paths=(`ls -1 ${DBT_AREA_ROOT}/sourcecode/*/integtest/*_test.py 2>/dev/null`) all_integtest_paths+=("${sourcecode_dir_repo_paths[@]}") - # add in the paths of the Python repositories + # add in the paths of the Python integtests pythoncode_dir_repo_paths=(`ls -1 ${DBT_AREA_ROOT}/pythoncode/*/src/*/integtest/*_test.py 2>/dev/null`) all_integtest_paths+=("${pythoncode_dir_repo_paths[@]}") fi @@ -48,13 +48,17 @@ if [[ $# -eq 0 ]] || [[ "$1" != "local" ]]; then dbt_info_output=`dbt-info release` base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` - # add in the paths of the C++ repositories + # add in the paths of the C++ integtests in the base release base_rel_cpp_repos=(`ls -1d ${base_rel_dir}/sourcecode/*/integtest/*_test.py 2>/dev/null`) all_integtest_paths+=("${base_rel_cpp_repos[@]}") - # add in the paths of the Python repositories - base_rel_py_repos=(`ls -1d ${base_rel_dir}/sourcecode/*/src/*/integtest/*_test.py 2>/dev/null`) - all_integtest_paths+=("${base_rel_py_repos[@]}") + # add in the paths of the Python integtests from the current virtual environment + if [[ -e ${DBT_AREA_ROOT}/.venv ]]; then + venv_py_repos=(`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/*/integtest/*_test.py 2>/dev/null`) + else + venv_py_repos=(`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/*/integtest/*_test.py 2>/dev/null`) + fi + all_integtest_paths+=("${venv_py_repos[@]}") fi repos_with_integtests=(`echo "${all_integtest_paths[@]}" | sed 's,/share,,g' | xargs -r -n 1 dirname | xargs -r -n 1 dirname | xargs -r -n 1 basename | cut -d'-' -f1 | sort -u`) From 6b9f6606811556b0e8ae969b07b96f3dc7fa9a98 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Tue, 22 Sep 2026 11:24:28 -0500 Subject: [PATCH 05/18] Updated the text of the pip install -e warning message in dunedaq_integtest_bundle.sh --- scripts/dunedaq_integtest_bundle.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index e08dec4..00c91b1 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -561,8 +561,9 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${test_repo}/src/${test_repo}/integtest/${test_name}" ]]; then echo "" echo -e "\U1f7e1 WARNING: ${test_name} was not found in the Python virtual environment (.venv dir)." - echo -e "\U1f7e1 WARNING: This can happen when the Python package is installed with the '-e' option." - echo -e "\U1f7e1 WARNING: Please try installing the ${test_repo} package without the '-e' option." + echo -e "\U1f7e1 WARNING: This can happen when the Python package has not recently been installed," + echo -e "\U1f7e1 WARNING: or when it has been installed with the '-e' option. Please try installing" + echo -e "\U1f7e1 WARNING: the ${test_repo} package without the '-e' option (e.g. 'pip install .')." # If we get here, something went wrong, so we tell the user about that. else From 634353c6c72b7bebdeee71ba5abf7f08ee2815df Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Tue, 22 Sep 2026 11:48:38 -0500 Subject: [PATCH 06/18] changed comment --- scripts/list_available_integtests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/list_available_integtests.sh b/scripts/list_available_integtests.sh index b50d140..0edd296 100755 --- a/scripts/list_available_integtests.sh +++ b/scripts/list_available_integtests.sh @@ -85,7 +85,7 @@ list_baserel_cpp_tests() { return 1 } -# function to find integtests in base release Python repos +# function to find integtests in local or base release Python virtual environment base_rel_dir="" list_venv_py_tests() { if [[ "${base_rel_dir}" == "" ]]; then From b9ca51ac4f8706229cf5966fc2461f5b6e6bff0b Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Tue, 29 Sep 2026 20:25:36 -0500 Subject: [PATCH 07/18] two changes to dunedaq_integtest_bundle.sh: don't suppress the pytest summary when verbosity level is 6; reversed the order of the last two places where we look for Python-package integtests. --- scripts/dunedaq_integtest_bundle.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 411d8ed..26a39a5 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -175,6 +175,7 @@ let random_subset_count=0 only_list_tests="" PYTEST_BASE_COMMAND=(pytest -s --tb=short) # our core pytest command, with DAQ printout included and short pytest traceback PYTEST_OPTIONS=() +BASEREL_PYTEST_SUMMARY_CHOICE="--no-summary" while true; do case "$1" in @@ -301,6 +302,7 @@ while true; do if [[ $level -ge 6 ]]; then # enable printout of Pytest 'skip' reasons and turn on drunc debugging PYTEST_OPTIONS+=(-rs --dunerc-option log-level debug) + BASEREL_PYTEST_SUMMARY_CHOICE="" fi shift 2 ;; @@ -543,7 +545,7 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then unset 'PYTEST_COMMAND[-1]' fi - PYTEST_COMMAND+=(-p no:cacheprovider --no-summary ${DBT_AREA_ROOT}/sourcecode/${test_repo}/integtest/${test_name}) + PYTEST_COMMAND+=(-p no:cacheprovider ${BASEREL_PYTEST_SUMMARY_CHOICE} ${DBT_AREA_ROOT}/sourcecode/${test_repo}/integtest/${test_name}) "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} fi @@ -560,9 +562,19 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then unset 'PYTEST_COMMAND[-1]' fi - PYTEST_COMMAND+=(-p no:cacheprovider --no-summary ${base_rel_dir}/sourcecode/${test_repo}/integtest/${test_name}) + PYTEST_COMMAND+=(-p no:cacheprovider ${BASEREL_PYTEST_SUMMARY_CHOICE} ${base_rel_dir}/sourcecode/${test_repo}/integtest/${test_name}) "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} + # If the test is found in a locally-cloned Python repo, and it hasn't been found in any + # of the Python package lookup(s)s above, then the package must not have been installed, + # or was installed with the "-e" option, and we inform the user about that. + elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${test_repo}/src/${test_repo}/integtest/${test_name}" ]]; then + echo "" + echo -e "\U1f7e1 WARNING: ${test_name} was not found in the Python virtual environment (.venv dir)." + echo -e "\U1f7e1 WARNING: This can happen when the Python package has not recently been installed," + echo -e "\U1f7e1 WARNING: or when it has been installed with the '-e' option. Please try installing" + echo -e "\U1f7e1 WARNING: the ${test_repo} package without the '-e' option (e.g. 'pip install .')." + # Next, check if the test is found in the Python virtual environment located in # the base release. This check is needed when developers create a local software # area with the 'dbt-create -q' option (and a local .venv is *not* created). @@ -572,19 +584,10 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then unset 'PYTEST_COMMAND[-1]' fi - PYTEST_COMMAND+=(-p no:cacheprovider --no-summary ${base_rel_dir}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name}) + PYTEST_COMMAND+=(-p no:cacheprovider ${BASEREL_PYTEST_SUMMARY_CHOICE} ${base_rel_dir}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name}) + echo "KAB ${PYTEST_COMMAND[@]}" "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} - # If the test is found in a locally-cloned Python repo, and it hasn't been found in any - # of the lookups above, then the package must have been installed with the "-e" option, - # and we inform the user about that. - elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${test_repo}/src/${test_repo}/integtest/${test_name}" ]]; then - echo "" - echo -e "\U1f7e1 WARNING: ${test_name} was not found in the Python virtual environment (.venv dir)." - echo -e "\U1f7e1 WARNING: This can happen when the Python package has not recently been installed," - echo -e "\U1f7e1 WARNING: or when it has been installed with the '-e' option. Please try installing" - echo -e "\U1f7e1 WARNING: the ${test_repo} package without the '-e' option (e.g. 'pip install .')." - # If we get here, something went wrong, so we tell the user about that. else echo "" From 0e121b3f0831921f579c0ab0c03df3b25d1780c1 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Tue, 29 Sep 2026 20:41:05 -0500 Subject: [PATCH 08/18] Removed debug statement from dunedaq_integtest_bundle.sh --- scripts/dunedaq_integtest_bundle.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 26a39a5..c17abcd 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -585,7 +585,6 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do unset 'PYTEST_COMMAND[-1]' fi PYTEST_COMMAND+=(-p no:cacheprovider ${BASEREL_PYTEST_SUMMARY_CHOICE} ${base_rel_dir}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name}) - echo "KAB ${PYTEST_COMMAND[@]}" "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} # If we get here, something went wrong, so we tell the user about that. From fefcf4900ae293b8ebc950eba8405dd77f46f032 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 7 Oct 2026 14:17:01 -0500 Subject: [PATCH 09/18] Added scripts to help with integtest lookup: setting useful env vars and getting repo types. --- scripts/dst_set_useful_env_vars.sh | 62 ++++++++++++++++++ scripts/dunedaq_integtest_bundle.sh | 91 +++++++++++---------------- scripts/get_repo_type.sh | 40 ++++++++++++ scripts/list_available_integtests.sh | 37 ++++++++--- scripts/list_repos_with_integtests.sh | 50 +++++++++------ 5 files changed, 198 insertions(+), 82 deletions(-) create mode 100644 scripts/dst_set_useful_env_vars.sh create mode 100755 scripts/get_repo_type.sh diff --git a/scripts/dst_set_useful_env_vars.sh b/scripts/dst_set_useful_env_vars.sh new file mode 100644 index 0000000..4cdbbf1 --- /dev/null +++ b/scripts/dst_set_useful_env_vars.sh @@ -0,0 +1,62 @@ +# This script needs to be sourced. +# +# Its purpose is to set values for various environmental variables that are +# useful for looking up integration tests in our C++ and Python repositories. + +# check if a software environment has been set up +if [[ "$DBT_AREA_ROOT" == "" ]]; then + echo + echo "Please set up a valid DUNE-DAQ software area before running this script." + return +fi + +# check if this script has already been run, and exit early if yes +if [[ "${DST_DAR_COPY}" != "" ]] && \ + [[ "${DST_DAR_COPY}" == "${DBT_AREA_ROOT}" ]]; then + return +fi +export DST_DAR_COPY="${DBT_AREA_ROOT}" + +# default all of the env vars that we might set to empty strings +export DST_LOCAL_CPP_SOURCE_DIR="" +export DST_LOCAL_PYTHON_SOURCE_DIR="" +export DST_LOCAL_PYTHON_VENV_DIR="" +export DST_LOCAL_SPACK_INSTALL_DIR="" +export DST_BASEREL_CPP_SOURCE_DIR="" +export DST_BASEREL_PYTHON_VENV_DIR="" +export DST_CORE_BASEREL_SPACK_DIR="" +export DST_DETSPEC_BASEREL_SPACK_DIR="" + +if [[ "${DBT_AREA_ROOT}" != "" ]] && [[ "`echo ${DBT_AREA_ROOT} | grep '^/cvmfs'`" == "" ]] && \ + [[ -w "${DBT_AREA_ROOT}" ]] && [[ -w "${DBT_AREA_ROOT}/sourcecode" ]]; then + export DST_LOCAL_CPP_SOURCE_DIR="${DBT_AREA_ROOT}/sourcecode" +fi + +if [[ "${DBT_AREA_ROOT}" != "" ]] && [[ "`echo ${DBT_AREA_ROOT} | grep '^/cvmfs'`" == "" ]] && \ + [[ -w "${DBT_AREA_ROOT}" ]] && [[ -w "${DBT_AREA_ROOT}/pythoncode" ]]; then + export DST_LOCAL_PYTHON_SOURCE_DIR="${DBT_AREA_ROOT}/pythoncode" +fi + +if [[ "${DBT_AREA_ROOT}" != "" ]] && [[ "`echo ${DBT_AREA_ROOT} | grep '^/cvmfs'`" == "" ]] && \ + [[ -w "${DBT_AREA_ROOT}" ]] && [[ -w "${DBT_AREA_ROOT}/.venv" ]]; then + export DST_LOCAL_PYTHON_VENV_DIR="`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages 2>/dev/null | head -1`" +fi + +if [[ "${DBT_AREA_ROOT}" != "" ]] && [[ "`echo ${DBT_AREA_ROOT} | grep '^/cvmfs'`" == "" ]] && \ + [[ -w "${DBT_AREA_ROOT}" ]] && [[ -w "${DBT_AREA_ROOT}/install" ]]; then + export DST_LOCAL_SPACK_INSTALL_DIR="${DBT_AREA_ROOT}/install" +fi + +dbt_info_output=`dbt-info release` +detector_specific_release_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` +detector_specific_release_name=`echo "${dbt_info_output}" | grep 'Release name:' | awk '{print $3}'` +core_release_name=`echo "${dbt_info_output}" | grep 'Base release name:' | awk '{print $4}'` +core_release_dir=`echo "${detector_specific_release_dir}" | sed "s/${detector_specific_release_name}/${core_release_name}/g"` + +export DST_BASEREL_CPP_SOURCE_DIR="${detector_specific_release_dir}/sourcecode" + +export DST_BASEREL_PYTHON_VENV_DIR="`ls -1d ${detector_specific_release_dir}/.venv/lib/python*/site-packages 2>/dev/null | head -1`" + +export DST_CORE_BASEREL_SPACK_DIR="`ls -1d ${core_release_dir}/spack-installation/opt/spack/linux-*/gcc-* 2>/dev/null | head -1`" + +export DST_DETSPEC_BASEREL_SPACK_DIR="`ls -1d ${detector_specific_release_dir}/spack-installation/opt/spack/linux-*/gcc-* 2>/dev/null | head -1`" diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index c17abcd..3b236f9 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -490,7 +490,7 @@ let number_of_individual_tests=${#filtered_integtest_list[@]} let total_number_of_tests=${number_of_individual_tests}*${individual_test_requested_iterations}*${full_set_requested_interations} # run the tests -base_rel_dir="" +source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh let overall_test_index=0 # this is only used for user feedback let full_set_loop_count=0 while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do @@ -520,77 +520,58 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do PYTEST_COMMAND+=("--junit-xml=${test_repo}_${test_name%.py}_results.xml" "--") fi - # In the following "if" statements, we trust that the DBT_AREA_ROOT env var is - # appropriately set in all types of software setups, whether the user created a local - # software area or they set up a base release without creating a local software area. - # Of course, that isn't the whole story. If the user has created a local software area, - # we still may need to check the base release directory for repos that haven't been - # locally cloned, and to do that, we need to determine where the base release is located. - - # First, check if the test is found in the Python virtual environment located - # underneath the directory referenced by DBT_AREA_ROOT. - # This picks up tests from our Python-only software packages. - if [[ "`ls ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name} 2>/dev/null`" != "" ]]; then - PYTEST_COMMAND+=(${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name}) - "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} - - # Next, check if the test exists in the "sourcecode" subdirectory, either in - # a local software area or a base release. - elif [[ -e "${DBT_AREA_ROOT}/sourcecode/${test_repo}/integtest/${test_name}" ]]; then - if [[ -w "${DBT_AREA_ROOT}" ]]; then - PYTEST_COMMAND+=(${DBT_AREA_ROOT}/sourcecode/${test_repo}/integtest/${test_name}) - "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} - else - # remove any trailing "--" in PYTEST_COMMAND since we are adding more pytest options here - if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then - unset 'PYTEST_COMMAND[-1]' - fi - PYTEST_COMMAND+=(-p no:cacheprovider ${BASEREL_PYTEST_SUMMARY_CHOICE} ${DBT_AREA_ROOT}/sourcecode/${test_repo}/integtest/${test_name}) - "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} - fi + # determine the repository type, to help determine where to look for the test + repo_type="`get_repo_type.sh ${test_repo}`" - else - # look up the location of the base release, to be used in the next set of lookups - if [[ "${base_rel_dir}" == "" ]]; then - dbt_info_output=`dbt-info release` - base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` - fi + # handle tests in Python repositories + if [[ "${repo_type}" == "Python" ]]; then - # Next, check if the test exists in the base release sourcecode area - if [[ -e "${base_rel_dir}/sourcecode/${test_repo}/integtest/${test_name}" ]]; then + if [[ "${DST_LOCAL_PYTHON_VENV_DIR}" != "" ]]; then + if [[ -e "${DST_LOCAL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}" ]]; then + PYTEST_COMMAND+=(${DST_LOCAL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}) + "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} + else + echo "" + echo -e "\U1f7e1 WARNING: ${test_name} was not found in the local Python virtual environment (.venv dir)." + echo -e "\U1f7e1 WARNING: This can happen when the Python package needs to be (re?)installed locally, or when" + echo -e "\U1f7e1 WARNING: it has been installed with the '-e' option. Please try re-installing the ${test_repo}" + echo -e "\U1f7e1 WARNING: package without the '-e' option (e.g. 'pip install .') or re-running 'dbt-build'." + fi + + elif [[ "${DST_BASEREL_PYTHON_VENV_DIR}" != "" ]] && \ + [[ -e "${DST_BASEREL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}" ]]; then # remove any trailing "--" in PYTEST_COMMAND since we are adding more pytest options here if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then unset 'PYTEST_COMMAND[-1]' fi - PYTEST_COMMAND+=(-p no:cacheprovider ${BASEREL_PYTEST_SUMMARY_CHOICE} ${base_rel_dir}/sourcecode/${test_repo}/integtest/${test_name}) + PYTEST_COMMAND+=(-p no:cacheprovider ${BASEREL_PYTEST_SUMMARY_CHOICE} ${DST_BASEREL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}) "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} - # If the test is found in a locally-cloned Python repo, and it hasn't been found in any - # of the Python package lookup(s)s above, then the package must not have been installed, - # or was installed with the "-e" option, and we inform the user about that. - elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${test_repo}/src/${test_repo}/integtest/${test_name}" ]]; then + else echo "" - echo -e "\U1f7e1 WARNING: ${test_name} was not found in the Python virtual environment (.venv dir)." - echo -e "\U1f7e1 WARNING: This can happen when the Python package has not recently been installed," - echo -e "\U1f7e1 WARNING: or when it has been installed with the '-e' option. Please try installing" - echo -e "\U1f7e1 WARNING: the ${test_repo} package without the '-e' option (e.g. 'pip install .')." - - # Next, check if the test is found in the Python virtual environment located in - # the base release. This check is needed when developers create a local software - # area with the 'dbt-create -q' option (and a local .venv is *not* created). - # This picks up tests from our Python-only software packages. - elif [[ "`ls ${base_rel_dir}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name} 2>/dev/null`" != "" ]]; then + echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} (Python) repo." + echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." + fi + + # handle tests in C++ repositories + elif [[ "${repo_type}" == "CPP" ]]; then + + if [[ "${DST_LOCAL_CPP_SOURCE_DIR}" != "" ]] && \ + [[ -e "${DST_LOCAL_CPP_SOURCE_DIR}/${test_repo}/integtest/${test_name}" ]]; then + PYTEST_COMMAND+=(${DST_LOCAL_CPP_SOURCE_DIR}/${test_repo}/integtest/${test_name}) + "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} + elif [[ "${DST_BASEREL_CPP_SOURCE_DIR}" != "" ]] && \ + [[ -e "${DST_BASEREL_CPP_SOURCE_DIR}/${test_repo}/integtest/${test_name}" ]]; then # remove any trailing "--" in PYTEST_COMMAND since we are adding more pytest options here if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then unset 'PYTEST_COMMAND[-1]' fi - PYTEST_COMMAND+=(-p no:cacheprovider ${BASEREL_PYTEST_SUMMARY_CHOICE} ${base_rel_dir}/.venv/lib/python*/site-packages/${test_repo}/integtest/${test_name}) + PYTEST_COMMAND+=(-p no:cacheprovider ${BASEREL_PYTEST_SUMMARY_CHOICE} ${DST_BASEREL_CPP_SOURCE_DIR}/${test_repo}/integtest/${test_name}) "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} - # If we get here, something went wrong, so we tell the user about that. else echo "" - echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} repo." + echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} (C++) repo." echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." fi fi diff --git a/scripts/get_repo_type.sh b/scripts/get_repo_type.sh new file mode 100755 index 0000000..6ea3440 --- /dev/null +++ b/scripts/get_repo_type.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +if [[ $# -eq 0 ]] || [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]] || [[ "$1" == "-?" ]]; then + echo + echo "Usage: `basename $0` " + echo + echo " Determines the type of the specified repo, \"CPP\" or \"Python\"." + echo " Prints out \"Unknown\" if the type can't be determined." + echo + exit +fi +repo_name=$1 + +# check if a software environment has been set up +if [[ "$DBT_AREA_ROOT" == "" ]]; then + echo + echo "Please set up a valid DUNE-DAQ software area before running this script." + exit +fi + +source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh + +if [[ "${DST_LOCAL_SPACK_INSTALL_DIR}" != "" ]] && \ + [[ -e "${DST_LOCAL_SPACK_INSTALL_DIR}/${repo_name}" ]]; then + echo "CPP" +elif [[ "${DST_CORE_BASEREL_SPACK_DIR}" != "" ]] && \ + [[ "`ls -1d ${DST_CORE_BASEREL_SPACK_DIR}/${repo_name}* 2>/dev/null | head -1`" != "" ]]; then + echo "CPP" +elif [[ "${DST_DETSPEC_BASEREL_SPACK_DIR}" != "" ]] && \ + [[ "`ls -1d ${DST_DETSPEC_BASEREL_SPACK_DIR}/${repo_name}* 2>/dev/null | head -1`" != "" ]]; then + echo "CPP" +elif [[ "${DST_LOCAL_PYTHON_VENV_DIR}" != "" ]] && \ + [[ -e ${DST_LOCAL_PYTHON_VENV_DIR}/${repo_name} ]]; then + echo "Python" +elif [[ "${DST_PYTHON_PYTHON_VENV_DIR}" != "" ]] && \ + [[ -e ${DST_PYTHON_PYTHON_VENV_DIR}/${repo_name} ]]; then + echo "Python" +else + echo "Unknown" +fi diff --git a/scripts/list_available_integtests.sh b/scripts/list_available_integtests.sh index 0edd296..98d2a8c 100755 --- a/scripts/list_available_integtests.sh +++ b/scripts/list_available_integtests.sh @@ -1,5 +1,4 @@ #!/bin/bash -# 19-Dec-2025, KAB # function to display usage hints usage() { @@ -20,6 +19,9 @@ Options: """ } +# global variable(s) +base_rel_dir="" + # function to check for a specific string in a list string_in_list() { # get the search string from the first argument @@ -69,7 +71,6 @@ list_local_pythoncode_tests() { } # function to find integtests in base release C++ repos -base_rel_dir="" list_baserel_cpp_tests() { if [[ "${base_rel_dir}" == "" ]]; then dbt_info_output=`dbt-info release` @@ -86,7 +87,6 @@ list_baserel_cpp_tests() { } # function to find integtests in local or base release Python virtual environment -base_rel_dir="" list_venv_py_tests() { if [[ "${base_rel_dir}" == "" ]]; then dbt_info_output=`dbt-info release` @@ -94,11 +94,18 @@ list_venv_py_tests() { fi local repo_name="$1" + + # local or base release, depending on environment setup if [[ -e ${DBT_AREA_ROOT}/.venv ]]; then tmp_list=(`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) - else - tmp_list=(`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + if [[ ${#tmp_list[@]} -gt 0 ]]; then + integtest_list=(${tmp_list[@]}) + return 0 + fi fi + + # base release, always checked, for completeness + tmp_list=(`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) if [[ ${#tmp_list[@]} -gt 0 ]]; then integtest_list=(${tmp_list[@]}) return 0 @@ -194,14 +201,28 @@ for repo_name in "${repo_list[@]}"; do else echo "-> No integtests were found for repository \"${repo_name}\"." >&2 + if [[ "${base_rel_dir}" == "" ]]; then + dbt_info_output=`dbt-info release` + base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` + fi + # The following logic is simply an attempt to provide a little more information # about *why* the integtest was not found. It attemts to take into account # differences between C++ packages and Python packages. - if [[ -e "${DBT_AREA_ROOT}/sourcecode/${repo_name}" ]]; then + if [[ -e "${DBT_AREA_ROOT}/sourcecode/${repo_name}" ]] && \ + [[ ! -e "${DBT_AREA_ROOT}/sourcecode/${repo_name}/integtest" ]]; then echo "-> No integtest directory was found in ${DBT_AREA_ROOT}/sourcecode/${repo_name}." >&2 - elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${repo_name}" ]]; then + elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${repo_name}" ]] && \ + [[ ! -e "${DBT_AREA_ROOT}/pythoncode/${repo_name}/integtest" ]]; then echo "-> No integtest directory was found in ${DBT_AREA_ROOT}/pythoncode/${repo_name}/src/${repo_name}." >&2 - elif [[ -e "${base_rel_dir}/sourcecode/${repo_name}" ]]; then + elif [[ "`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name} 2>/dev/null`" != "" ]] && \ + [[ "`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name}/integtest 2>/dev/null`" == "" ]]; then + echo "-> No integtest directory was found in ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name}." >&2 + elif [[ "`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name} 2>/dev/null`" != "" ]] && \ + [[ "`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name}/integtest 2>/dev/null`" = "" ]]; then + echo "-> No integtest directory was found in ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name}." >&2 + elif [[ -e "${base_rel_dir}/sourcecode/${repo_name}" ]] && \ + [[ ! -e "${base_rel_dir}/sourcecode/${repo_name}/integtest" ]]; then echo "-> No integtest directory was found in ${base_rel_dir}/sourcecode/${repo_name}." >&2 fi fi diff --git a/scripts/list_repos_with_integtests.sh b/scripts/list_repos_with_integtests.sh index bdecb06..71ec5bb 100755 --- a/scripts/list_repos_with_integtests.sh +++ b/scripts/list_repos_with_integtests.sh @@ -19,10 +19,18 @@ if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]] || [[ "$1" == "-?" ]]; then exit fi +# check if a software environment has been set up +if [[ "$DBT_AREA_ROOT" == "" ]]; then + echo + echo "Please set up a valid DUNE-DAQ software area before running this script." + exit +fi + # initialization all_integtest_paths=() +source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh -# provide feedback to the user +# let the user know what is happening echo "" >&2 if [[ $# -eq 0 ]] || [[ "$1" != "local" ]]; then echo "Looking for _all_ repositories with integtests in them..." >&2 @@ -32,33 +40,37 @@ fi echo "" >&2 # look in a local software area first -if [[ "$DBT_AREA_ROOT" != "" ]] && [[ "`echo $DBT_AREA_ROOT | grep '^/cvmfs'`" == "" ]]; then - - # add in the paths of the C++ integtests - sourcecode_dir_repo_paths=(`ls -1 ${DBT_AREA_ROOT}/sourcecode/*/integtest/*_test.py 2>/dev/null`) +# -> C++ repositories +if [[ "${DST_LOCAL_CPP_SOURCE_DIR}" != "" ]]; then + sourcecode_dir_repo_paths=(`ls -1 ${DST_LOCAL_CPP_SOURCE_DIR}/*/integtest/*_test.py 2>/dev/null`) all_integtest_paths+=("${sourcecode_dir_repo_paths[@]}") - - # add in the paths of the Python integtests - pythoncode_dir_repo_paths=(`ls -1 ${DBT_AREA_ROOT}/pythoncode/*/src/*/integtest/*_test.py 2>/dev/null`) +fi +# -> Python repositories +if [[ "${DST_LOCAL_PYTHON_SOURCE_DIR}" != "" ]]; then + pythoncode_dir_repo_paths=(`ls -1 ${DST_LOCAL_PYTHON_SOURCE_DIR}/*/src/*/integtest/*_test.py 2>/dev/null`) all_integtest_paths+=("${pythoncode_dir_repo_paths[@]}") fi -# include repos in the base release, unless the user has specified "local" +# include additional areas, unless the user has specified "local" if [[ $# -eq 0 ]] || [[ "$1" != "local" ]]; then - dbt_info_output=`dbt-info release` - base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` + # include a local Python virtual environment, if it exists + if [[ "${DST_LOCAL_PYTHON_VENV_DIR}" != "" ]]; then + venv_py_repos=(`ls -1d ${DST_LOCAL_PYTHON_VENV_DIR}/*/integtest/*_test.py 2>/dev/null`) + all_integtest_paths+=("${venv_py_repos[@]}") + fi + # add in the paths of the C++ integtests in the base release - base_rel_cpp_repos=(`ls -1d ${base_rel_dir}/sourcecode/*/integtest/*_test.py 2>/dev/null`) - all_integtest_paths+=("${base_rel_cpp_repos[@]}") + if [[ "${DST_BASEREL_CPP_SOURCE_DIR}" != "" ]]; then + base_rel_cpp_repos=(`ls -1d ${DST_BASEREL_CPP_SOURCE_DIR}/*/integtest/*_test.py 2>/dev/null`) + all_integtest_paths+=("${base_rel_cpp_repos[@]}") + fi - # add in the paths of the Python integtests from the current virtual environment - if [[ -e ${DBT_AREA_ROOT}/.venv ]]; then - venv_py_repos=(`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/*/integtest/*_test.py 2>/dev/null`) - else - venv_py_repos=(`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/*/integtest/*_test.py 2>/dev/null`) + # add in the paths of the Python integtests in the base release virtual environment + if [[ "${DST_BASEREL_PYTHON_VENV_DIR}" != "" ]]; then + venv_py_repos=(`ls -1d ${DST_BASEREL_PYTHON_VENV_DIR}/*/integtest/*_test.py 2>/dev/null`) + all_integtest_paths+=("${venv_py_repos[@]}") fi - all_integtest_paths+=("${venv_py_repos[@]}") fi repos_with_integtests=(`echo "${all_integtest_paths[@]}" | sed 's,/share,,g' | xargs -r -n 1 dirname | xargs -r -n 1 dirname | xargs -r -n 1 basename | cut -d'-' -f1 | sort -u`) From 7aa2eb738b66624a185576efd5435e712715782a Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 7 Oct 2026 18:21:36 -0500 Subject: [PATCH 10/18] fixed a couple of bugs --- scripts/dunedaq_integtest_bundle.sh | 7 ++++++- scripts/get_repo_type.sh | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 3b236f9..8d5512f 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -539,7 +539,7 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do fi elif [[ "${DST_BASEREL_PYTHON_VENV_DIR}" != "" ]] && \ - [[ -e "${DST_BASEREL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}" ]]; then + [[ -e "${DST_BASEREL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}" ]]; then # remove any trailing "--" in PYTEST_COMMAND since we are adding more pytest options here if [[ "${PYTEST_COMMAND[-1]}" == "--" ]]; then unset 'PYTEST_COMMAND[-1]' @@ -574,6 +574,11 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} (C++) repo." echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." fi + + else + echo "" + echo -e "\U0001F534 ERROR: Unexpected repo type for the '${test_repo}' repo: \"${repo_type}\"." + echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." fi let pytest_return_code=${PIPESTATUS[0]} diff --git a/scripts/get_repo_type.sh b/scripts/get_repo_type.sh index 6ea3440..75f46c6 100755 --- a/scripts/get_repo_type.sh +++ b/scripts/get_repo_type.sh @@ -32,8 +32,8 @@ elif [[ "${DST_DETSPEC_BASEREL_SPACK_DIR}" != "" ]] && \ elif [[ "${DST_LOCAL_PYTHON_VENV_DIR}" != "" ]] && \ [[ -e ${DST_LOCAL_PYTHON_VENV_DIR}/${repo_name} ]]; then echo "Python" -elif [[ "${DST_PYTHON_PYTHON_VENV_DIR}" != "" ]] && \ - [[ -e ${DST_PYTHON_PYTHON_VENV_DIR}/${repo_name} ]]; then +elif [[ "${DST_BASEREL_PYTHON_VENV_DIR}" != "" ]] && \ + [[ -e ${DST_BASEREL_PYTHON_VENV_DIR}/${repo_name} ]]; then echo "Python" else echo "Unknown" From cd453d2b68216eeddde4f61a3049ffc42e556ff6 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Thu, 8 Oct 2026 11:57:27 -0500 Subject: [PATCH 11/18] updated dunedaq_integtest_bundle.sh to get test lookup problems to show up in the bundle script summary --- scripts/dunedaq_integtest_bundle.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 8d5512f..a2bccd4 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -532,10 +532,10 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} else echo "" - echo -e "\U1f7e1 WARNING: ${test_name} was not found in the local Python virtual environment (.venv dir)." - echo -e "\U1f7e1 WARNING: This can happen when the Python package needs to be (re?)installed locally, or when" - echo -e "\U1f7e1 WARNING: it has been installed with the '-e' option. Please try re-installing the ${test_repo}" - echo -e "\U1f7e1 WARNING: package without the '-e' option (e.g. 'pip install .') or re-running 'dbt-build'." + echo -e "\U1f7e1 WARNING: ${test_name} was not found in the local Python virtual environment (.venv dir)." | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U1f7e1 WARNING: This can happen when the Python package needs to be (re?)installed locally, or when" | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U1f7e1 WARNING: it has been installed with the '-e' option. Please try re-installing the ${test_repo}" | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U1f7e1 WARNING: package without the '-e' option (e.g. 'pip install .') or re-running 'dbt-build'." | CaptureOutput ${ITGRUNNER_LOG_FILE} fi elif [[ "${DST_BASEREL_PYTHON_VENV_DIR}" != "" ]] && \ @@ -549,8 +549,8 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do else echo "" - echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} (Python) repo." - echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." + echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} (Python) repo." | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." | CaptureOutput ${ITGRUNNER_LOG_FILE} fi # handle tests in C++ repositories @@ -571,14 +571,14 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do else echo "" - echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} (C++) repo." - echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." + echo -e "\U0001F534 ERROR: Unable to find ${test_name} in the ${test_repo} (C++) repo." | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." | CaptureOutput ${ITGRUNNER_LOG_FILE} fi else echo "" - echo -e "\U0001F534 ERROR: Unexpected repo type for the '${test_repo}' repo: \"${repo_type}\"." - echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." + echo -e "\U0001F534 ERROR: Unexpected repo type for the '${test_repo}' repo: \"${repo_type}\"." | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U0001F534 ERROR: This should not have happened. Please contact daqsystemtest developers." | CaptureOutput ${ITGRUNNER_LOG_FILE} fi let pytest_return_code=${PIPESTATUS[0]} @@ -685,7 +685,7 @@ echo "" | CaptureOutput ${ITGR date | CaptureOutput ${ITGRUNNER_LOG_FILE} echo "Log file is: ${ITGRUNNER_LOG_FILE}" | CaptureOutput ${ITGRUNNER_LOG_FILE} echo "" | CaptureOutput ${ITGRUNNER_LOG_FILE} -summary_string="`egrep $'=====|\u2B95' ${ITGRUNNER_LOG_FILE} | egrep ' in |Running'`" +summary_string="`egrep $'=====|\u2B95|\U1f7e1 WARNING|\U0001F534 ERROR' ${ITGRUNNER_LOG_FILE} | egrep ' in |Running|WARNING|ERROR'`" colorized_summary_string="`echo \"${summary_string}\" | sed 's/passed/passed \\\\U2705/' | sed 's/failed/failed \\\\U274c/' | sed 's/\(errors\?\)/\1 \\\\U1F6A8/' | sed 's/no tests ran/no tests ran \\\\U1F6A8/' | sed 's/skipped/skipped \\\\U1f7e1/'`" echo -e "${colorized_summary_string}" | CaptureOutput ${ITGRUNNER_LOG_FILE} From 4d3825e9f53ca695cf2e56a0c60b4d28e79a9e80 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 12 Oct 2026 08:49:39 -0500 Subject: [PATCH 12/18] Updated list_available_integtests.sh to use the env vars set in dst_set_useful_env_vars.sh. --- scripts/dunedaq_integtest_bundle.sh | 2 +- scripts/list_available_integtests.sh | 95 +++++++++++++--------------- 2 files changed, 45 insertions(+), 52 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index a2bccd4..e2f69f7 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -377,6 +377,7 @@ else fi # determine the list of tests +source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh if [[ "${excluded_repo_names}" == "" ]]; then initial_integtest_list=(`list_available_integtests.sh ${requested_repo_list[@]} 2>/dev/null`) else @@ -490,7 +491,6 @@ let number_of_individual_tests=${#filtered_integtest_list[@]} let total_number_of_tests=${number_of_individual_tests}*${individual_test_requested_iterations}*${full_set_requested_interations} # run the tests -source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh let overall_test_index=0 # this is only used for user feedback let full_set_loop_count=0 while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do diff --git a/scripts/list_available_integtests.sh b/scripts/list_available_integtests.sh index 98d2a8c..9457ac7 100755 --- a/scripts/list_available_integtests.sh +++ b/scripts/list_available_integtests.sh @@ -19,8 +19,8 @@ Options: """ } -# global variable(s) -base_rel_dir="" +# initialization +source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh # function to check for a specific string in a list string_in_list() { @@ -42,12 +42,11 @@ string_in_list() { # function to find integtests in a local sourcecode area list_local_sourcecode_tests() { - # check if a local software area exists; return empty list if not - if [[ "$DBT_AREA_ROOT" == "" ]] || [[ "`echo $DBT_AREA_ROOT | grep '^/cvmfs'`" != "" ]]; then + if [[ "$DST_LOCAL_CPP_SOURCE_DIR" == "" ]]; then return 1 fi local repo_name="$1" - tmp_list=(`ls -1 ${DBT_AREA_ROOT}/sourcecode/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + tmp_list=(`ls -1 ${DST_LOCAL_CPP_SOURCE_DIR}/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) if [[ ${#tmp_list[@]} -gt 0 ]]; then integtest_list=(${tmp_list[@]}) return 0 @@ -57,12 +56,11 @@ list_local_sourcecode_tests() { # function to find integtests in a local pythoncode area list_local_pythoncode_tests() { - # check if a local software area exists; return empty list if not - if [[ "$DBT_AREA_ROOT" == "" ]] || [[ "`echo $DBT_AREA_ROOT | grep '^/cvmfs'`" != "" ]]; then + if [[ "$DST_LOCAL_PYTHON_SOURCE_DIR" == "" ]]; then return 1 fi local repo_name="$1" - tmp_list=(`ls -1 ${DBT_AREA_ROOT}/pythoncode/${repo_name}/src/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + tmp_list=(`ls -1 ${DST_LOCAL_PYTHON_SOURCE_DIR}/${repo_name}/src/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) if [[ ${#tmp_list[@]} -gt 0 ]]; then integtest_list=(${tmp_list[@]}) return 0 @@ -72,13 +70,11 @@ list_local_pythoncode_tests() { # function to find integtests in base release C++ repos list_baserel_cpp_tests() { - if [[ "${base_rel_dir}" == "" ]]; then - dbt_info_output=`dbt-info release` - base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` + if [[ "$DST_BASEREL_CPP_SOURCE_DIR" == "" ]]; then + return 1 fi - local repo_name="$1" - tmp_list=(`ls -1d ${base_rel_dir}/sourcecode/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + tmp_list=(`ls -1d ${DST_BASEREL_CPP_SOURCE_DIR}/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) if [[ ${#tmp_list[@]} -gt 0 ]]; then integtest_list=(${tmp_list[@]}) return 0 @@ -86,26 +82,27 @@ list_baserel_cpp_tests() { return 1 } -# function to find integtests in local or base release Python virtual environment -list_venv_py_tests() { - if [[ "${base_rel_dir}" == "" ]]; then - dbt_info_output=`dbt-info release` - base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` +# function to find integtests in local Python virtual environment +list_local_venv_py_tests() { + if [[ "$DST_LOCAL_PYTHON_VENV_DIR" == "" ]]; then + return 1 fi - local repo_name="$1" - - # local or base release, depending on environment setup - if [[ -e ${DBT_AREA_ROOT}/.venv ]]; then - tmp_list=(`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) - if [[ ${#tmp_list[@]} -gt 0 ]]; then - integtest_list=(${tmp_list[@]}) - return 0 - fi + tmp_list=(`ls -1d ${DST_LOCAL_PYTHON_VENV_DIR}/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) + if [[ ${#tmp_list[@]} -gt 0 ]]; then + integtest_list=(${tmp_list[@]}) + return 0 fi + return 1 +} - # base release, always checked, for completeness - tmp_list=(`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) +# function to find integtests in base release Python virtual environment +list_baserel_venv_py_tests() { + if [[ "$DST_BASEREL_PYTHON_VENV_DIR" == "" ]]; then + return 1 + fi + local repo_name="$1" + tmp_list=(`ls -1d ${DST_BASEREL_PYTHON_VENV_DIR}/${repo_name}/integtest/*_test.py 2>/dev/null | xargs -r -n 1 basename | sort -u`) if [[ ${#tmp_list[@]} -gt 0 ]]; then integtest_list=(${tmp_list[@]}) return 0 @@ -193,37 +190,33 @@ for repo_name in "${repo_list[@]}"; do integtest_list=() if list_local_sourcecode_tests ${repo_name} || \ list_local_pythoncode_tests ${repo_name} || \ + list_local_venv_py_tests ${repo_name} || \ list_baserel_cpp_tests ${repo_name} || \ - list_venv_py_tests ${repo_name}; then + list_baserel_venv_py_tests ${repo_name}; then for test_name in "${integtest_list[@]}"; do echo "${repo_name}/${test_name}" done else echo "-> No integtests were found for repository \"${repo_name}\"." >&2 - if [[ "${base_rel_dir}" == "" ]]; then - dbt_info_output=`dbt-info release` - base_rel_dir=`echo "${dbt_info_output}" | grep 'Release dir' | awk '{print $3}'` - fi - # The following logic is simply an attempt to provide a little more information - # about *why* the integtest was not found. It attemts to take into account + # about *why* the integtest was not found. It tries to take into account # differences between C++ packages and Python packages. - if [[ -e "${DBT_AREA_ROOT}/sourcecode/${repo_name}" ]] && \ - [[ ! -e "${DBT_AREA_ROOT}/sourcecode/${repo_name}/integtest" ]]; then - echo "-> No integtest directory was found in ${DBT_AREA_ROOT}/sourcecode/${repo_name}." >&2 - elif [[ -e "${DBT_AREA_ROOT}/pythoncode/${repo_name}" ]] && \ - [[ ! -e "${DBT_AREA_ROOT}/pythoncode/${repo_name}/integtest" ]]; then - echo "-> No integtest directory was found in ${DBT_AREA_ROOT}/pythoncode/${repo_name}/src/${repo_name}." >&2 - elif [[ "`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name} 2>/dev/null`" != "" ]] && \ - [[ "`ls -1d ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name}/integtest 2>/dev/null`" == "" ]]; then - echo "-> No integtest directory was found in ${DBT_AREA_ROOT}/.venv/lib/python*/site-packages/${repo_name}." >&2 - elif [[ "`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name} 2>/dev/null`" != "" ]] && \ - [[ "`ls -1d ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name}/integtest 2>/dev/null`" = "" ]]; then - echo "-> No integtest directory was found in ${base_rel_dir}/.venv/lib/python*/site-packages/${repo_name}." >&2 - elif [[ -e "${base_rel_dir}/sourcecode/${repo_name}" ]] && \ - [[ ! -e "${base_rel_dir}/sourcecode/${repo_name}/integtest" ]]; then - echo "-> No integtest directory was found in ${base_rel_dir}/sourcecode/${repo_name}." >&2 + if [[ -e "${DST_LOCAL_CPP_SOURCE_DIR}/${repo_name}" ]] && \ + [[ ! -e "${DST_LOCAL_CPP_SOURCE_DIR}/${repo_name}/integtest" ]]; then + echo "-> No integtest directory was found in ${DST_LOCAL_CPP_SOURCE_DIR}/${repo_name}." >&2 + elif [[ -e "${DST_LOCAL_PYTHON_SOURCE_DIR}/${repo_name}" ]] && \ + [[ ! -e "${DST_LOCAL_PYTHON_SOURCE_DIR}/${repo_name}/src/${repo_name}/integtest" ]]; then + echo "-> No integtest directory was found in ${DST_LOCAL_PYTHON_SOURCE_DIR}/${repo_name}/src/${repo_name}." >&2 + elif [[ -e "${DST_LOCAL_PYTHON_VENV_DIR}/${repo_name}" ]] && \ + [[ ! -e "${DST_LOCAL_PYTHON_VENV_DIR}/${repo_name}/integtest" ]]; then + echo "-> No integtest directory was found in ${DST_LOCAL_PYTHON_VENV_DIR}/${repo_name}." >&2 + elif [[ -e "${DST_BASEREL_PYTHON_VENV_DIR}/${repo_name}" ]] && \ + [[ ! -e "${DST_BASEREL_PYTHON_VENV_DIR}/${repo_name}/integtest" ]]; then + echo "-> No integtest directory was found in ${DST_BASEREL_PYTHON_VENV_DIR}/${repo_name}." >&2 + elif [[ -e "${DST_BASEREL_CPP_SOURCE_DIR}/${repo_name}" ]] && \ + [[ ! -e "${DST_BASEREL_CPP_SOURCE_DIR}/${repo_name}/integtest" ]]; then + echo "-> No integtest directory was found in ${DST_BASEREL_CPP_SOURCE_DIR}/${repo_name}." >&2 fi fi done From e45f5b301eae44cadff61fbf9d66ab0c8d61976f Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 12 Oct 2026 10:00:47 -0500 Subject: [PATCH 13/18] renamed dst_set_useful_env_vars.sh as dst_set_integtest_env_vars.sh --- ...dst_set_useful_env_vars.sh => dst_set_integtest_env_vars.sh} | 0 scripts/dunedaq_integtest_bundle.sh | 2 +- scripts/get_repo_type.sh | 2 +- scripts/list_available_integtests.sh | 2 +- scripts/list_repos_with_integtests.sh | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename scripts/{dst_set_useful_env_vars.sh => dst_set_integtest_env_vars.sh} (100%) diff --git a/scripts/dst_set_useful_env_vars.sh b/scripts/dst_set_integtest_env_vars.sh similarity index 100% rename from scripts/dst_set_useful_env_vars.sh rename to scripts/dst_set_integtest_env_vars.sh diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index e2f69f7..fe7d88a 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -377,7 +377,7 @@ else fi # determine the list of tests -source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh +source $DAQSYSTEMTEST_SHARE/../bin/dst_set_integtest_env_vars.sh if [[ "${excluded_repo_names}" == "" ]]; then initial_integtest_list=(`list_available_integtests.sh ${requested_repo_list[@]} 2>/dev/null`) else diff --git a/scripts/get_repo_type.sh b/scripts/get_repo_type.sh index 75f46c6..3b5b06c 100755 --- a/scripts/get_repo_type.sh +++ b/scripts/get_repo_type.sh @@ -18,7 +18,7 @@ if [[ "$DBT_AREA_ROOT" == "" ]]; then exit fi -source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh +source $DAQSYSTEMTEST_SHARE/../bin/dst_set_integtest_env_vars.sh if [[ "${DST_LOCAL_SPACK_INSTALL_DIR}" != "" ]] && \ [[ -e "${DST_LOCAL_SPACK_INSTALL_DIR}/${repo_name}" ]]; then diff --git a/scripts/list_available_integtests.sh b/scripts/list_available_integtests.sh index 9457ac7..65c84e5 100755 --- a/scripts/list_available_integtests.sh +++ b/scripts/list_available_integtests.sh @@ -20,7 +20,7 @@ Options: } # initialization -source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh +source $DAQSYSTEMTEST_SHARE/../bin/dst_set_integtest_env_vars.sh # function to check for a specific string in a list string_in_list() { diff --git a/scripts/list_repos_with_integtests.sh b/scripts/list_repos_with_integtests.sh index 71ec5bb..985f1f3 100755 --- a/scripts/list_repos_with_integtests.sh +++ b/scripts/list_repos_with_integtests.sh @@ -28,7 +28,7 @@ fi # initialization all_integtest_paths=() -source $DAQSYSTEMTEST_SHARE/../bin/dst_set_useful_env_vars.sh +source $DAQSYSTEMTEST_SHARE/../bin/dst_set_integtest_env_vars.sh # let the user know what is happening echo "" >&2 From 677470072342e8f598ef31ff449ee2eaa5c6004a Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 12 Oct 2026 10:32:59 -0500 Subject: [PATCH 14/18] removed the unneeded full path informantion when sourcing dst_set_integtest_env_vars.sh --- scripts/dunedaq_integtest_bundle.sh | 2 +- scripts/get_repo_type.sh | 2 +- scripts/list_available_integtests.sh | 2 +- scripts/list_repos_with_integtests.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index fe7d88a..2ef97a4 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -377,7 +377,7 @@ else fi # determine the list of tests -source $DAQSYSTEMTEST_SHARE/../bin/dst_set_integtest_env_vars.sh +source dst_set_integtest_env_vars.sh if [[ "${excluded_repo_names}" == "" ]]; then initial_integtest_list=(`list_available_integtests.sh ${requested_repo_list[@]} 2>/dev/null`) else diff --git a/scripts/get_repo_type.sh b/scripts/get_repo_type.sh index 3b5b06c..f0c28df 100755 --- a/scripts/get_repo_type.sh +++ b/scripts/get_repo_type.sh @@ -18,7 +18,7 @@ if [[ "$DBT_AREA_ROOT" == "" ]]; then exit fi -source $DAQSYSTEMTEST_SHARE/../bin/dst_set_integtest_env_vars.sh +source dst_set_integtest_env_vars.sh if [[ "${DST_LOCAL_SPACK_INSTALL_DIR}" != "" ]] && \ [[ -e "${DST_LOCAL_SPACK_INSTALL_DIR}/${repo_name}" ]]; then diff --git a/scripts/list_available_integtests.sh b/scripts/list_available_integtests.sh index 65c84e5..9472b96 100755 --- a/scripts/list_available_integtests.sh +++ b/scripts/list_available_integtests.sh @@ -20,7 +20,7 @@ Options: } # initialization -source $DAQSYSTEMTEST_SHARE/../bin/dst_set_integtest_env_vars.sh +source dst_set_integtest_env_vars.sh # function to check for a specific string in a list string_in_list() { diff --git a/scripts/list_repos_with_integtests.sh b/scripts/list_repos_with_integtests.sh index 985f1f3..24ab572 100755 --- a/scripts/list_repos_with_integtests.sh +++ b/scripts/list_repos_with_integtests.sh @@ -28,7 +28,7 @@ fi # initialization all_integtest_paths=() -source $DAQSYSTEMTEST_SHARE/../bin/dst_set_integtest_env_vars.sh +source dst_set_integtest_env_vars.sh # let the user know what is happening echo "" >&2 From d723920cf6a890b2be94728422c0dcaa6226467a Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 12 Oct 2026 11:48:32 -0500 Subject: [PATCH 15/18] Added warning message when integtest in local python source directory does not match what is installed locally. --- scripts/dunedaq_integtest_bundle.sh | 15 ++++++++++++--- scripts/get_repo_type.sh | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 2ef97a4..2c35018 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -527,7 +527,16 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do if [[ "${repo_type}" == "Python" ]]; then if [[ "${DST_LOCAL_PYTHON_VENV_DIR}" != "" ]]; then - if [[ -e "${DST_LOCAL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}" ]]; then + if [[ -e "${DST_LOCAL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}" ]] && \ + [[ -e "${DST_LOCAL_PYTHON_SOURCE_DIR}/${test_repo}/src/${test_repo}/integtest/${test_name}" ]] && \ + [[ "`diff ${DST_LOCAL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name} ${DST_LOCAL_PYTHON_SOURCE_DIR}/${test_repo}/src/${test_repo}/integtest/${test_name}`" != "" ]]; then + echo "" + echo -e "\U1f7e1 WARNING: The version of ${test_name} in" | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U1f7e1 WARNING: ${DST_LOCAL_PYTHON_SOURCE_DIR}/${test_repo}/src/${test_repo}/integtest" | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U1f7e1 WARNING: does not match the version found in the local Python virtual environment (.venv dir)." | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U1f7e1 WARNING: This can happen when the Python package needs to be (re?)installed locally." | CaptureOutput ${ITGRUNNER_LOG_FILE} + echo -e "\U1f7e1 WARNING: Please try re-installing ${test_repo} (e.g. 'pip install .') or re-running 'dbt-build'." | CaptureOutput ${ITGRUNNER_LOG_FILE} + elif [[ -e "${DST_LOCAL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}" ]]; then PYTEST_COMMAND+=(${DST_LOCAL_PYTHON_VENV_DIR}/${test_repo}/integtest/${test_name}) "${PYTEST_COMMAND[@]}" | CaptureOutputNoANSI ${ITGRUNNER_LOG_FILE} else @@ -603,8 +612,8 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do script_pid=`jq -r .bundle_script_process_id ${info_file}` individual_test_start_time=`jq -r .individual_test_start_time ${info_file}` if [[ ${script_start_time} -eq ${INITIAL_TIMESTAMP} ]] && \ - [[ ${script_pid} -eq ${CURRENT_PID} ]] && \ - [[ ${individual_test_start_time} -eq ${CURRENT_TIMESTAMP} ]]; then + [[ ${script_pid} -eq ${CURRENT_PID} ]] && \ + [[ ${individual_test_start_time} -eq ${CURRENT_TIMESTAMP} ]]; then current_pytest_rundir=$info_file break fi diff --git a/scripts/get_repo_type.sh b/scripts/get_repo_type.sh index f0c28df..8f22fde 100755 --- a/scripts/get_repo_type.sh +++ b/scripts/get_repo_type.sh @@ -21,7 +21,7 @@ fi source dst_set_integtest_env_vars.sh if [[ "${DST_LOCAL_SPACK_INSTALL_DIR}" != "" ]] && \ - [[ -e "${DST_LOCAL_SPACK_INSTALL_DIR}/${repo_name}" ]]; then + [[ -e "${DST_LOCAL_SPACK_INSTALL_DIR}/${repo_name}" ]]; then echo "CPP" elif [[ "${DST_CORE_BASEREL_SPACK_DIR}" != "" ]] && \ [[ "`ls -1d ${DST_CORE_BASEREL_SPACK_DIR}/${repo_name}* 2>/dev/null | head -1`" != "" ]]; then From abe7d8a0b7d8f46948f44e6ea197f5254791d721 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Thu, 15 Oct 2026 21:03:48 +0200 Subject: [PATCH 16/18] three mods to the bundle script: don't copy large files to 'failed' test dirs, make failed test directories read-able by others, and include a red X by 'warning' messages in the bundle script summary. --- scripts/dunedaq_integtest_bundle.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 2c35018..812ff2b 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -631,13 +631,25 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do echo -e "\U1F535 Copying the files from failed test ${pytest_tmpdir} to ${new_dir}. \U1F535" echo -e "\U1F535 Please note that copied directories from failed tests typically get cleaned up after 26 hours, \U1F535" echo -e "\U1F535 or when 10 newer failures happen, whichever comes first. \U1F535" - cp -pR "${pytest_tmpdir}" "${new_dir}" + # 15-Oct-2026, KAB: added use of rsync with a size limit to avoid + # copying large files (e.g. large HDF5 data files) + if [[ "`which rsync 2>/dev/null`" != "" ]]; then + rsync -a --max-size=200m "${pytest_tmpdir}/" "${new_dir}" + else + cp -pR "${pytest_tmpdir}" "${new_dir}" + fi if [[ $? == 0 ]]; then was_successfully_copied="yes" # 18-Dec-2025, KAB: added the removal of the "current" symbolic links # from inside the copied directory (since they get broken in the copying) rm -f "${new_dir}/configcurrent" rm -f "${new_dir}/runcurrent" + # 15-Oct-2026, KAB: set permissions so that others can see files from failed tests + echo "Changing permissions ${new_dir}" + chmod go+rx ${new_dir} + chmod go+rx ${new_dir}/run* + chmod go+rx ${new_dir}/config* + chmod go+rx ${new_dir}/.. fi fi fi @@ -695,7 +707,7 @@ date | CaptureOutput ${ITGR echo "Log file is: ${ITGRUNNER_LOG_FILE}" | CaptureOutput ${ITGRUNNER_LOG_FILE} echo "" | CaptureOutput ${ITGRUNNER_LOG_FILE} summary_string="`egrep $'=====|\u2B95|\U1f7e1 WARNING|\U0001F534 ERROR' ${ITGRUNNER_LOG_FILE} | egrep ' in |Running|WARNING|ERROR'`" -colorized_summary_string="`echo \"${summary_string}\" | sed 's/passed/passed \\\\U2705/' | sed 's/failed/failed \\\\U274c/' | sed 's/\(errors\?\)/\1 \\\\U1F6A8/' | sed 's/no tests ran/no tests ran \\\\U1F6A8/' | sed 's/skipped/skipped \\\\U1f7e1/'`" +colorized_summary_string="`echo \"${summary_string}\" | sed 's/passed/passed \\\\U2705/' | sed 's/failed/failed \\\\U274c/' | sed 's/warning/warning \\\\U274c/' | sed 's/\(errors\?\)/\1 \\\\U1F6A8/' | sed 's/no tests ran/no tests ran \\\\U1F6A8/' | sed 's/skipped/skipped \\\\U1f7e1/'`" echo -e "${colorized_summary_string}" | CaptureOutput ${ITGRUNNER_LOG_FILE} # check again if the numad daemon is running From 53ac450fb8fdb69a4afbb3dcde390f884fff6fb6 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Fri, 16 Oct 2026 16:08:54 -0500 Subject: [PATCH 17/18] removed debug printout for changing directory permissions for failed test dirs --- scripts/dunedaq_integtest_bundle.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 9a70617..35dd8fd 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -665,7 +665,6 @@ while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do rm -f "${new_dir}/configcurrent" rm -f "${new_dir}/runcurrent" # 15-Oct-2026, KAB: set permissions so that others can see files from failed tests - echo "Changing permissions ${new_dir}" chmod go+rx ${new_dir} chmod go+rx ${new_dir}/run* chmod go+rx ${new_dir}/config* From 595432723bc862d57e46ed141f2bcf078beefa8c Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Thu, 22 Oct 2026 13:29:28 +0200 Subject: [PATCH 18/18] Added yellow circle to bundle script summary when tests are de-selected. --- scripts/dunedaq_integtest_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dunedaq_integtest_bundle.sh b/scripts/dunedaq_integtest_bundle.sh index 9a70617..d344b52 100755 --- a/scripts/dunedaq_integtest_bundle.sh +++ b/scripts/dunedaq_integtest_bundle.sh @@ -727,7 +727,7 @@ date | CaptureOutput ${ITGR echo "Log file is: ${ITGRUNNER_LOG_FILE}" | CaptureOutput ${ITGRUNNER_LOG_FILE} echo "" | CaptureOutput ${ITGRUNNER_LOG_FILE} summary_string="`egrep $'=====|\u2B95|\U1f7e1 WARNING|\U0001F534 ERROR' ${ITGRUNNER_LOG_FILE} | egrep ' in |Running|WARNING|ERROR'`" -colorized_summary_string="`echo \"${summary_string}\" | sed 's/passed/passed \\\\U2705/' | sed 's/failed/failed \\\\U274c/' | sed 's/warning/warning \\\\U274c/' | sed 's/\(errors\?\)/\1 \\\\U1F6A8/' | sed 's/no tests ran/no tests ran \\\\U1F6A8/' | sed 's/skipped/skipped \\\\U1f7e1/'`" +colorized_summary_string="`echo \"${summary_string}\" | sed 's/passed/passed \\\\U2705/' | sed 's/failed/failed \\\\U274c/' | sed 's/warning/warning \\\\U274c/' | sed 's/\(errors\?\)/\1 \\\\U1F6A8/' | sed 's/no tests ran/no tests ran \\\\U1F6A8/' | sed 's/skipped/skipped \\\\U1f7e1/' | sed 's/deselected/deselected \\\\U1f7e1/'`" echo -e "${colorized_summary_string}" | CaptureOutput ${ITGRUNNER_LOG_FILE} # check again if the numad daemon is running