pmrep: further zbxsend python3 fixes
[pcp.git] / qa / 742
blob87fda0bdbb5e3bc55a988ed403a569ff6194d4b8
1 #!/bin/sh
2 # PCP QA Test No. 742
3 # Exercise the pcp-uptime(1) command using an archive
5 # Copyright (c) 2014 Red Hat.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 . ./common.python
12 status=1 # failure is the default!
13 $sudo rm -rf $tmp.* $seq.full
14 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
16 pcp_uptime="$PCP_BINADM_DIR/pcp-uptime"
17 test -x $pcp_uptime || _notrun "No pcp-uptime(1) installed"
18 pcp_uptime="$python $pcp_uptime"
20 # real QA test starts here
21 echo && echo uptime output, at archive start
22 PCP_ARCHIVE="archives/pcp-uptime" PCP_HOSTZONE=1 $pcp_uptime
24 echo && echo uptime output, at archive end
25 pcp -a $here/archives/pcp-uptime -z -O-0 uptime
27 echo && echo uptime output, at archive start, forw-fetch needed
28 PCP_ARCHIVE="archives/pcp-uptime2" PCP_HOSTZONE=1 $pcp_uptime
30 # success, all done
31 status=0
32 exit