Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 303
blobe7beb78e3394e49ed2d8f6883e3a31a7d83de629
1 #! /bin/sh
2 # PCP QA Test No. 303
3 # merge two archives, and check that mark records are placed in the
4 # correct positions!!!
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard filters
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 _filter()
19 sed \
20 -e '/\[[0-9][0-9]* bytes\]/d'
23 status=1 # failure is the default!
24 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
26 # deal with an annoying libc error ... using TZ=:Australia/Melbourne
27 # causes the -z option to report the wrong time, at least for some
28 # times of the year
30 TZ=EST-10
31 export TZ
33 # real QA test starts here
35 echo "=== arch_a ==="
36 pmdumplog -a -z archives/arch_a | _filter
38 echo
39 echo "=== arch_b ==="
40 pmdumplog -a -z archives/arch_b | _filter
42 rm -rf $tmp.arch*
43 pmlogextract -z archives/arch_a archives/arch_b $tmp.arch
45 echo
46 echo "=== the merged archive ==="
47 pmdumplog -a -z $tmp.arch | _filter
49 # success, all done
50 status=0
51 exit