#! /bin/sh # PCP QA Test No. 153 # Check out pmafm/mkaf changes to no longer use file(1) # # Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved. # seq=`basename $0` echo "QA output created by $seq" # get standard environment, filters and checks . ./common.product . ./common.filter . ./common.check status=0 # success is the default! $sudo rm -rf $tmp.* trap "cd $here; rm -rf $tmp; exit \$status" 0 1 2 3 15 rm -rf $tmp mkdir $tmp cp src/bar.* $tmp cd $tmp mkdir foo cp bar.* foo _filter() { sed \ -e 's/\(Created: on \).*/\1 .../' \ -e 's/pmchart/kmchart/' \ | $PCP_AWK_PROG ' $1 == "Archive:" { $2 = "somehost" } $1 == "Host:" { $2 = "somehost" } $2 ~ /[0-9]]$/ { $3 = "somehost" } { print }' } # real QA test starts here # ok with simple files mkaf bar.* >f_ok _filter f_bad [ -f f_bad ] && _filter not-archive mkaf short not-archive >f_bad [ -f f_bad ] && _filter f_ok [ -f f_ok ] && _filter f_ok _filter