3 # Show me the QA tests that did not pass
5 # Copyright (c) 1997-2002 Silicon Graphics, Inc. All Rights Reserved.
8 # generic initialization
17 if which gdiff
>/dev
/null
2>&1
21 if which meld
>/dev
/null
2>&1
25 if which xxdiff
>/dev
/null
2>&1
35 trap "cd /; rm -rf $tmp; exit" 0 1 2 3 15
42 while getopts d
:h
:klu
: c
63 \?) echo "Usage: show-me [-l] [-k] [-d dir] [-h host] [-u user] [test ...]"
67 shift `expr $OPTIND - 1`
71 if [ -z "$QA_HOST" -o "$QA_HOST" = localhost
-o "$QA_HOST" = "`hostname`" ]
73 if [ -z "$QA_USER" -o "$QA_USER" = "$LOGNAME" ]
78 QA_DIR_DEFAULT
=`ssh $QA_USER@$QA_HOST "/bin/ls -d isms/pcp[1-9]*/qa" 2>/dev/null | grep '^isms/' | tail -1`
81 QA_DIR_DEFAULT
=`ssh $QA_USER@$QA_HOST "/bin/ls -d isms/pcp[1-9]*/qa" 2>/dev/null | grep '^isms/' | tail -1`
83 if [ "$QA_DIR_DEFAULT" = "" ]
85 QA_DIR_DEFAULT
=isms
/pcp
/qa
87 QA_DIR
="$QA_DIR_DEFAULT"
94 list
="`echo *.out.bad \
96 | sed -e 's/\.out\.bad//' \
97 | LC_COLLATE=POSIX sort -n`"
100 echo "No failing tests!"
105 x
=`ssh $QA_USER@$QA_HOST echo $QA_DIR/\[0-9]*.out.bad 2>$tmp.err`
113 echo "No failing tests!"
119 | sed -e 's/.*\///' -e 's/.out.bad//' \
120 | LC_COLLATE=POSIX sort -n`
121 echo "Failing tests: $*"
125 unset ROOT TOOLROOT MAKEFLAGS
142 if [ "$QA_HOST" != $HOST ]
144 echo "Fetch files from $QA_USER@$QA_HOST:$QA_DIR ..."
145 rm -f $tmp/$id.out.bad
$tmp/$id.out
146 scp
$QA_USER@
$QA_HOST:$QA_DIR/$id.out.bad
$tmp
147 scp
$QA_USER@
$QA_HOST:$QA_DIR/$id.out
$tmp
155 echo "$id: No directory: $QA_DIR"
159 $PCP_ECHO_PROG $PCP_ECHO_N "$id: ""$PCP_ECHO_C"
162 echo "Could not find $id.out in `pwd`"
163 elif [ ! -f $id.out.bad
]
165 echo "Could not find $id.out.bad in `pwd`"
168 if [ "$DIFF" = xxdiff
]
170 $DIFF $id.out
$id.out.bad
>/dev
/null
2>&1
172 $DIFF $id.out
$id.out.bad
177 if [ -f $here/$id.out.bad
]
179 if diff $here/$id.out.bad
$id.out.bad
>diff.tmp
184 echo "Warning: overwriting $id.out.bad ... diffs"
186 rm -f $here/$id.out.bad