/var/lib/pcp/testsuite/show-me is in pcp-testsuite 3.8.12ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | #!/bin/sh
#
# Show me the QA tests that did not pass
#
# Copyright (c) 1997-2002 Silicon Graphics, Inc. All Rights Reserved.
#
# generic initialization
iam=show-me
. ./common.rc
HOST=`hostname`
QA_HOST=
QA_USER=
QA_DIR=
if which gdiff >/dev/null 2>&1
then
DIFF=gdiff
else
if which meld >/dev/null 2>&1
then
DIFF=meld
else
if which xxdiff >/dev/null 2>&1
then
DIFF=xxdiff
else
DIFF="diff -c"
fi
fi
fi
tmp=/tmp/$$
trap "cd /; rm -rf $tmp; exit" 0 1 2 3 15
rm -rf $tmp
mkdir $tmp
not_me=false
local=true
keep=false
while getopts d:h:klu: c
do
case $c in
d) QA_DIR=$OPTARG
not_me=true
;;
h) QA_HOST=$OPTARG
local=false
;;
k) keep=true
;;
l) DIFF="diff -c"
;;
u) QA_USER=$OPTARG
not_me=true
;;
\?) echo "Usage: show-me [-l] [-k] [-d dir] [-h host] [-u user] [test ...]"
exit 2;;
esac
done
shift `expr $OPTIND - 1`
if [ -z "$QA_DIR" ]
then
if [ -z "$QA_HOST" -o "$QA_HOST" = localhost -o "$QA_HOST" = "`hostname`" ]
then
if [ -z "$QA_USER" -o "$QA_USER" = "$LOGNAME" ]
then
# local and really me
QA_DIR_DEFAULT=`pwd`
else
QA_DIR_DEFAULT=`ssh $QA_USER@$QA_HOST "/bin/ls -d isms/pcp[1-9]*/qa" 2>/dev/null | grep '^isms/' | tail -1`
fi
else
QA_DIR_DEFAULT=`ssh $QA_USER@$QA_HOST "/bin/ls -d isms/pcp[1-9]*/qa" 2>/dev/null | grep '^isms/' | tail -1`
fi
if [ "$QA_DIR_DEFAULT" = "" ]
then
QA_DIR_DEFAULT=isms/pcp/qa
fi
QA_DIR="$QA_DIR_DEFAULT"
fi
if [ $# -eq -0 ]
then
if $local
then
list="`echo *.out.bad \
| tr ' ' '\012' \
| sed -e 's/\.out\.bad//' \
| LC_COLLATE=POSIX sort -n`"
if [ "$list" = '*' ]
then
echo "No failing tests!"
exit
fi
set - `echo $list`
else
x=`ssh $QA_USER@$QA_HOST echo $QA_DIR/\[0-9]*.out.bad 2>$tmp.err`
if [ -z "$x" ]
then
if [ -s $tmp.err ]
then
echo "ssh failed?"
cat $tmp.err
else
echo "No failing tests!"
fi
exit
fi
set - `echo "$x" \
| tr ' ' '\012' \
| sed -e 's/.*\///' -e 's/.out.bad//' \
| LC_COLLATE=POSIX sort -n`
echo "Failing tests: $*"
fi
fi
unset ROOT TOOLROOT MAKEFLAGS
quick=true
check=false
. ./common
here=`pwd`
for id
do
case "$id"
in
[0-9])
id=00$id
;;
[0-9][0-9])
id=0$id
;;
esac
if [ "$QA_HOST" != $HOST ]
then
echo "Fetch files from $QA_USER@$QA_HOST:$QA_DIR ..."
rm -f $tmp/$id.out.bad $tmp/$id.out
scp $QA_USER@$QA_HOST:$QA_DIR/$id.out.bad $tmp
scp $QA_USER@$QA_HOST:$QA_DIR/$id.out $tmp
cd $tmp
elif $not_me
then
if [ -d $QA_DIR ]
then
cd $QA_DIR
else
echo "$id: No directory: $QA_DIR"
exit 1
fi
fi
$PCP_ECHO_PROG $PCP_ECHO_N "$id: ""$PCP_ECHO_C"
if [ ! -f $id.out ]
then
echo "Could not find $id.out in `pwd`"
elif [ ! -f $id.out.bad ]
then
echo "Could not find $id.out.bad in `pwd`"
else
echo
if [ "$DIFF" = xxdiff ]
then
$DIFF $id.out $id.out.bad >/dev/null 2>&1
else
$DIFF $id.out $id.out.bad
fi
fi
if $keep
then
if [ -f $here/$id.out.bad ]
then
if diff $here/$id.out.bad $id.out.bad >diff.tmp
then
# same
:
else
echo "Warning: overwriting $id.out.bad ... diffs"
cat diff.tmp
rm -f $here/$id.out.bad
mv $id.out.bad $here
fi
else
mv $id.out.bad $here
fi
fi
cd $here
done
|