#!/bin/sh # PCP QA Test No. 722 # Exercise the python pmatop implementation # # Copyright (c) 2013-2014 Red Hat. # 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 -f $tmp.* $seq.full trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 remove_extra_whitespace() { sed \ -e 's/>>>.*<</dev/null 2>&1 if [ $? -ne 0 ]; then PMATOP=pmatop which $PMATOP >/dev/null 2>&1 || _notrun "pmatop not installed" fi # real QA test starts here $PMATOP -r $here/src/pmatop-log.folio -m 1 1 | redact_header | remove_extra_whitespace | tee -a $tmp.out 2>&1 $PMATOP -r $here/src/pmatop-log.folio -g 1 1 | redact_header | remove_extra_whitespace | tee -a $tmp.out 2>&1 $PMATOP -w test.pmatop 0.2 10 if pmafm test.pmatop check | grep -q OK then echo pmatop log creation OK | tee -a $tmp.out 2>&1 else echo pmatop log creation FAILED | tee -a $tmp.out 2>&1; fi cat $tmp.out >>$here/$seq.full # success, all done eval `pmafm test.pmatop remove` status=0 exit