Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 741
blob2054753eebb8da20a14ef78b4e9ff1427f0f4eab
1 #!/bin/sh
2 # PCP QA Test No. 741
3 # Exercise python script automated sys.argv context creation
5 # Copyright (c) 2014 Red Hat.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 . ./common.python
13 status=1 # failure is the default!
14 $sudo rm -rf $tmp.* $seq.full
15 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
17 $python -c "from pcp import pmapi" >/dev/null 2>&1
18 [ $? -eq 0 ] || _notrun "python pcp pmapi module not installed"
20 eval HOST=`pmprobe -v pmcd.hostname | awk '{ print $3 }'`
22 _filter_live()
24 sed \
25 -e '/^Align: /d' \
26 -e '/^Start: /d' \
27 -e '/^Finish: /d' \
28 -e '/^Origin: /d' \
29 -e "s/hostname: $HOST/hostname: HOST/g" \
33 # real QA test starts here
34 echo && echo check archive and boundaries
35 $python $here/src/test_pcp_getopts.py -a archives/ace_v2 -z
37 echo && echo check archive time windows
38 $python $here/src/test_pcp_getopts.py -a archives/ace_v2 -z \
39 --align="1 second" \
40 --start="@ Mon Oct 30 14:25:10 1995" \
41 --origin="@ Mon Oct 30 14:25:10 1995" \
42 --finish="@ Mon Oct 30 14:25:15 1995"
44 echo && echo check multiple host contexts
45 $python $here/src/test_pcp_getopts.py -h local: -h local: | _filter_live
47 # success, all done
48 status=0
49 exit