Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (512 Bytes)

1 56d5c612 John Giannelos
#! /bin/bash
2 56d5c612 John Giannelos
3 56d5c612 John Giannelos
#Example script to check current status. 
4 56d5c612 John Giannelos
#Checks for testcases that failed the last 30 minutes in a given folder.
5 56d5c612 John Giannelos
 
6 56d5c612 John Giannelos
#Usage: ./check-burnin-output.sh LOG_FOLDER
7 56d5c612 John Giannelos
8 56d5c612 John Giannelos
curr=$(date -d "30 minutes ago" +%Y%m%d%H%M%S)
9 56d5c612 John Giannelos
for dir in ${1}/* ; do
10 56d5c612 John Giannelos
    d=`basename $dir`
11 56d5c612 John Giannelos
    if (($d>$curr)); then
12 56d5c612 John Giannelos
	if find "$dir"/* -type f -size +0 | grep failed >/dev/null; then
13 56d5c612 John Giannelos
	    echo snf-burnin encountered a testcase failure. See log for details...
14 56d5c612 John Giannelos
	    exit 1
15 56d5c612 John Giannelos
	fi
16 56d5c612 John Giannelos
	echo No testcase failure encountered...
17 56d5c612 John Giannelos
	exit 0
18 56d5c612 John Giannelos
    fi
19 56d5c612 John Giannelos
done