qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 843
blob04d9a7e29b59c0e644fde1c9844f4158b97f1e9f
1 #!/bin/sh
2 # PCP QA Test No. 843
3 # Exercise memory_python PMDA
5 # Copyright (c) 2014 Red Hat.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 . ./common.python
12 $python -c "from pcp import pmda" >/dev/null 2>&1
13 [ $? -eq 0 ] || _notrun "python pcp pmda module not installed"
15 _cleanup()
17 if pmprobe -I pmcd.agent.status | grep '"memory_python"' >/dev/null
18 then
19 cd $here/pmdas/memory_python
20 $sudo ./Remove >>$here/$seq.full 2>&1
21 $sudo rm -f pmns
22 cd $here
26 status=1 # failure is the default!
27 $sudo rm -rf $tmp.* $seq.full
28 trap "cd $here; rm -rf $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
30 cd pmdas/memory_python
31 make clean >>$here/$seq.full 2>&1
33 # real QA test starts here
34 echo | tee -a $here/$seq.full
35 date >>$here/$seq.full
36 cat <<End-of-File | $sudo ./Install
37 both
38 End-of-File
39 date >>$here/$seq.full
40 # Read metrics several times to make sure memory doesn't get corrupted
41 # when clearing metrics.
42 pminfo -f memory_python | tee -a $here/$seq.full
43 pminfo -f memory_python | tee -a $here/$seq.full
44 pminfo -f memory_python | tee -a $here/$seq.full
45 pminfo -f memory_python | tee -a $here/$seq.full
46 pminfo -f memory_python | tee -a $here/$seq.full
47 $sudo cat $PCP_LOG_DIR/pmcd/memory_python.log >>$here/$seq.full
48 $sudo tail -40 $PCP_LOG_DIR/pmcd/pmcd.log >>$here/$seq.full
50 # success, all done
51 status=0
53 exit