Skip to content

Commit

Permalink
Don't warn about failure return values on canary images.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfiumara committed May 3, 2019
1 parent f4c4c29 commit 9f21adc
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions slapsegiii/validation/validate
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,16 @@ check_orientation_log_errors()
{
read # Read header line
while read line; do
read rv orientation <<< \
$(awk -F, '{print $3,$5}' <<< $line)
read name rv orientation <<< \
$(awk -F, '{print $1,$3,$5}' <<< $line)
if [ ${rv} != 0 ]; then
has_failure_rv=1
# We fully expect failures on canary images,
# so don't warn about them.
if [ $(grep -q canary <<< ${name}; echo $?) -ne \
0 ]; then
has_failure_rv=1
fi
fi
# We only check orientation logs if they are supported,
Expand Down Expand Up @@ -958,8 +963,8 @@ check_segmentation_log_errors()
{
read # Read header line
while read line; do
read rv errors scode deficiencies quantity <<< \
$(awk -F, '{print $3,$16,$14,$17,$18}' <<< $line)
read name rv errors scode deficiencies quantity <<< \
$(awk -F, '{print $1,$3,$16,$14,$17,$18}' <<< $line)
# Ensure that a deficiency is set when returning
# RequestRecapture and RequestRecaptureWithAttempt
Expand All @@ -978,7 +983,12 @@ check_segmentation_log_errors()
# Only check for position errors with "Success" or
# "RequestRecaptureWithAttempt"
if [ ${rv} -ne 0 ] && [ ${rv} -ne 3 ]; then
has_failure_rv=1
# We fully expect failures on canary images,
# so don't warn about them.
if [ $(grep -q canary <<< ${name}; echo $?) -ne \
0 ]; then
has_failure_rv=1
fi
continue
fi
Expand Down

0 comments on commit 9f21adc

Please sign in to comment.