Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 1080
blob08aaca135d2a772c819d384ce924192414fb62ba
1 #!/bin/sh
2 # PCP QA Test No. 1080
3 # Exercise pcp-atop functionality.
5 # Copyright (c) 2015 Red Hat.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 _check_valgrind
17 ATOP="$PCP_BINADM_DIR/pcp-atop"
18 test -f "$ATOP" || _notrun "$ATOP is not installed, skipped"
20 status=1 # failure is the default!
21 $sudo rm -rf $tmp.* $seq.full
22 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
24 _filter()
26 $PCP_AWK_PROG '
27 BEGIN { printing=1; }
28 /^=== std out ===$/ { printing=0; next }
29 /^=== std err ===$/ { printing=1; }
30 { if (printing) { print } }' | \
31 sed \
32 -e '/Command:/{
33 s,'"$ATOP"',PCP-ATOP,g
34 s/ -r .*\/archives/ -r ...\/archives/
35 }' \
36 #end
39 # real QA test starts here
40 _run_valgrind $ATOP 1 3 \
41 | tee -a $here/$seq.full | _filter
42 export PCP_ORIGIN=1.1
43 _run_valgrind $ATOP -r $here/archives/pcp-atop.folio \
44 | tee -a $here/$seq.full | _filter
46 # success, all done
47 status=0
48 exit