3 FILESTOCHECK="rec_Barrel.log rec_Outer.log calib.log AliESDs_Barrel.root AliESDfriends_v1.root"
5 validateout=`dirname $0`
7 if [ -z "$validateout" ]; then
15 echo "* *****************************************************"
16 echo "* AliRoot Validation Script V2.0 *"
18 echo "* Dir: $validateout"
19 echo "* Workdir: $validateworkdir"
20 echo "* ----------------------------------------------------*"
22 for subdir in . Barrel OuterDet; do
23 if [ -d "$subdir" ]; then
24 echo "Listing $subdir"
30 echo "* ----------------------------------------------------*"
33 if [ -f OCDB.generating.job ]; then
34 echo "* This was a special OCDB.root job for which I'll skip the rest of the validation" >> stdout
36 mv stdout stdout.ocdb.log 2>/dev/null
37 mv stderr stderr.ocdb.log 2>/dev/null
38 mv rec.log stdrec.ocdb.log 2>/dev/null
40 if [ -f OCDB.root ]; then
41 echo "* ODCB.root found" >> stdout.ocdb.log
44 echo "* Error: OCDB.root NOT found! Failing validation" >> stdout.ocdb.log
51 for file in $FILESTOCHECK; do
52 if [ ! -f "$file" ]; then
54 echo "* Error: Required file $file not found in the output" >> stdout
58 for message in "std::bad_alloc" "Segmentation violation" "Segmentation fault" "Bus error" "Break" "Floating point exception" "Killed" "busy flag cleared"; do
59 found=`grep -i -n -m 1 "$message" *.log`
60 if [ ! -z "$found" ]; then
62 echo "* Found error message '$message' in the logs:"
72 if [ $error -eq 0 ]; then
73 echo "* ################ Job validated ####################"
75 echo "* ################ Job NOT validated, error code $error ################"
76 # echo "* ########## Removing all ROOT files from the local directory, leaving only the logs ###"