qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 813
blob7cc99fbd9fc63e14b36f447c4c17817e93e6df93
1 #!/bin/sh
2 # PCP QA Test No. 813
3 # Testing pmdapapi functionality with dbpmda
5 # Copyright (c) 2014 Red Hat Inc. All Rights Reserved.
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 [ -d $PCP_PMDAS_DIR/papi ] || _notrun "PAPI PMDA is not installed"
18 $sudo rm -rf $tmp.* $seq.full
19 trap "cd $here; $sudo rm -rf $tmp.*; exit \$status" 0 1 2 3 15
21 _filter_papi_errors()
23 sed \
24 -e '/pfm_find_full_event(.*): event not found./d' \
25 -e '/events in papi_events.csv were not valid./d' \
26 # end
29 _filter()
31 sed \
32 -e "s,$PCP_PMDAS_DIR,PCP_PMDAS_DIR,g" \
33 -e 's/value [0-9][0-9]*/value NUMBER/' \
34 -e 's/value \".*\"/value STRING/' \
35 -e 's/0x[0-9a-f]*/ADDR/g' \
36 -e 's/[0-2][0-9]:00:00.000/TIME/' \
37 -e 's/126.0.[0-9][0-9]*/126.0.NUMBER/' \
38 -e "s,$tmp,TMP," \
39 | _filter_papi_errors
42 # vars and checks
43 papirootpmns=$PCP_PMDAS_DIR/papi/root
44 pipepmda=$PCP_PMDAS_DIR/papi/pmdapapi
46 # check if papi PMDA is going to work on this platform
47 _check_papi
49 # real QA test starts here
50 echo "=== Daemon PMDA papi test ==="
51 $sudo dbpmda -n $papirootpmns -ie <<EOF 2>&1 | _filter
52 open pipe $pipepmda -d 126 -l $tmp.log
53 getdesc on
54 attr "username" "root"
55 attr 11 "0"
56 desc papi.system.TOT_INS
57 desc papi.control.status
58 desc papi.available.num_counters
59 store papi.control.enable "TOT_INS"
60 fetch papi.system.TOT_INS
61 store papi.control.disable "TOT_INS"
62 EOF