test_fcl_larpandora.sh
Go to the documentation of this file.
1 #! /bin/bash
2 
3 # Loop over all installed fcl files.
4 
5 find $MRB_BUILDDIR/larpandora/job -name \*.fcl -print | while read fcl
6 do
7  echo "Testing fcl file $fcl"
8 
9  # Parse this fcl file.
10 
11  fclout=`basename ${fcl}`.out
12  larout=`basename ${fcl}`.lar.out
13  larerr=`basename ${fcl}`.lar.err
14  lar -c $fcl --debug-config $fclout > $larout 2> $larerr
15 
16  # Exit status 1 counts as success.
17  # Any other exit status exit immediately.
18 
19  stat=$?
20  if [ $stat -ne 0 -a $stat -ne 1 ]; then
21  echo "Error parsing ${fcl}."
22  exit $stat
23  fi
24 
25  # Check for certain kinds of diagnostic output.
26 
27  if egrep -iq 'deprecated|no longer supported' $larerr; then
28  echo "Deprecated fcl construct found in ${fcl}."
29  exit 1
30  fi
31 
32 done