root / snf-tools / conf / snf-burnin-details.sh @ 5c897720
History | View | Annotate | Download (464 Bytes)
1 |
#! /bin/bash |
---|---|
2 |
|
3 |
#Print the details for testcases that failed the last 30 minutes. |
4 |
#Usage: ./snf-burnin-details.sh LOG_FOLDER |
5 |
|
6 |
curr=$(date -d "30 minutes ago" +%Y%m%d%H%M%S) |
7 |
for file in ${1}/*/*/detail* ; do |
8 |
|
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 |
18 |
fi |
19 |
done |
20 |
|
21 |
if [ $flag -ge 1 ]; then |
22 |
exit 1 |
23 |
else |
24 |
exit 0 |
25 |
fi |