#! /bin/sh # PCP QA Test No. 278 # validate newhelp # # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved. # seq=`basename $0` echo "QA output created by $seq" # get standard filters . ./common.product . ./common.filter . ./common.check status=1 # failure is the default! trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 _bogus() { cat >>$2 <$tmp.7 bytes=`cat $tmp.? | wc -c | sed -e 's/ //g'` if [ $PCP_PLATFORM = irix ] then . ./localconfig # V1 support deprecated in PCP 2.3 and/or IRIX 6.5.19 # if [ $PCP_VER -ge 2300 -o $PCP_EOE_VER -ge 6519 ] then vlist="2" rm -f $seq.out && ln $seq.linux $seq.out else vlist="1 2" rm -f $seq.out && ln $seq.irix $seq.out fi elif [ $PCP_PLATFORM = linux -o $PCP_PLATFORM = darwin -o $PCP_PLATFORM = solaris -o $PCP_PLATFORM = freebsd ] then # same output for Linux and Mac OS X and Solaris and FreeBSD # vlist="2" rm -f $seq.out && ln $seq.linux $seq.out else echo bozo! exit fi for version in $vlist do for pass in 1 2 do echo echo "=== newhelp -v $version and pass $pass ===" if newhelp -v $version -V -o $tmp $tmp.? then : else echo "Error: newhelp failed!" exit fi size=`wc -c <$tmp.pag | sed -e 's/ //g'` if [ "$size" -lt "$bytes" ] then echo "Error: .pag file too small ($size < $bytes)" ls -l $tmp.? echo ls -l $tmp.pag $tmp.dir exit fi echo "=== check text, expect no diff output ===" for m in sample.long.hundred sample.longlong.million sample.float.one \ sample.double.ten sample.string.hullo sample.aggregate.null do echo $m: echo >$tmp.check _bogus $m $tmp.check if chkhelp -v $version -HO $tmp $m >$tmp.out 2>&1 then sed <$tmp.out \ -e '/^PMID/{ s/PMID [^ ]* /@ / s/:// }' \ | diff - $tmp.check else cat $tmp.out echo "Error: chkhelp failed!" exit fi done done done # success, all done status=0 exit