Browse Source

client: check for errors in shadow tests

Justin Tracey 2 months ago
parent
commit
a0c3e53317
1 changed files with 9 additions and 0 deletions
  1. 9 0
      shadow/client/run.sh

+ 9 - 0
shadow/client/run.sh

@@ -28,6 +28,13 @@ check_all_logs() {
     fi
 }
 
+invert_check_all_logs() {
+    if grep -Eq "$1" shadow.data/hosts/*/*.stdout ; then
+        echo "Found errors via pattern: $1"
+        ret=1
+    fi
+}
+
 for group in ${!groups[@]} ; do
     for name in ${groups[$group]} ; do
         echo "$group,$name"
@@ -41,6 +48,8 @@ for group in ${!groups[@]} ; do
         check_one_log "$name,$group,receive,.*,[0-9]+" 10
         # users got at least 10 normal messages from this user in this group
         check_all_logs "$group,receive,.*,$name,[0-9]+" 10
+        # users didn't get any errors
+        invert_check_all_logs "[Ee]rr"
     done
 done