Ignore Exception between expected marker logs.
Change-Id: I3b7f155e3e9598a2c1de6484605e3f09c70e14dd
diff --git a/tools/test/bin/onos-check-logs b/tools/test/bin/onos-check-logs
index b98fe1bd..f54fad2 100755
--- a/tools/test/bin/onos-check-logs
+++ b/tools/test/bin/onos-check-logs
@@ -49,16 +49,30 @@
ssh $remote "
[ "'`uname`'" != "'"Linux"'" ] && alias tac='tail -r'
tac $LOG | tr -d '\000' | awk -v ignoreStoreExceptions=${ise:-0} '
- BEGIN { off = 0; fail = 0; exclusion = 0; trace = \"\";}
+ BEGIN { off = 0; fail = 0; exclusion = 0; expected = 0; trace = \"\";}
/ org.apache.karaf.main.lock.SimpleFileLock lock/ {
exit fail;
}
+ # note: we are parsing log in reverse from the end
+ / EXPECTING_EXCEPTION_BEGIN/ {
+ print \$0;
+ expected = 0;
+ }
+
+ / EXPECTING_EXCEPTION_END/ {
+ print \$0;
+ expected = 1;
+ }
+
/ ERROR / {
if (exception && !exclusion) {
print \$0;
exception = 0;
- fail = 1;
+
+ if (!expected) {
+ fail = 1;
+ }
}
exclusion = 0;
}
@@ -82,7 +96,9 @@
print trace;
print \$0;
exception = 1;
- fail = 1;
+ if (!expected) {
+ fail = 1;
+ }
trace = \"\";
}
}