blob: 624fddd1624b8ea836653a38bc03ff226f85a37d [file] [log] [blame]
Jon Hall6e709752016-02-01 13:38:46 -08001#!/bin/bash
2
3set -e -o pipefail
4
5if [ "$#" -lt 1 ]; then
Jon Hall17673bf2016-03-04 13:01:40 -08006 ls -t ~/OnosSystemTest/TestON/logs/*/*Summary.txt | head -1 | xargs cat | grep -E "^|FAIL"
Jon Hall6e709752016-02-01 13:38:46 -08007 exit 1
8fi
9if [ "$1" = "-f" ]; then
10 # NOTE: This is blocking
Jon Hall17673bf2016-03-04 13:01:40 -080011 ls -t ~/OnosSystemTest/TestON/logs/*/*Summary.txt | head -1 | xargs tail -n+1 -f
Jon Hall6e709752016-02-01 13:38:46 -080012else
13 printf "usage: $(basename $0) [options]\n\n"
14 printf "Simple command to print the latest test summary file.\n"
15 printf "\noptions:\n\t--help : Displays this message and exits\n"
16 printf "\t-f : Tails the summary file and updates as the file is written to.\n\n"
17 exit 1
18fi