Statistics
| Branch: | Tag: | Revision:

root / snf-tools / conf / snf-burnin-output.sh @ c3ff5c37

History | View | Annotate | Download (512 Bytes)

1
#! /bin/bash
2

    
3
#Example script to check current status. 
4
#Checks for testcases that failed the last 30 minutes in a given folder.
5
 
6
#Usage: ./check-burnin-output.sh LOG_FOLDER
7

    
8
curr=$(date -d "30 minutes ago" +%Y%m%d%H%M%S)
9
for dir in ${1}/* ; do
10
    d=`basename $dir`
11
    if (($d>$curr)); then
12
	if find "$dir"/* -type f -size +0 | grep failed >/dev/null; then
13
	    echo snf-burnin encountered a testcase failure. See log for details...
14
	    exit 1
15
	fi
16
	echo No testcase failure encountered...
17
	exit 0
18
    fi
19
done