author | goetz |
Thu, 14 Jun 2018 14:32:03 +0200 | |
changeset 50580 | eb0287b637bd |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 1 |
# |
2 |
# matching the following output specified as a pattern that verifies |
|
3 |
# that the numerical values conform to a specific pattern, rather than |
|
4 |
# specific values. |
|
5 |
# |
|
6 |
# Compiled Failed Invalid Time FailedType FailedMethod |
|
7 |
# 38 0 0 0.41 0 |
|
8 |
||
9 |
||
10 |
||
11 |
BEGIN { |
|
12 |
headerlines=0; datalines=0; totallines=0 |
|
13 |
} |
|
14 |
||
15 |
/^Compiled Failed Invalid Time FailedType FailedMethod$/ { |
|
16 |
headerlines++; |
|
17 |
} |
|
18 |
||
19 |
# note - the FailedMethod column is not matched very thoroughly by the |
|
20 |
# following pattern. We just check for zero or more spaces after the |
|
21 |
# FailedType column and the for any sequence of characters for the |
|
22 |
# FailedMethod column. Better checking would verify an optional string of |
|
23 |
# characters that follows class/method name patterns. However, it's very |
|
24 |
# difficult to generate any data in this column under normal circumstances. |
|
25 |
# |
|
26 |
/^[ ]*[0-9]+[ ]*[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*.*$/ { |
|
27 |
datalines++; |
|
28 |
} |
|
29 |
||
30 |
{ totallines++; print $0 } |
|
31 |
||
32 |
END { |
|
22562
e909d64b8dd8
6545321: [TESTBUG] jstatLineCounts4.sh has to be resilient to unexpected output
sla
parents:
2
diff
changeset
|
33 |
if ((headerlines == 1) && (datalines == 1)) { |
2 | 34 |
exit 0 |
35 |
} |
|
36 |
else { |
|
37 |
exit 1 |
|
38 |
} |
|
39 |
} |