3 # exercise archive compression thru pmlogger_daily
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
17 [ -d $tmp.distdir
] && rm -fr $tmp.distdir
18 [ -d $tmp.relaydir
] && rm -fr $tmp.relaydir
22 status
=1 # failure is the default!
23 trap "_cleanup; exit \$status" 0 1 2 3 15
25 # create test control file, directories and populate with dummy archives
28 #Host P? S? directory args
29 dist.engr n n $tmp.distdir -c config.default
30 relay.engr n n $tmp.relaydir -c config.default
33 mkdir
-p $tmp.distdir
$tmp.relaydir
35 # some archives for today...
36 TODAY
=`pmdate %Y%m%d.0`
37 cp $tmp.ctl
$tmp.distdir
/$TODAY.0
38 cp $tmp.ctl
$tmp.distdir
/$TODAY.meta
39 cp $tmp.ctl
$tmp.distdir
/$TODAY.index
40 cp $tmp.ctl
$tmp.relaydir
/$TODAY.0
41 cp $tmp.ctl
$tmp.relaydir
/$TODAY.meta
42 cp $tmp.ctl
$tmp.relaydir
/$TODAY.index
44 # some archives for a five days ago...
45 FIVEDAYS
=`pmdate -5d %Y%m%d.0`
46 cp $tmp.ctl
$tmp.distdir
/$FIVEDAYS.0
47 cp $tmp.ctl
$tmp.distdir
/$FIVEDAYS.meta
48 cp $tmp.ctl
$tmp.distdir
/$FIVEDAYS.index
49 cp $tmp.ctl
$tmp.relaydir
/$FIVEDAYS.0
50 cp $tmp.ctl
$tmp.relaydir
/$FIVEDAYS.1
51 cp $tmp.ctl
$tmp.relaydir
/$FIVEDAYS.meta
52 cp $tmp.ctl
$tmp.relaydir
/$FIVEDAYS.index
53 cp $tmp.ctl
$tmp.relaydir
/mumble
54 cp $tmp.ctl
$tmp.relaydir
/mumble
.0
55 STAMP
=`pmdate -5d %Y%m%d`0010
56 touch -t "$STAMP" $tmp.
*/$FIVEDAYS.
* $tmp.relaydir
/mumble
*
58 # some archives for five months ago...
59 FIVEMONTHS
=`pmdate -5m %Y%m%d.0`
60 cp $tmp.ctl
$tmp.distdir
/$FIVEMONTHS.0
61 cp $tmp.ctl
$tmp.distdir
/$FIVEMONTHS.meta
62 cp $tmp.ctl
$tmp.distdir
/$FIVEMONTHS.index
63 cp $tmp.ctl
$tmp.relaydir
/$FIVEMONTHS.0
64 cp $tmp.ctl
$tmp.relaydir
/$FIVEMONTHS.meta
65 cp $tmp.ctl
$tmp.relaydir
/$FIVEMONTHS.index
66 STAMP
=`pmdate -5m %Y%m%d`0010
67 touch -t "$STAMP" $tmp.
*/$FIVEMONTHS.
*
69 # real QA test starts here
70 $sudo $PCP_BINADM_DIR/pmlogger_daily
-V -N -x 3 -X bzip2 -c $tmp.ctl
-l $tmp.log
71 $sudo cat $tmp.log | \
74 -e "s/$TODAY/TODAY/g" \
75 -e "s/$FIVEDAYS/FIVEDAYS/g" \
76 -e "s/$FIVEMONTHS/FIVEMONTHS/g" \
77 -e "s/$seq-$$/SEQ-PID/g" \
78 -e '/Warning: no archives found to merge/d' \
79 -e "s;/private/;/;g" \
80 -e "s,$PCP_TMP_DIR,TMP,g" \
81 -e "s,/var/tmp,TMP,g" \