3 # pmlogextract with config file and various instance specifications
5 # Copyright (c) 2015 Ken McDonell. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
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
23 -e 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g'
31 pname = sprintf("%03d",part)
32 outname = "'"$tmp"'." pname
34 in_inst == 1 && NF == 0 { in_inst = 0
37 pname = sprintf("%03d",part)
38 outname = "'"$tmp"'." pname
40 in_inst == 0 && / inst \[/ { in_inst = 1
43 pname = sprintf("%03d",part)
44 outname = "'"$tmp"'." pname
49 # too many parts to sort
55 echo >&2 "--- 000 ---"
56 [ -f $tmp.000 ] && cat >&2 $tmp.000
57 echo >&2 "--- 001 ---"
58 [ -f $tmp.001 ] && cat >&2 $tmp.001
59 echo >&2 "--- ... ---"
60 echo >&2 "--- 999 ---"
61 [ -f $tmp.999 ] && cat >&2 $tmp.999
62 echo >&2 "_sort_pmdumplog failed: more than 999 parts to sort"
65 for p
in $tmp.
[0-9][0-9][0-9]
67 LC_COLLATE
=POSIX
sort $p
72 pmdumplog
-z archives
/chartqa1 sample.mirage
>$tmp.tmp
73 _sort_pmdumplog
<$tmp.tmp
>$tmp.ref.mirage ||
exit
74 pmdumplog
-z archives
/chartqa1 sample.bin
>$tmp.tmp
75 _sort_pmdumplog
<$tmp.tmp
>$tmp.ref.bin ||
exit
79 echo "--- sample.mirage diffs ---"
80 pmdumplog
-z $tmp sample.mirage
>$tmp.tmp
81 if _sort_pmdumplog
<$tmp.tmp
87 |
diff - $tmp.ref.mirage
88 echo "--- sample.bin diffs ---"
89 pmdumplog
-z $tmp sample.bin | _sort_pmdumplog |
diff - $tmp.ref.bin
92 # real QA test starts here
93 echo "=== pmlogextract no config ==="
94 rm -f $tmp.0 $tmp.meta
$tmp.index
95 pmlogextract
-z archives
/chartqa1
$tmp
99 echo "=== pmlogextract config with metrics, no instances ==="
100 rm -f $tmp.0 $tmp.meta
$tmp.index
101 cat <<End-of-File >$tmp.config
105 pmlogextract
-z -c $tmp.config archives
/chartqa1
$tmp
109 echo "=== pmlogextract config with metrics, all instances in order ==="
110 rm -f $tmp.0 $tmp.meta
$tmp.index
111 cat <<End-of-File >$tmp.config
112 sample.mirage["m-00","m-01","m-02","m-03","m-04","m-05","m-08","m-09","m-10","m-11","m-12","m-13","m-14","m-15","m-16","m-17","m-18","m-19","m-20"]
113 sample.bin[ "bin-100" "bin-200" "bin-300" "bin-400" "bin-500" "bin-600" "bin-700" "bin-800" "bin-900" ]
115 pmlogextract
-z -c $tmp.config archives
/chartqa1
$tmp
119 echo "=== pmlogextract config with metrics, all instances in reverse order ==="
120 rm -f $tmp.0 $tmp.meta
$tmp.index
121 cat <<End-of-File >$tmp.config
122 sample.mirage["m-20","m-19","m-18","m-17","m-16","m-15","m-14","m-13","m-12","m-11","m-10","m-09","m-08","m-05","m-04","m-03","m-02","m-01","m-00"]
123 sample.bin[ "bin-900" "bin-800" "bin-700" "bin-600" "bin-500" "bin-400" "bin-300" "bin-200" "bin-100" ]
125 pmlogextract
-z -c $tmp.config archives
/chartqa1
$tmp
129 echo "=== pmlogextract config with metrics, some instances ==="
130 rm -f $tmp.0 $tmp.meta
$tmp.index
131 cat <<End-of-File >$tmp.config
132 sample.mirage["m-19","m-18","m-17","m-16","m-15","m-14","m-13","m-12","m-11","m-09","m-08","m-05","m-04","m-03","m-02","m-00"]
133 sample.bin[ "bin-800" "bin-700" "bin-600" "bin-500" "bin-400" "bin-300" "bin-200" ]
135 pmlogextract
-z -c $tmp.config archives
/chartqa1
$tmp