qa: rework python-not-configured checks for tests
[pcp.git] / qa / 737
blobdc7a4ce69ce4fe6556f80249cde9e988160d1edd
1 #!/bin/sh
2 # PCP QA Test No. 737
3 # Exercise time interfaces in python PMAPI wrapper module.
5 # Copyright (c) Red Hat.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 . ./common.python
13 $python -c "from pcp import pmapi" >/dev/null 2>&1
14 [ $? -eq 0 ] || _notrun "python pcp pmapi module not installed"
16 status=1 # failure is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
20 _filter_utc()
22 sed -e 's/UTC+0/UTC/g' -e 's/UTC-0/UTC/g'
25 # real QA test starts here
26 $python src/test_pcp_time.py | _filter_utc
28 # success, all done
29 status=0
30 exit