annotate test/sun/tools/jstat/compilerOutput1.awk @ 11752:12ae7aa5aaa2

8146993: Several javax/management/remote/mandatory regression tests fail after JDK-8138811 Reviewed-by: dfuchs, valeriep
author jbachorik
date Fri, 05 Feb 2016 11:02:08 +0100
parents
children
rev   line source
duke@0 1 #
duke@0 2 # matching the following output specified as a pattern that verifies
duke@0 3 # that the numerical values conform to a specific pattern, rather than
duke@0 4 # specific values.
duke@0 5 #
duke@0 6 # Compiled Failed Invalid Time FailedType FailedMethod
duke@0 7 # 38 0 0 0.41 0
duke@0 8
duke@0 9
duke@0 10
duke@0 11 BEGIN {
duke@0 12 headerlines=0; datalines=0; totallines=0
duke@0 13 }
duke@0 14
duke@0 15 /^Compiled Failed Invalid Time FailedType FailedMethod$/ {
duke@0 16 headerlines++;
duke@0 17 }
duke@0 18
duke@0 19 # note - the FailedMethod column is not matched very thoroughly by the
duke@0 20 # following pattern. We just check for zero or more spaces after the
duke@0 21 # FailedType column and the for any sequence of characters for the
duke@0 22 # FailedMethod column. Better checking would verify an optional string of
duke@0 23 # characters that follows class/method name patterns. However, it's very
duke@0 24 # difficult to generate any data in this column under normal circumstances.
duke@0 25 #
duke@0 26 /^[ ]*[0-9]+[ ]*[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*.*$/ {
duke@0 27 datalines++;
duke@0 28 }
duke@0 29
duke@0 30 { totallines++; print $0 }
duke@0 31
duke@0 32 END {
duke@0 33 if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
duke@0 34 exit 0
duke@0 35 }
duke@0 36 else {
duke@0 37 exit 1
duke@0 38 }
duke@0 39 }