102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
+
+
+
+
+
+
+
+
+
|
There will be some lines in your log file that, if missing, indicate a problem. Create required expects for those:
<verbatim>
;; If we don't get a header then we know something went badly wrong
(expect:required in "Init" = 1 "Header" #/This is a header/)
</verbatim>
Sometimes you want to use required as a warning.
<verbatim>
;; warn if something is missing
(expect:required-warn in "SomeSection" = 1 "Warn if not found" #/this is expected but if not found it is only a warning/)
</verbatim>
NOTE: expect:desired is an alias for expect:required-warn.
<h3>Catch and ignore errors</h3>
The rules are applied in the order they are specified in the command file. Once a rule is hit in the log file no other rules are tested. You can use this to create a catch all and then add exceptions. In this example ERROR 244 is false and should not be flagged as an error. The expect:ignore rule will match and so the expect:error rule never gets triggered.
<verbatim>
(expect:ignore in "Body" = 1 "FALSE ERROR" #/ERROR 244/)
(expect:error in "Body" = 0 "ERROR BLAH" #/error/i) ;; disallow errors
|