Skip to content

Commit 3ba8e86

Browse files
committed
FST: detect detectors with no raw data also on macOS
The check for detectors that produced only empty raw files compared the output of wc -l with "0". BSD wc, as on macOS, pads its count with spaces, so the comparison never matched and an empty raw output went unnoticed: the TRD raw files of a run were all empty, and the test only failed later, when no CTF had been written. grep -c prints the bare count on every platform.
1 parent 933d59e commit 3ba8e86

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎prodtests/full_system_test.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ if [[ $BEAMTYPE == "PbPb" ]] && [ $NEvents -ge 5 ] ; then
222222
CHECK_DETECTORS_RAW+=" EMC PHS HMP"
223223
fi
224224
for i in $CHECK_DETECTORS_RAW; do
225-
if [[ `ls -l raw/$i/*.raw | awk '{print $5}' | grep -v "^0\$" | wc -l` == "0" ]]; then
225+
if [[ `ls -l raw/$i/*.raw | awk '{print $5}' | grep -c -v "^0\$"` == "0" ]]; then
226226
echo "ERROR: Full system test did generate no raw data for $i"
227227
exit 1
228228
fi

0 commit comments

Comments
 (0)