Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 556
blobf416bac72e42f8c17e9457f1acfe4b931532562d
1 #!/bin/sh
2 # PCP QA Test No. 556
3 # pmie actions in archive mode
5 # Copyright (c) 1995-2002 Silicon Graphics, 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 arch=archives/ace_v2
18 status=1 # failure is the default!
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 # deal with an annoying libc error ... using TZ=:Australia/Melbourne
22 # causes the -z option to report the wrong time, at least for some
23 # times of the year
25 TZ=EST-10
26 export TZ
28 cat > $tmp.ns << EOF
29 root { irix }
30 irix { kernel }
31 irix.kernel { all }
32 irix.kernel.all { load 1:18:3 }
33 EOF
35 # real QA test starts here
36 cat <<End-of-File | pmie -n $tmp.ns -z -a $arch -S '@14:25:10' -t 3sec -T 5sec >$tmp.log 2>&1
37 irix.kernel.all.load #'1' > 0 -> syslog "test syslog";
38 irix.kernel.all.load #'1' > 0 -> print "test print";
39 irix.kernel.all.load #'1' > 0 -> shell "echo" " test shell";
40 irix.kernel.all.load #'1' > 0 -> syslog 1 min "test syslog + holdoff";
41 irix.kernel.all.load #'1' > 0 -> print 1 min "test print + holdoff";
42 irix.kernel.all.load #'1' > 0 -> shell 1 min "echo" " test shell + holdoff";
43 End-of-File
45 sed <$tmp.log \
46 -e "/Info: evaluator exiting/d" \
47 -e "/note - evaluator exiting/d" \
48 -e '/note - timezone/{
49 s/note - //
50 s/"//g
53 # success, all done
54 status=0
55 exit