Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 830
blob5bc279e7c189254626d151136dd18fbe2c701ec8
1 #!/bin/sh
2 # PCP QA Test No. 830
3 # Exercise error handling in the pcp(1) script.
5 # Copyright (c) 2014 Red Hat.
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 status=1 # failure is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
20 # real QA test starts here
21 export PMCD_CONNECT_TIMEOUT=1
22 echo "Live mode failure:"
23 pcp --host no.such.host.pcp.io
25 echo "Archive mode failure:"
26 pcp --archive /no/such/file
28 # success, all done
29 status=0
30 exit