Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ac9d467
Copy test_daq-buildtools.sh from daq-release
andrewmogan Feb 23, 2026
310566d
Add workflow to run test_daq-buildtools on PR
andrewmogan Feb 23, 2026
5e5f119
Trigger test workflow on PR to this branch
andrewmogan Feb 23, 2026
ebfc66f
Merge branch 'develop' of https://github.com/DUNE-DAQ/daq-buildtools …
andrewmogan Feb 23, 2026
7d09eca
Add whitespace
andrewmogan Feb 23, 2026
8cc9acb
Add more whitespace
andrewmogan Feb 23, 2026
9bc10a0
Run on daq
andrewmogan Feb 23, 2026
4ae0c74
Try almalinux9 container
andrewmogan Feb 24, 2026
4fe261e
Try almalinux9 container on ubuntu-latest
andrewmogan Feb 24, 2026
314bf97
Try running in our al9 slim externals image
andrewmogan Feb 24, 2026
d759ace
Comment cvmfs-contrib step
andrewmogan Feb 24, 2026
9c4aefa
Try running in latest nightly build container
andrewmogan Feb 24, 2026
219c47b
Correct container tag
andrewmogan Feb 24, 2026
611d478
Troubleshoot llvm package
andrewmogan Feb 24, 2026
b01385d
Manually validate workflow actor
andrewmogan Feb 24, 2026
859d7e2
Only run dbt-build --lint if llvm is loaded
andrewmogan Feb 24, 2026
c29f2b4
Remove unnecessary steps
andrewmogan Feb 25, 2026
0efa497
Only run dbt-clang-format if llvm is installed
andrewmogan Feb 25, 2026
454c798
Correctly handle cds
andrewmogan Feb 25, 2026
f3f5077
Only run dbt-lcov.sh if lcov is loaded
andrewmogan Feb 25, 2026
73e03a7
JCF: similar to what Andrew did, create a branch specifically to trig…
Feb 25, 2026
c0b2572
JCF: a change for its own sake
Feb 25, 2026
412ccf2
JCF: ensure that dbt-build will return nonzero
Feb 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/test_daq_buildtools.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
name: Test daq-buildtools

permissions:
contents: read

on:
pull_request:
branches: develop
branches:
- develop
- johnfreeman/test_daq_buildtools_workflow
types: [opened, reopened, synchronize]

jobs:
test_daq_buildtools:
name: Test daq-buildtools
runs-on: ubuntu-latest
container:
image: ghcr.io/dune-daq/nightly-release-alma9:development_v5
defaults:
run:
shell: bash

steps:
- id: checkout_daq_buildtools
uses: actions/checkout@v6
with:
path: daq-buildtools-test

- uses: cvmfs-contrib/github-action-cvmfs@v5
with:
cvmfs_repositories: 'dunedaq.opensciencegrid.org'
persist-credentials: false

- name: Run test_daq-buildtools script
run: |
cd daq-buildtools-test
source env.sh
cd scripts
./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }}



4 changes: 4 additions & 0 deletions bin/dbt-build
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/usr/bin/env python3


import os
import sys

print("Intentionally crashing dbt-build out")
sys.exit(1)

if "DBT_ROOT" in os.environ:
DBT_ROOT=os.environ["DBT_ROOT"]
else:
Expand Down
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
_JCF, Feb-25-2026: if you can read this line, please contact me_

# DUNE DAQ Buildtools

_This document was last edited May-28-2025_
Expand Down
141 changes: 141 additions & 0 deletions scripts/test_daq-buildtools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#!/bin/bash

usage() {
local prog=$(basename "$0")
cat << EOF
Usage: $prog [OPTIONS]

Test functionality of daq-buildtools commands.

Optional arguments:
--release <release_name> Release in which to test daq-buildtools commands. [default: last_fddaq]
--dbt-branch <branch_name> Branch of daq-buildtools to run tests from. [default: develop]
--repo <repo_name> 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"
dbt_branch="develop"

while [[ $# -gt 0 ]]; do
case "$1" in
-h|--help|-?)
usage
exit 1
;;
--release)
release="$2"
shift 2
;;
--repo)
repo="$2"
shift 2
;;
--dbt-branch)
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\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 sourcecode
git clone https://github.com/DUNE-DAQ/$repo || exit 6
cd ..
. env.sh || exit 7

echo "**********************************TEST dbt-build ****************************************"
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
Loading