Revision e4b66f14 snf-tools/conf/snf-burnin-details.sh

b/snf-tools/conf/snf-burnin-details.sh
3 3
#Print the details for testcases that failed the last 30 minutes. 
4 4
#Usage: ./snf-burnin-details.sh LOG_FOLDER
5 5

  
6
path=$1
7
flag=0
6 8
curr=$(date -d "30 minutes ago" +%Y%m%d%H%M%S)
7
for file in ${1}/*/*/detail* ; do
9
for dir in `find ${path} -maxdepth 1 -type d -cmin -60`; do
8 10

  
9
    x=`dirname $file`
10
    y=`dirname $x`
11
    d=`basename $y`
12

  
13
    if (($d<$curr)); then
14
    	if grep -E "(ERROR)|(FAILED)" "$file" >/dev/null; then
15
    	    cat "$file"
16
	    flag=1
17
    	fi
11
    if [ x"$dir" == "x${path}" ]; then
12
	continue
18 13
    fi
14
    for file in $dir/*/detail* ; do
15

  
16
	x=`dirname $file`
17
	y=`dirname $x`
18
	d=`basename $y`
19

  
20
	if (($d<$curr)); then
21
	    if grep -E "(ERROR)|(FAILED)" "$file" >/dev/null; then
22
		cat "$file"
23
		flag=1
24
	    fi
25
	fi
26
    done
19 27
done
28
exit
20 29

  
21 30
if [ $flag -ge 1 ]; then 
22 31
    exit 1
23 32
else
24 33
    exit 0
25
fi
34
fi

Also available in: Unified diff