From 198b19041a071e37019bd0605b36f8a87124f078 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Thu, 23 Jul 2026 10:21:35 -0500 Subject: [PATCH 1/3] Use test_daq-buildtools.sh from daq-release --- .github/workflows/test_daq_buildtools.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index 6652e12..fd561e1 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -31,24 +31,24 @@ jobs: - name: Pull latest nightly build image run: docker pull ghcr.io/dune-daq/nightly-release-alma9:development_v5 - - id: checkout_daq_buildtools + - name: Checkout daq-release uses: actions/checkout@v6 with: - path: daq-buildtools-test + repository: DUNE-DAQ/daq-release + path: daq-release persist-credentials: false - - name: Run test_daq-buildtools script + - name: Run test_daq-buildtools script from daq-release run: | + echo "pwd: $(pwd)" + echo "ls -lrt: $(ls -lrt)" BRANCH="${{ inputs.dbt-branch || github.head_ref || github.ref_name }}" - cd daq-buildtools-test - source env.sh - cd scripts docker run --rm \ -v /cvmfs:/cvmfs:shared \ - -v "$PWD":/workspace \ - -w /workspace \ + -v "${GITHUB_WORKSPACE}:/ghw" \ + -w /ghw \ ghcr.io/dune-daq/nightly-release-alma9:development_v5 \ - ./test_daq-buildtools.sh --dbt-branch $BRANCH + ./daq-release/scripts/test_daq-buildtools.sh --dbt-branch $BRANCH From 04268126eec5d4f5ff84f4cbb0741b8fd1205d81 Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Thu, 23 Jul 2026 11:23:26 -0500 Subject: [PATCH 2/3] Remove print statements --- .github/workflows/test_daq_buildtools.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index fd561e1..8dc54d0 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -40,8 +40,6 @@ jobs: - name: Run test_daq-buildtools script from daq-release run: | - echo "pwd: $(pwd)" - echo "ls -lrt: $(ls -lrt)" BRANCH="${{ inputs.dbt-branch || github.head_ref || github.ref_name }}" docker run --rm \ -v /cvmfs:/cvmfs:shared \ From ba3d13fde29134cb7a1663e53c8eb05c1e8833fd Mon Sep 17 00:00:00 2001 From: Andrew Mogan Date: Thu, 23 Jul 2026 11:24:05 -0500 Subject: [PATCH 3/3] Remove redundant test_daq-buildtools.sh --- scripts/test_daq-buildtools.sh | 166 --------------------------------- 1 file changed, 166 deletions(-) delete mode 100755 scripts/test_daq-buildtools.sh diff --git a/scripts/test_daq-buildtools.sh b/scripts/test_daq-buildtools.sh deleted file mode 100755 index d844d6a..0000000 --- a/scripts/test_daq-buildtools.sh +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/bash - -usage() { - local prog=$(basename "$0") - cat << EOF -Usage: $prog [OPTIONS] - -Test functionality of daq-buildtools commands. - -Optional arguments: - --release Release in which to test daq-buildtools commands. [default: last_fddaq] - --dbt-branch Branch of daq-buildtools to run tests from. [default: develop] - --repo Name of a single repo to checkout for tests. [default: ipm] - -Example: - ./${prog} --release fddaq-v5.5.0-a9 --dbt-branch user/new_feature --repo hdf5libs -EOF -} - -start_dir="$PWD" - -cleanup() { - echo "Triggering cleanup" - cd "$start_dir" - rm -rf "$dbt_tmpdir" - rm -rf "$release_tmpdir" - echo "Done" -} -trap cleanup EXIT SIGINT SIGTERM - -release="last_fddaq" -repo="ipm" -pyrepo="daqpytools" -dbt_branch="develop" - -validate_arg() { - if [[ -z "$2" || "$2" == -* ]]; then - echo "ERROR: $1 requires an argument." - exit 2 - fi -} - -while [[ $# -gt 0 ]]; do - case "$1" in - -h|--help|-?) - usage - exit 1 - ;; - --release) - validate_arg $1 $2 - release="$2" - shift 2 - ;; - --repo) - validate_arg $1 $2 - repo="$2" - shift 2 - ;; - --dbt-branch) - validate_arg $1 $2 - dbt_branch="$2" - shift 2 - ;; - *) - echo "ERROR: Unknown argument: $1" - exit 1 - ;; - esac -done - -extra_args=() -if [[ "$release" == *"FD_"* || "$release" == "last_fddaq" ]]; then - extra_args=(-n) -elif [[ "$release" == *"rc"* ]]; then - extra_args=(-b candidate) -fi - -echo -e "Running daq-buildtools commands using:\n" -echo -e "\tRelease name: $release" -echo -e "\tdbt branch: $dbt_branch" -echo -e "\trepo: $repo" -echo -e "\tpyrepo: $pyrepo\n" - -. /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh || exit 1 -setup_dbt latest_v5 || exit 2 - -if [[ -n "dbt_branch" ]]; then - dbt_tmpdir=$(mktemp -d) - mkdir -p "$dbt_tmpdir" && cd "$dbt_tmpdir" - git clone https://github.com/DUNE-DAQ/daq-buildtools.git -b "$dbt_branch" - source daq-buildtools/env.sh -fi - -release_tmpdir=$(mktemp -d) -mkdir -p "$release_tmpdir" && cd "$release_tmpdir" - -echo "*********************************TEST dbt-setup-release *******************************" -# Check that dbt-setup-release works without altering the environment, thus the (...) -(dbt-setup-release "${extra_args[@]}" "$release"; echo $? > $release_tmpdir/dbt-setup-release_result.txt) - -test -e $release_tmpdir/dbt-setup-release_result.txt || exit 3 -test $( cat $release_tmpdir/dbt-setup-release_result.txt ) == 0 || exit 4 -rm -f dbt-setup-release_result.txt - -echo "*********************************TEST dbt-create ***************************************" -dbt-create -s ${extra_args[@]} $release || exit 5 -cd $(ls) # Only thing in the directory will be the work area - - -cd pythoncode -git clone https://github.com/DUNE-DAQ/$pyrepo || exit 16 -cd .. -. env.sh || exit 17 -rm -f .venv/lib64/python*/site-packages/$pyrepo/__init__.py || exit 18 - -echo "******************************TEST dbt-build (Python) *************************************" -dbt-build || exit 19 -find .venv/lib64/python*/site-packages/$pyrepo/__init__.py | read || exit 20 -rm -rf pythoncode/$pyrepo - -cd sourcecode -git clone https://github.com/DUNE-DAQ/$repo || exit 6 -cd .. -. env.sh || exit 7 - -echo "******************************TEST dbt-build (C++) *************************************" -dbt-build || exit 8 - -echo "******************************TEST dbt-build --unittest *********************************" -dbt-build --unittest || exit 9 - -if spack find --loaded llvm >/dev/null 2>&1; then - echo "******************************TEST dbt-build --lint *************************************" - dbt-build --lint || exit 10 - - echo "******************************TEST dbt-clang-format.sh *************************************" - cd $DBT_AREA_ROOT/sourcecode - dbt-clang-format.sh $repo --view-differences-only || exit 11 - cd .. -else - echo "WARNING: Skipping dbt-build --lint and dbt-clang-format.sh since llvm is not loaded" -fi - -if spack find --loaded lcov >/dev/null 2>&1; then - echo "*********************************TEST dbt-lcov.sh****************************************" - dbt-lcov.sh || exit 12 -else - echo "WARNING: Skipping dbt-lcov.sh since lcov is not loaded" -fi - -# Test building against a sourcecode directory outside of the work area -echo "***********************TEST dbt-build with external sourcecode **************************" -mv sourcecode $release_tmpdir -ln -s $release_tmpdir/sourcecode -dbt-build --clean || exit 13 - -echo "*****************************TEST dbt-build --codegen **********************************" -dbt-build --codegen || exit 14 - - -echo "********************TEST local workarea Spack package installation **********************" -spack install py-wesanderson || exit 15 - -echo "Testing completed successfully." - -exit 0